|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
x10.lang.Object x10.array.Point
final public class Point
Declaration: Point extends x10.lang.Object implements (a1:x10.lang.Int)=>x10.lang.Int, x10.util.Ordered[x10.array.Point{self.rank==this(:x10.array.Point).rank}], x10.lang.Comparable[x10.array.Point{self.rank==this(:x10.array.Point).rank}].
The type
Point(rank)
represents a point in a
rank-dimensional space. The coordinates of a point p
may be accessed individually (with zero-based indexing) using
p(i)
because Point
implements
(Int)=>int
. The coordinates may also be accessed as a
Array[int]. Point arithmetic is supported.
Field Summary | |
---|---|
Int |
rank
Property. |
Method Summary | ||
---|---|---|
Int |
operator()(Int i)
Returns the value of the ith coordinate. |
|
x10.lang. Fun_0_1<Int,Int> |
coords()
Declaration: coords(): (a1:x10.lang.Int)=>x10.lang.Int. Returns the coordinates as a (int)=>int . |
|
static
|
make(Array<T> r)
Declaration: make[T](r:x10.array.Array[T]{self.rank==1}){}: x10.array.Point{self.rank==r.size}. Constructs a Point from a Array[int](1) |
|
static Point |
make(Int rank,
x10.lang. Fun_0_1<Int,Int> init)
Declaration: make(rank:x10.lang.Int,init:(a1:x10.lang.Int)=>x10.lang.Int): x10.array.Point{self.rank==rank}. Returns a Point p of rank rank with p(i)=init(i) . |
|
static Point |
make(Int i0)
Declaration: make(i0:x10.lang.Int): x10.array.Point{self.rank==1, self!=null}. |
|
static Point |
make(Int i0,
Int i1)
Declaration: make(i0:x10.lang.Int,i1:x10.lang.Int): x10.array.Point{self.rank==2, self!=null}. |
|
static Point |
make(Int i0,
Int i1,
Int i2)
Declaration: make(i0:x10.lang.Int,i1:x10.lang.Int,i2:x10.lang.Int): x10.array.Point{self.rank==3, self!=null}. |
|
static Point |
make(Int i0,
Int i1,
Int i2,
Int i3)
Declaration: make(i0:x10.lang.Int,i1:x10.lang.Int,i2:x10.lang.Int,i3:x10.lang.Int): x10.array.Point{self.rank==4, self!=null}. |
|
static
|
implicit_operator_as(Array<T> a)
Declaration: implicit_operator_as[T](a:x10.array.Array[T]{self.rank==1}){}: x10.array.Point{self.rank==a.size}. A Array r of length k can be converted to a point p
of the same rank with p(i)=r(i) . |
|
Point |
operator+()
Declaration: operator+(): x10.array.Point{self.rank==this(:x10.array.Point).rank}. The point +p is the same as p . |
|
Point |
operator-()
Declaration: operator-(): x10.array.Point{self.rank==this(:x10.array.Point).rank}. The point -p is the same as p with each index negated. |
|
Point |
operator+(Point that)
Declaration: operator+(that:x10.array.Point{self.rank==this(:x10.array.Point).rank}): x10.array.Point{self.rank==this(:x10.array.Point).rank}. The ith coordinate of point p+q is p(i)+q(i) . |
|
Point |
operator-(Point that)
Declaration: operator-(that:x10.array.Point{self.rank==this(:x10.array.Point).rank}): x10.array.Point{self.rank==this(:x10.array.Point).rank}. The ith coordinate of point p-q is p(i)-q(i) . |
|
Point |
operator*(Point that)
Declaration: operator*(that:x10.array.Point{self.rank==this(:x10.array.Point).rank}): x10.array.Point{self.rank==this(:x10.array.Point).rank}. The ith coordinate of point p
q is p(i)
q(i) . |
|
Point |
operator/(Point that)
Declaration: operator/(that:x10.array.Point{self.rank==this(:x10.array.Point).rank}): x10.array.Point{self.rank==this(:x10.array.Point).rank}. The ith coordinate of point p/q is p(i)/q(i) . |
|
Point |
operator+(Int c)
Declaration: operator+(c:x10.lang.Int): x10.array.Point{self.rank==this(:x10.array.Point).rank}. The ith coordinate of point p+c is p(i)+c . |
|
Point |
operator-(Int c)
Declaration: operator-(c:x10.lang.Int): x10.array.Point{self.rank==this(:x10.array.Point).rank}. The ith coordinate of point p-c is p(i)-c . |
|
Point |
operator*(Int c)
Declaration: operator*(c:x10.lang.Int): x10.array.Point{self.rank==this(:x10.array.Point).rank}. The ith coordinate of point p
c is p(i)
c . |
|
Point |
operator/(Int c)
Declaration: operator/(c:x10.lang.Int): x10.array.Point{self.rank==this(:x10.array.Point).rank}. The ith coordinate of point p/c is p(i)/c . |
|
Point |
inverse_operator+(Int c)
Declaration: inverse_operator+(c:x10.lang.Int): x10.array.Point{self.rank==this(:x10.array.Point).rank}. The ith coordinate of point c+p is c+p(i) . |
|
Point |
inverse_operator-(Int c)
Declaration: inverse_operator-(c:x10.lang.Int): x10.array.Point{self.rank==this(:x10.array.Point).rank}. The ith coordinate of point c-p is c-p(i) . |
|
Point |
inverse_operator*(Int c)
Declaration: inverse_operator*(c:x10.lang.Int): x10.array.Point{self.rank==this(:x10.array.Point).rank}. The ith coordinate of point c
p is c
p(i) . |
|
Point |
inverse_operator/(Int c)
Declaration: inverse_operator/(c:x10.lang.Int): x10.array.Point{self.rank==this(:x10.array.Point).rank}. The ith coordinate of point c/p is c/p(i) . |
|
Int |
compareTo(Point that)
Declaration: compareTo(that:x10.array.Point{self.rank==this(:x10.array.Point).rank}): x10.lang.Int. Comparable#compareTo |
|
Int |
hashCode()
Compute the hashCode of a point by combining the the coordinates in a multiple/xor chain. |
|
Boolean |
equals(Any other)
Two points of the same rank are equal if and only if their corresponding indices are equal. |
|
Boolean |
operator<(Point that)
Declaration: operator<(that:x10.array.Point{self.rank==this(:x10.array.Point).rank}): x10.lang.Boolean. For points a, b, a < b if a is lexicographically smaller than b . |
|
Boolean |
operator>(Point that)
Declaration: operator>(that:x10.array.Point{self.rank==this(:x10.array.Point).rank}): x10.lang.Boolean. For points a, b , a > b if a is lexicographically bigger than
b . |
|
Boolean |
operator<=(Point that)
Declaration: operator<=(that:x10.array.Point{self.rank==this(:x10.array.Point).rank}): x10.lang.Boolean. For points a, b , a ≤ b if a is lexicographically less than
b or the same as b . |
|
Boolean |
operator>=(Point that)
Declaration: operator>=(that:x10.array.Point{self.rank==this(:x10.array.Point).rank}): x10.lang.Boolean. For points a, b , a ≥ b if a is lexicographically greater than
b or the same as b . |
|
String |
toString()
A point with coordinates i1,..., ik is printed as [i1,.., ik] . |
|
Point |
x10$array$Point$$x10$array$Point$this()
Declaration: x10$array$Point$$x10$array$Point$this(): x10.array.Point{self==this(:x10.array.Point)}. The type Point(rank) represents a point in a
rank-dimensional space. |
Methods inherited from class x10.lang.Object |
---|
equals, hashCode, toString, typeName, x10$lang$Object$$x10$lang$Object$this |
Methods inherited from interface x10.lang. Fun_0_1 |
---|
operator() |
Methods inherited from interface x10.util.Ordered |
---|
operator<, operator>, operator<=, operator>= |
Methods inherited from interface x10.lang.Comparable |
---|
compareTo |
Methods inherited from interface x10.lang.Any |
---|
toString, typeName, equals, hashCode |
Field Detail |
---|
public final Int rank
Method Detail |
---|
public Int operator()(Int i)
public x10.lang. Fun_0_1<Int,Int> coords()
Returns the coordinates as a
(int)=>int
.
public static <T> Point make(Array<T> r)
Constructs a Point from a Array[int](1)
public static Point make(Int rank, x10.lang. Fun_0_1<Int,Int> init)
Returns a
Point p
of rank rank
with p(i)=init(i)
.
public static Point make(Int i0)
public static Point make(Int i0, Int i1)
public static Point make(Int i0, Int i1, Int i2)
public static Point make(Int i0, Int i1, Int i2, Int i3)
public static <T> Point implicit_operator_as(Array<T> a)
A
Array
r
of length k
can be converted to a point p
of the same rank with p(i)=r(i)
.
public Point operator+()
The point
+p
is the same as p
.
public Point operator-()
The point
-p
is the same as p
with each index negated.
public Point operator+(Point that)
The ith coordinate of point
p+q
is p(i)+q(i)
.
public Point operator-(Point that)
The ith coordinate of point
p-q
is p(i)-q(i)
.
public Point operator*(Point that)
The ith coordinate of point
p
q
is p(i)
q(i)
.
public Point operator/(Point that)
The ith coordinate of point
p/q
is p(i)/q(i)
.
public Point operator+(Int c)
The ith coordinate of point
p+c
is p(i)+c
.
public Point operator-(Int c)
The ith coordinate of point
p-c
is p(i)-c
.
public Point operator*(Int c)
The ith coordinate of point
p
c
is p(i)
c
.
public Point operator/(Int c)
The ith coordinate of point
p/c
is p(i)/c
.
public Point inverse_operator+(Int c)
The ith coordinate of point
c+p
is c+p(i)
.
public Point inverse_operator-(Int c)
The ith coordinate of point
c-p
is c-p(i)
.
public Point inverse_operator*(Int c)
The ith coordinate of point
c
p
is c
p(i)
.
public Point inverse_operator/(Int c)
The ith coordinate of point
c/p
is c/p(i)
.
public Int compareTo(Point that)
Comparable#compareTo
public Int hashCode()
public Boolean equals(Any other)
public Boolean operator<(Point that)
For points a, b,
a < b
if a
is lexicographically smaller than b
.
public Boolean operator>(Point that)
For points
a, b
, a > b
if a
is lexicographically bigger than
b
.
public Boolean operator<=(Point that)
For points
a, b
, a ≤ b
if a
is lexicographically less than
b
or the same as b
.
public Boolean operator>=(Point that)
For points
a, b
, a ≥ b
if a
is lexicographically greater than
b
or the same as b
.
public String toString()
i1,..., ik
is printed as [i1,.., ik]
.
public final Point x10$array$Point$$x10$array$Point$this()
The type
Point(rank)
represents a point in a
rank-dimensional space. The coordinates of a point p
may be accessed individually (with zero-based indexing) using
p(i)
because Point
implements
(Int)=>int
. The coordinates may also be accessed as a
Array[int]. Point arithmetic is supported.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |