|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbaobab.bio.permutation.ReversalBlock
baobab.bio.permutation.TranspositionBlock
public class TranspositionBlock
The TranspositionBlock class represents an elementary block of a permutation, given by its start, middle and end points, which can be used as the breakpoints of a transposition
Constructor Summary | |
---|---|
TranspositionBlock(Permutation permutation,
int start,
int middle,
int end)
Creates a new block |
|
TranspositionBlock(Permutation permutation,
Point start,
Point middle,
Point end)
Creates a new block |
Method Summary | |
---|---|
int |
compareTo(java.lang.Object object)
Compares this block to another block |
Point |
getMiddlePoint()
Gets the middle point of this block |
int |
getMiddlePosition()
Gets the middle point of this block |
Permutation |
getPermutation()
Gets the permutation to which this element belongs |
int[] |
toIntArray()
Gets a representation of the block as an array of int, with size 3, representing its start, middle and end positions |
Methods inherited from class baobab.bio.permutation.ReversalBlock |
---|
getEndPoint, getEndPosition, getStartPoint, getStartPosition, isAdjacency, length, toString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TranspositionBlock(Permutation permutation, Point start, Point middle, 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 TranspositionBlock(Permutation permutation, int start, int middle, int end)
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 permutationMethod Detail |
---|
public Point getMiddlePoint()
public int getMiddlePosition()
public int[] toIntArray()
public int compareTo(java.lang.Object object)
compareTo
in interface java.lang.Comparable
compareTo
in class ReversalBlock
object
- the other block
public Permutation getPermutation()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |