Module Mlpost__.Spline
type point= Mlpost.Ctypes.pointtype abscissa= floattype tThe type of Splines
val inter_depth : int Stdlib.refA mesure to decide how many iterations do to in intersection computations; * higher means more precise
val debug : boolval print : Stdlib.Format.formatter -> t -> unitval create : point -> point -> point -> point -> tcreate a b c dcreates a spline with points a and d and control points b and c. By default, the abscissa of the spline starts at0.and ends at1..
val create_with_offset : float -> point -> point -> point -> point -> tcreate a spline with abscissa between
[f,f+1]
val explode : t -> point * point * point * pointreturn the four points of the spline; left point, left control point, second point, second control point
val left_point : t -> pointval left_control_point : t -> pointval right_point : t -> pointval right_control_point : t -> pointthe four points of a spline
val reverse : (float -> float) -> t -> treverse a spline, using a conversion function for max and min
val point_of_s : t -> abscissa -> pointcompute the location of the given abscissa on a spline, but convert abscissa to
0,1interval first
val direction : t -> abscissa -> pointgive the direction (derivative) of the spline at the given abscissa
val bounding_box : t -> float * float * float * floata bounding_box of the given spline
val precise_bounding_box : t -> float * float * float * floata more precise bounding_box of the given spline
val one_intersection : t -> t -> float * floatcompute a single intersection of the two splines; raise
Not_foundif there is no intersection.
val intersection : t -> t -> (float * float) listcompute all intersections of the two splines; raise
Not_foundif there * is no intersection.
val apply4 : (point -> point -> point -> point -> 'a) -> t -> 'aapply a function to the four points of the spline
type split=|Min|Max|InBetween of t * tthe type which caracterizes a split of a spline - Min - we have splitted at the left end Max - we have splitted at the right end InBetween (s1,s2) - we have splitted somewhere in between, and the resulting two new splines are
s1ands2
val dist_min_point : point -> t -> float * floatdist_min_point p scomputes the minimal distance ofptos, as well as the abscissa which corresponds to this minimal distance; the return value isdistance, abscissa.
val dist_min_spline : t -> t -> float * (float * float)dist_min_path p1 p2computes the minimal distance ofp1top2, as well as the two abscissa which correspond to this minimal distance; the return value isdistance, (abscissa_on_p1, abscissa_on_p2).
val transform : Mlpost__.Matrix.t -> t -> ttransform all points of the spline