public class Point
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
static long |
serialVersionUID
For serialization.
|
Modifier and Type | Method and Description |
---|---|
static Point |
createPoint(int i)
Public static factory method.
|
boolean |
equals(java.lang.Object obj)
Two Points are equal if they are of the same length and have the
same entries in each position.
|
static java.lang.String |
gapString()
Output a gap-readable String representing a rotation matrix.
|
static java.lang.String |
gapString(int[] angles)
Output a gap-readable String representing an inflation matrix.
|
Point2D |
getPoint2D()
Output this Point as a Point2D.
|
int |
hashCode()
Currently broken.
|
static Point[] |
inflation(int[] seq)
Produce an inflation matrix (i.e., a sequence of
N() -1 Points)
corresponding to a given edge sequence. |
static void |
main(java.lang.String[] args)
For testing.
|
java.lang.String |
matrixString()
Output a String consisting of the coefficients of the Point in a
comma-separated list with no brackets.
|
static java.lang.String |
matrixString(int[] angles)
Same as
gapString(int[]) , but with row breaks
indicated by new lines instead of square brackets. |
Point |
minus(Point p)
Subtract another point from this one and return the result.
|
Point |
multiply(Point[] mat)
View the given array of Points as a matrix, and multiply this Point
by it.
|
static int |
N()
Get the order of symmetry.
|
static java.lang.String |
order()
Output a String describing the order of symmetry.
|
Point |
plus(Point p)
Add another point to this one and return the result.
|
java.lang.String |
postscriptString()
Output a String consisting of the coefficients of the Point in a
space-separated list.
|
double[] |
project()
Output 2d Cartesian coordinates.
|
Point |
rotate(int angle)
Rotate this Point about the origin by the given angle.
|
static void |
setN(int n)
Set the order of symmetry.
|
java.lang.String |
toString()
Output a String consisting of the coefficients of the Point in a
comma-separated list, enclosed in square brackets.
|
static Point |
ZERO()
Get the zero vector.
|
public static final long serialVersionUID
public static void setN(int n)
n
- The new order of symmetry.public static int N()
public static Point ZERO()
public static Point createPoint(int i)
i
- The angle between the Point returned and the positive x-axis.public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String postscriptString()
public static java.lang.String order()
public java.lang.String matrixString()
public double[] project()
public Point2D getPoint2D()
public static java.lang.String gapString(int[] angles)
angles
- A list of angles, given as integer multiples of pi/N.
The sum of the points on the unit circle corresponding to these angles
is the inflation factor of the matrix.public static java.lang.String matrixString(int[] angles)
gapString(int[])
, but with row breaks
indicated by new lines instead of square brackets.public static java.lang.String gapString()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public Point plus(Point p)
p
- The Point we add to this one.public Point minus(Point p)
p
- The Point we subtract from this one.public Point rotate(int angle)
angle
- The angle of rotation.public static Point[] inflation(int[] seq)
N()
-1 Points)
corresponding to a given edge sequence.seq
- A sequence of angles representing a vector
reached by taking steps of unit length, starting at the origin.
This vector should lie on the positive x-axis, and therefore
represent a length.public Point multiply(Point[] mat)
mat
- An Array of Points representing an inflation matrix.public static void main(java.lang.String[] args)