baobab.bio.permutation
Class SignedReversalBlock
java.lang.Object
baobab.bio.permutation.ReversalBlock
baobab.bio.permutation.SignedReversalBlock
- All Implemented Interfaces:
- java.lang.Comparable
public class SignedReversalBlock
- extends ReversalBlock
The SignedReversalBlock class represents an elementary block of a signed permutation,
given by its start and end points, which can be used as the breakpoints of a signed reversal
- Version:
- 1.0, May 2006
- Author:
- Marilia D. V. Braga
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
SPLIT_CYCLE
public static final int SPLIT_CYCLE
- See Also:
- Constant Field Values
KEEP_CYCLE
public static final int KEEP_CYCLE
- See Also:
- Constant Field Values
JOIN_CYCLES
public static final int JOIN_CYCLES
- See Also:
- Constant Field Values
SignedReversalBlock
public SignedReversalBlock(SignedPermutation permutation,
Point start,
Point end)
throws PermutationException
- Creates a new block
- Parameters:
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
- Throws:
PermutationException
SignedReversalBlock
public SignedReversalBlock(SignedPermutation permutation,
int start,
int end)
- Creates a new block
- Parameters:
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 permutation
getReversalType
public int getReversalType()
- Gets the type of the reversal represented by this block
- Returns:
- SPLIT_CYCLE, KEEP_CYCLE or JOIN_CYCLES as an int
toString
public java.lang.String toString()
- Overrides:
toString
in class ReversalBlock
getPermutation
public Permutation getPermutation()
- Gets the permutation to which this element belongs
- Returns:
- the permutation to which this element belongs