choco.cp.solver.constraints.global.geost.geometricPrim
Class Point

java.lang.Object
  extended by choco.cp.solver.constraints.global.geost.geometricPrim.Point
All Implemented Interfaces:
Serializable

public final class Point
extends Object
implements Serializable

This class represent a k dimensional Point.

See Also:
Serialized Form

Constructor Summary
Point(int dim)
          Creates a point of dimension dim at the origin of the coordinate base.
Point(int[] coordinates)
          Creates a point object from an array of integers.
Point(Point p)
          Creates a point identical to the point given as parameter.
 
Method Summary
 boolean equalTo(Point other)
           
 int getCoord(int index)
           
 int[] getCoords()
           
 boolean lexGreaterThan(Point other, int d)
          Tests whether this point is lexicographically strictly greater than to the other point (passed by parameter).
 boolean lexGreaterThan(Point other, int[] ctrlV)
           
 boolean lexGreaterThanOrEqual(Point other, int d)
          Tests whether this point is lexicographically greater than or equal to the other point (passed by parameter).
 boolean lexLessThan(Point other, int d)
          Tests whether this point is lexicographically strictly smaller than the other point (passed by parameter).
 boolean lexLessThanOrEqual(Point other, int d)
          Tests whether this point is lexicographically smaller than or equal to the other point (passed by parameter).
 void print()
           
 void setCoord(int index, int value)
           
 void setCoords(int[] coordinates)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Point

public Point(int dim)
Creates a point of dimension dim at the origin of the coordinate base.

Parameters:
dim - The dimension of the point object to create

Point

public Point(int[] coordinates)
Creates a point object from an array of integers. The index of the array is actually the dimension number and the value this index holds is the coordinate value of the point at that specified dimension. The length of the array represents the total dimension of the point.

Parameters:
coordinates - An array of integers of length the dimension of the point.

Point

public Point(Point p)
Creates a point identical to the point given as parameter.

Parameters:
p - A point object
Method Detail

print

public void print()

getCoords

public int[] getCoords()

setCoords

public void setCoords(int[] coordinates)

getCoord

public int getCoord(int index)

setCoord

public void setCoord(int index,
                     int value)

lexGreaterThanOrEqual

public boolean lexGreaterThanOrEqual(Point other,
                                     int d)
Tests whether this point is lexicographically greater than or equal to the other point (passed by parameter). The lexicographic ordering starts at dimension d (passed by parameter).


equalTo

public boolean equalTo(Point other)

lexGreaterThan

public boolean lexGreaterThan(Point other,
                              int[] ctrlV)

lexGreaterThan

public boolean lexGreaterThan(Point other,
                              int d)
Tests whether this point is lexicographically strictly greater than to the other point (passed by parameter). The lexicographic ordering starts at dimension d (passed by parameter).


lexLessThanOrEqual

public boolean lexLessThanOrEqual(Point other,
                                  int d)
Tests whether this point is lexicographically smaller than or equal to the other point (passed by parameter). The lexicographic ordering starts at dimension d (passed by parameter).


lexLessThan

public boolean lexLessThan(Point other,
                           int d)
Tests whether this point is lexicographically strictly smaller than the other point (passed by parameter). The lexicographic ordering starts at dimension d (passed by parameter).


toString

public String toString()
Overrides:
toString in class Object


Copyright © 2012. All Rights Reserved.