baobab.bio.permutation
Class Point

java.lang.Object
  extended by baobab.bio.permutation.Point
All Implemented Interfaces:
java.lang.Comparable

public class Point
extends java.lang.Object
implements java.lang.Comparable

The Point class represents a point between two values of a permutation

Version:
1.0, May 2006
Author:
Marilia D. V. Braga

Method Summary
 int compareTo(java.lang.Object object)
          Compares this point to another point
 Cycle getCycle()
          Gets the cycle to which this points belongs
 CyclePartition getCyclePartition()
          Gets the cycle partition to which this point belongs
 Point[] getNeighbors()
          Gets the neighbors of this point in the permutation
 Point getNextPoint()
           
 Permutation getPermutation()
          Gets the permutation to which this element belongs
 int getPosition()
          Gets the position of this point in the permutation
 Point getPreviousPoint()
           
 boolean isAdjacency()
          Tests whether this point is an adjacency
 boolean isAnalyzed()
          Tests whether this point is already analyzed (belongs to an active cycle)
 boolean isNeighborOf(Point point)
          Tests whether this point is a neighbor of a given point
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getNextPoint

public Point getNextPoint()

getPreviousPoint

public Point getPreviousPoint()

isAdjacency

public boolean isAdjacency()
Tests whether this point is an adjacency

Returns:
true/false

getPosition

public int getPosition()
Gets the position of this point in the permutation

Returns:
position of this point

isNeighborOf

public boolean isNeighborOf(Point point)
Tests whether this point is a neighbor of a given point

Parameters:
point - the given point
Returns:
true/ false

getNeighbors

public Point[] getNeighbors()
Gets the neighbors of this point in the permutation

Returns:
the next point

isAnalyzed

public boolean isAnalyzed()
Tests whether this point is already analyzed (belongs to an active cycle)

Returns:
true/false

compareTo

public int compareTo(java.lang.Object object)
Compares this point to another point

Specified by:
compareTo in interface java.lang.Comparable
Parameters:
object - the other point
Returns:
the result of the comparison, as an int

getCyclePartition

public CyclePartition getCyclePartition()
Gets the cycle partition to which this point belongs

Returns:
the cycle partition

getCycle

public Cycle getCycle()
Gets the cycle to which this points belongs

Returns:
the cycle

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getPermutation

public Permutation getPermutation()
Gets the permutation to which this element belongs

Returns:
the permutation to which this element belongs