dreye.proj_P_to_simplex#
- dreye.proj_P_to_simplex(P, c)[source]#
Project the points that project the convex hull entailed by P onto the simplex with sum of c. Each returned point should sum up to c.
- Parameters:
- Pnp.ndarray
The array of points.
- cfloat
The sum of the simplex.
- Returns:
- np.ndarray
The projected points.
- Raises:
- AssertionError
If any point in P is not positive or c is not positive.