baobab.bio.permutation
Class SignedComponent

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

public class SignedComponent
extends java.lang.Object

The SignedComponent class represents a component of signed cycles of a signed permutation

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

Method Summary
static java.util.Vector<int[]> blocksToIntArrays(java.util.Collection blocks)
          Transforms the collection of blocks to a collection of arrays of int (with length = 2)
 int compareTo(java.lang.Object object)
          Compares this block to another block
 java.util.SortedSet<Point> getBreakpoints()
          Gets the breakpoint list of this block
 java.util.SortedSet<SignedComponent> getCoveredUnorientedComponents()
          Gets all unoriented components directly covered by this component
 SignedComponent getCovererUnorientedComponent()
          Gets the direct coverer unoriented component of this component
 java.util.SortedSet<Cycle> getCycles()
          Gets the list of cycles of this group of cycles
 Point getEndPoint()
          Gets the end point of this component in the permutation
 int getNumberOfCycles()
          Gets the number of cycles of this group of cycles
 java.util.SortedSet getOrientedCycles()
          Gets the list of oriented cycles of this group of cycles
 Permutation getPermutation()
          Gets the permutation to which this element belongs
 java.util.SortedSet<Point> getPoints()
          Gets all points which belong to this group of cycles
 Point getStartPoint()
          Gets the start point of this component in the permutation
 java.util.SortedSet<Cycle> getUnorientedCycles()
          Gets the list of non-oriented cycles of this group of cycles
 boolean isAdjacency()
          Tests whether this component is an adjacency
 boolean isHurdle()
          Tests whether this component is a hurdle
 boolean isMaxHurdle()
          Tests whether this component is the maximum hurdle
 boolean isOriented()
          Tests whether this cycle group is oriented
 boolean isSuperHurdle()
          Tests whether this component is a super hurdle
 int length()
          Gets the length of the block (the number of values of the permutation between its start and end points)
 void setSuperHurdle()
          Sets this component as super hurdle
 int[] toIntArray()
          Gets a representation of the block as an array of int, with size 2, representing its start and end positions
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getStartPoint

public Point getStartPoint()
Gets the start point of this component in the permutation

Returns:
the start point

getEndPoint

public Point getEndPoint()
Gets the end point of this component in the permutation

Returns:
the end point

isAdjacency

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

Returns:
true/false

isHurdle

public boolean isHurdle()
Tests whether this component is a hurdle

Returns:
true/false

isSuperHurdle

public boolean isSuperHurdle()
Tests whether this component is a super hurdle

Returns:
true/false

setSuperHurdle

public void setSuperHurdle()
Sets this component as super hurdle


getCovererUnorientedComponent

public SignedComponent getCovererUnorientedComponent()
Gets the direct coverer unoriented component of this component

Returns:
the unoriented component which covers this componente

isMaxHurdle

public boolean isMaxHurdle()
Tests whether this component is the maximum hurdle

Returns:
true/false

getCoveredUnorientedComponents

public java.util.SortedSet<SignedComponent> getCoveredUnorientedComponents()
Gets all unoriented components directly covered by this component

Returns:
a SortedSet with the covered unoriented components

toString

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

getBreakpoints

public java.util.SortedSet<Point> getBreakpoints()
Gets the breakpoint list of this block

Returns:
a Collection with the list of breakpoints (each breakpoint is represented by a Point)

getNumberOfCycles

public int getNumberOfCycles()
Gets the number of cycles of this group of cycles

Returns:
the number of cycles

getCycles

public java.util.SortedSet<Cycle> getCycles()
Gets the list of cycles of this group of cycles

Returns:
a Vector with the list of cycles

getOrientedCycles

public java.util.SortedSet getOrientedCycles()
Gets the list of oriented cycles of this group of cycles

Returns:
a Vector with the list of cycles

isOriented

public boolean isOriented()
Tests whether this cycle group is oriented


getPoints

public java.util.SortedSet<Point> getPoints()
Gets all points which belong to this group of cycles

Returns:
a Collection with the list of points

getUnorientedCycles

public java.util.SortedSet<Cycle> getUnorientedCycles()
Gets the list of non-oriented cycles of this group of cycles

Returns:
a Vector with the list of cycles

length

public int length()
Gets the length of the block (the number of values of the permutation between its start and end points)

Returns:
the length

toIntArray

public int[] toIntArray()
Gets a representation of the block as an array of int, with size 2, representing its start and end positions

Returns:
representation of the block as an array of int

compareTo

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

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

blocksToIntArrays

public static java.util.Vector<int[]> blocksToIntArrays(java.util.Collection blocks)
Transforms the collection of blocks to a collection of arrays of int (with length = 2)

Parameters:
blocks - a collection of blocks
Returns:
a collection containing the blocks as arrays of int

getPermutation

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

Returns:
the permutation to which this element belongs