|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbaobab.bio.permutation.ReversalBlock
public class ReversalBlock
The ReversalBlock class represents an elementary block of a permutation, given by its start and end points, which can be used as the breakpoints of a reversal
Constructor Summary | |
---|---|
ReversalBlock(Permutation permutation,
int start,
int end)
Creates a new block |
|
ReversalBlock(Permutation permutation,
Point start,
Point end)
Creates a new block |
Method Summary | |
---|---|
int |
compareTo(java.lang.Object object)
Compares this block to another block |
Point |
getEndPoint()
Gets the end point of this block in the permutation |
int |
getEndPosition()
Gets the end position of this block in the permutation |
Permutation |
getPermutation()
Gets the permutation to which this element belongs |
Point |
getStartPoint()
Gets the start point of this block in the permutation |
int |
getStartPosition()
Gets the start position of this block in the permutation |
boolean |
isAdjacency()
Tests whether this block is an adjacency |
int |
length()
Gets the length of the block (the number of values of the permutation between its start and end points) |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ReversalBlock(Permutation permutation, Point start, Point end) throws PermutationException
permutation
- the permutation to which this block belongsstart
- the start Point of this block in the permutationend
- the end Point of this block in the permutation
PermutationException
public ReversalBlock(Permutation permutation, int start, int end)
permutation
- the permutation to which this block belongsstart
- the start position of this block in the permutationend
- the end position of this block in the permutationMethod Detail |
---|
public int length()
public boolean isAdjacency()
public Point getStartPoint()
public Point getEndPoint()
public int getStartPosition()
public int getEndPosition()
public java.lang.String toString()
toString
in class java.lang.Object
public int compareTo(java.lang.Object object)
compareTo
in interface java.lang.Comparable
object
- the other block
public Permutation getPermutation()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |