dreye.line_to_simplex#

dreye.line_to_simplex(x1, x2, c, axis=-1, checks=True)[source]#

This function finds the point where the line defined by vectors x1 and x2 intersects with the simplex with sum of c.

Parameters:
x1np.ndarray

The first point defining the line.

x2np.ndarray

The second point defining the line.

cfloat

The sum of the simplex.

axisint, optional

The axis to sum over. Default is -1.

checksbool, optional

If True, the function checks the validity of inputs. Default is True.

Returns:
np.ndarray

The intersection point.