ivcurves.compare_curves._find_x_intersection#
- ivcurves.compare_curves._find_x_intersection(interval, func, point, atol, maxsteps=100)#
Finds x-coordinate of the intersection between the known IV curve and the line segment from the origin to the given point.
This is an auxiliary function for
total_score()
.- Parameters:
interval (tuple(float, float)) – An interval on the x-axis that contains an intersection.
func (function) – A two-variable scalar-valued function.
point (tuple(float, float)) – The point defining the line from the origin.
atol (float) – Absolute tolerance of how close the found x-coordiante must be to the true x-coordinate of the intersection point.
maxsteps (int, default 100) – Maximum number of iterations for
ivcurves.precise.golden_search()
andmp.findroot()
to find the x-coordinate of the intersection point. AValueError
by either iteration ifatol
is not met aftermaxsteps
iterations.
- Returns:
x-coordinate of an intersection.
- Return type: