|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.ObjectPoint
class Point
This class introduces points and enables basic operations with them. The coordinates are stored as a field of Fractions.
| Constructor Summary | |
|---|---|
Point()
Constructs a null point of dimension 0. |
|
Point(Fraction[] A,
int d)
Constructs a point from a field of Fractions. |
|
Point(int d)
Constructs the origin. |
|
Point(Point A,
Vector V)
Constructs a point from a point and a vector. |
|
Point(Vector V)
Constructs a point from a vector (from the origin). |
|
| Method Summary | |
|---|---|
(package private) void |
copy(Point A)
Copies another point onto this point. |
(package private) static Point |
generateRandomPoint(int DIM)
Generates a random point. |
(package private) Fraction |
get(int i)
The getter of this class - returns the value of a given coordinate. |
(package private) int |
getDim()
Gets the dimensions of the point. |
(package private) boolean |
isEqual(Point C)
Checks if two points are equal. |
(package private) void |
set(Fraction F,
int i)
The setter of this class - sets given coordinate to a given value. |
(package private) Matrix |
toMatrixColumn()
Converts the point to a 1-column matrix. |
(package private) Matrix |
toMatrixRow()
Converts the point to a 1-row matrix. |
(package private) String |
toTeX()
Prints this point formatted as TeX code. |
(package private) String |
toText()
Prints this point formatted as text. |
| Methods inherited from class |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
Point()
Point(Fraction[] A,
int d)
Fractions.
A - field of Fractions, containing the point's coordinatesd - dimension of the point, ie. number of its coordinatesPoint(int d)
d - dimension of the point, ie. number of its coordinates
Point(Point A,
Vector V)
A - initial pointV - vector
UnsupportedOperationException - Throws an exception if the point and the vector don't have equal dimension.Point(Vector V)
V - vector| Method Detail |
|---|
void copy(Point A)
=.
I - the image pointstatic Point generateRandomPoint(int DIM)
DIM - dimension of the point (ie. a number of variables)Fraction get(int i)
i - the index of desired coordinate
Fraction)
IndexOutOfBoundsException - Throws an exception if the index isn't of <1,dimension of the point>.int getDim()
boolean isEqual(Point C)
C - comparand point
UnsupportedOperationException - Throws an exception if the point don't have equal dimension.
void set(Fraction F,
int i)
F - the ith coordinate desired value (a Fraction)i - the index of desired coordinate
IndexOutOfBoundsException - Throws an exception if the index isn't of <1,dimension of the point>.Matrix toMatrixColumn()
Matrix toMatrixRow()
String toTeX()
String toText()
[ and end with ]
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||