baobab.bio.permutation
Class BPGraphPoint

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

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

The BPGraphPoint class represents a point between two values of a permutation (and dark edges in the corresponding breakpoint graph)

Author:
Marilia D. V. Braga

Method Summary
 int compareTo(java.lang.Object object)
          Compares this point to another point
 BPGraphCycle getCycle()
          Gets the cycle to which this points belongs
 BPGraphCyclePartition getCyclePartition()
          Gets the cycle partition to which this point belongs
 BPGraphPoint[] getNeighbors()
          Gets the neighbors of this point in the breakpoint graph
 BPGraphPoint getNextPoint()
          Gets the point that follows this point in the breakpoint graph
 PermutationBPGraph getPermutationBPGraph()
          Gets the permutation breakpoint graph to which this element belongs
 int getPosition()
          Gets the position of this point in the permutation
 BPGraphPoint getPreviousPoint()
          Gets the point that precedes this point in the breakpoint graph
 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(BPGraphPoint point)
          Tests whether this point is a neighbor of a given point in the breakpoint graph
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getNextPoint

public BPGraphPoint getNextPoint()
Gets the point that follows this point in the breakpoint graph

Returns:
the next point

getPreviousPoint

public BPGraphPoint getPreviousPoint()
Gets the point that precedes this point in the breakpoint graph

Returns:
the next point

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(BPGraphPoint point)
Tests whether this point is a neighbor of a given point in the breakpoint graph

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

getNeighbors

public BPGraphPoint[] getNeighbors()
Gets the neighbors of this point in the breakpoint graph

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 BPGraphCyclePartition getCyclePartition()
Gets the cycle partition to which this point belongs

Returns:
the cycle partition

getCycle

public BPGraphCycle 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

getPermutationBPGraph

public PermutationBPGraph getPermutationBPGraph()
Gets the permutation breakpoint graph to which this element belongs

Returns:
the breakpoint graph to which this element belongs