Class LineSegment
java.lang.Object
org.ampere.base.util.LineSegment
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionLineSegment(double x1, double x2, double y1, double y2) Creates a new instance of LineSegment -
Method Summary
Modifier and TypeMethodDescriptionbottomTruncature(double x) return the upper truncature at abscissa, x.booleaninclude(double x) return true if the abscissa x is inside the abscissa interval.booleanreturn true if the all the abscissa of the LineSegment 'v' are included in the abscissa interval.doubleintegralWith(LineSegment v, int type) compute a integral based on two LineSegment u and v.doubleinterpolation(double x) compute the linear interpolation of the ordinate for abscissa, x.booleanretun true if the segment is parallel to 'v'.booleanreturn true if the segment is verticaltopTruncature(double x) return the lower truncature at abscissa, x.
-
Field Details
-
x1
public double x1 -
x2
public double x2 -
y1
public double y1 -
y2
public double y2
-
-
Constructor Details
-
LineSegment
public LineSegment(double x1, double x2, double y1, double y2) Creates a new instance of LineSegment
-
-
Method Details
-
include
public boolean include(double x) return true if the abscissa x is inside the abscissa interval. -
includeAbscissa
return true if the all the abscissa of the LineSegment 'v' are included in the abscissa interval. -
interpolation
public double interpolation(double x) compute the linear interpolation of the ordinate for abscissa, x. -
isVertical
public boolean isVertical()return true if the segment is vertical -
isParallelTo
retun true if the segment is parallel to 'v'. -
bottomTruncature
return the upper truncature at abscissa, x. -
topTruncature
return the lower truncature at abscissa, x. -
integralWith
compute a integral based on two LineSegment u and v. u is this LineSegment. v is the LineSegment v. type may be one of the following: 0 : correspond to scalar product u.v. 1 : correspond to area between u and v.
-