C
- coefficient type.public class Rectangle<C extends RingElem<C> & Rational> extends java.lang.Object implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
Complex<C>[] |
corners
rectangle corners.
|
Constructor and Description |
---|
Rectangle(Complex<C> mid)
Constructor.
|
Rectangle(Complex<C> sw,
Complex<C> ne)
Constructor.
|
Rectangle(Complex<C> nw,
Complex<C> sw,
Complex<C> se,
Complex<C> ne)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
centerApprox()
Approximation of center.
|
boolean |
contains(Complex<C> c)
Contains a point.
|
boolean |
contains(Rectangle<C> r)
Contains a rectangle.
|
Rectangle<C> |
copy()
Copy this.
|
boolean |
equals(java.lang.Object b)
Comparison with any other object.
|
Rectangle<C> |
exchangeNE(Complex<C> c)
Exchange NE corner.
|
Rectangle<C> |
exchangeNW(Complex<C> c)
Exchange NW corner.
|
Rectangle<C> |
exchangeSE(Complex<C> c)
Exchange SE corner.
|
Rectangle<C> |
exchangeSW(Complex<C> c)
Exchange SW corner.
|
Complex<C> |
getCenter()
Complex center.
|
Complex<BigDecimal> |
getDecimalCenter()
Complex of BigDecimal approximation of center.
|
Complex<C> |
getNE()
Get north east corner.
|
Complex<C> |
getNW()
Get north west corner.
|
Complex<BigRational> |
getRationalCenter()
Complex of BigRational approximation of center.
|
Complex<C> |
getSE()
Get south east corner.
|
Complex<C> |
getSW()
Get south west corner.
|
int |
hashCode()
Hash code for this Rectangle.
|
C |
length()
Length.
|
C |
lengthImag()
Length imaginary side.
|
C |
lengthReal()
Length real side.
|
Complex<C> |
randomPoint()
Random point of recatangle.
|
BigRational |
rationalLength()
Rational Length.
|
java.lang.String |
toScript()
Get a scripting compatible string representation.
|
java.lang.String |
toString()
String representation of Rectangle.
|
public Rectangle(Complex<C> sw, Complex<C> ne)
sw
- corner.ne
- corner.public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public java.lang.String toScript()
public Rectangle<C> exchangeNW(Complex<C> c)
c
- new NW corner.public Rectangle<C> exchangeSW(Complex<C> c)
c
- new SW corner.public Rectangle<C> exchangeSE(Complex<C> c)
c
- new SE corner.public Rectangle<C> exchangeNE(Complex<C> c)
c
- new NE corner.public boolean contains(Complex<C> c)
c
- point.public boolean contains(Rectangle<C> r)
r
- rectangle.public Complex<C> randomPoint()
public boolean equals(java.lang.Object b)
equals
in class java.lang.Object
Object.equals(java.lang.Object)
public int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
public Complex<BigRational> getRationalCenter()
public Complex<BigDecimal> getDecimalCenter()
public java.lang.String centerApprox()
public BigRational rationalLength()
public C lengthReal()
public C lengthImag()