C - coefficient type.public class Interval<C extends RingElem<C> & Rational> extends java.lang.Object implements java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
C |
left
left interval border.
|
C |
right
right interval border.
|
| Constructor and Description |
|---|
Interval(C mid)
Constructor.
|
Interval(C left,
C right)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(C c)
Test if an element is contained in this interval.
|
boolean |
contains(Interval<C> vc)
Test if an interval is contained in this interval.
|
Interval<C> |
copy()
Copy this.
|
boolean |
equals(java.lang.Object b)
Comparison with any other object.
|
int |
hashCode()
Hash code for this Interval.
|
C |
length()
Length.
|
C |
middle()
Middle point.
|
C |
randomPoint()
Random point of interval.
|
BigRational |
rationalLength()
BigRational Length.
|
BigRational |
rationalMiddle()
Rational middle point.
|
BigDecimal |
toDecimal()
BigDecimal representation of Interval.
|
java.lang.String |
toScript()
Get a scripting compatible string representation.
|
java.lang.String |
toString()
String representation of Interval.
|
public Interval(C left, C right)
left - interval border.right - interval border.public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()public java.lang.String toScript()
public boolean equals(java.lang.Object b)
equals in class java.lang.ObjectObject.equals(java.lang.Object)public int hashCode()
hashCode in class java.lang.ObjectObject.hashCode()public boolean contains(C c)
c - element to test.public boolean contains(Interval<C> vc)
vc - interval to test.public BigRational rationalLength()
public BigDecimal toDecimal()
public BigRational rationalMiddle()
public C randomPoint()