|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbaobab.bio.permutation.SignedPermutation
public class SignedPermutation
The SignedPermutation class represents a signed permutation and its brekpoint graph (the SignedPermutation class does not deal with hurdles)
Constructor Summary | |
---|---|
SignedPermutation(int[] permutationList)
Creates a new linear permutation (assumes the identity permutation as target) |
|
SignedPermutation(int[] permutationList,
boolean isLinear)
Creates a new permutation (assumes the identity permutation as target) |
|
SignedPermutation(int[] originList,
int[] targetList)
Creates a new linear permutation |
|
SignedPermutation(int[] originList,
int[] targetList,
boolean isLinear)
Creates a new permutation |
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) |
java.lang.Object |
clone()
|
int |
compareTo(java.lang.Object object)
Compares this block to another block |
boolean |
equals(SignedPermutation perm)
|
java.util.SortedSet<Point> |
getBreakpoints()
Gets the breakpoint list of this block |
java.util.SortedSet<Cycle> |
getCycles()
Gets the list of cycles of this group of cycles |
java.lang.String |
getData()
|
Point |
getEndPoint()
Gets the end point of the permutation |
int |
getEndPointIndex()
|
PermutationFormatter |
getFormatter()
|
int[] |
getMappedPositions()
|
int |
getMappedValueOf(int pos)
Gets the value of the mapped element located at a specified position of the permutation |
int[] |
getMappedValues()
|
int |
getMinimalReversalDistance()
Gets the minimal reversal distance of this permutation (considering only the number of cycles property) |
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 this permutation |
Point |
getPointAt(int pos)
Gets a point at a specific position of the permutation |
java.util.SortedSet<Point> |
getPoints()
Gets all points which belong to this group of cycles |
int |
getPositionOf(int value)
Gets the position where a specified element of the permutation is located |
int |
getPositionOfMapped(int value)
Gets the position where a specified mapped element of the permutation is located |
int |
getReversalDistance()
Gets the reversal distance of this permutation |
SignedPermutationReversalFilter |
getReversalFilter()
|
Point |
getStartPoint()
Gets the start point of the permutation |
java.util.SortedSet<Cycle> |
getUnorientedCycles()
Gets the list of non-oriented cycles of this group of cycles |
int |
getValueOf(int pos)
Gets the value of the element located at a specified position of the permutation |
boolean |
isAdjacency()
Tests whether this permutation is sorted |
boolean |
isLinear()
Tests whether the permutation is linear or circular |
boolean |
isOriented()
Tests whether this cycle group is oriented |
boolean |
isSorted()
Tests whether this permutation is sorted |
int |
length()
Gets the length of the block (the number of values of the permutation between its start and end points) |
SignedPermutation |
revert(int start,
int end)
Reverts the permutation between the specified positions |
SignedPermutation |
revert(Point start,
Point end)
Reverts the permutation between the specified points |
SignedPermutation |
revertToNewPermutation(int start,
int end)
Make a new permutation, by reverting the permutation between the specified positions |
SignedPermutation |
revertToNewPermutation(Point start,
Point end)
Make a new permutation, by reverting the permutation between the specified positions |
int |
size()
Gets the size (or the number of elements) of the permutation |
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 |
Methods inherited from interface baobab.bio.permutation.Permutation |
---|
getNumberOfCycles |
Constructor Detail |
---|
public SignedPermutation(int[] permutationList)
permutationList
- the list of signed integers (from +/-1 to +/-n), as an array of intpublic SignedPermutation(int[] permutationList, boolean isLinear)
permutationList
- the list of signed integers (from +/-1 to +/-n), as an array of intisLinear
- indicates whether the permutation is linear or circularpublic SignedPermutation(int[] originList, int[] targetList)
originList
- the origin list of signed integers (from +/-1 to +/-n), as an array of inttargetList
- the target list of signed integers (from +/-1 to +/-n), as an array of intpublic SignedPermutation(int[] originList, int[] targetList, boolean isLinear)
originList
- the origin list of signed integers (from +/-1 to +/-n), as an array of inttargetList
- the target list of signed integers (from +/-1 to +/-n), as an array of intisLinear
- indicates whether the permutation is linear or circularMethod Detail |
---|
public boolean isLinear()
isLinear
in interface Permutation
public Point getStartPoint()
public int getEndPointIndex()
public Point getEndPoint()
public Permutation getPermutation()
public int[] getMappedValues()
public int[] getMappedPositions()
public int getMinimalReversalDistance()
public int getReversalDistance()
public int size()
size
in interface Permutation
public Point getPointAt(int pos)
getPointAt
in interface Permutation
pos
- the given position
public int getMappedValueOf(int pos)
getMappedValueOf
in interface Permutation
pos
- the specified position
public int getValueOf(int pos)
getValueOf
in interface Permutation
pos
- the specified position
public int getPositionOf(int value)
getPositionOf
in interface Permutation
value
- the value of the specified element
public int getPositionOfMapped(int value)
getPositionOfMapped
in interface Permutation
value
- the value of the specified mapped element
public SignedPermutation revert(Point start, Point end) throws PermutationException
start
- the beginning of the reversion blockend
- the end of the reversion block
PermutationException
public SignedPermutation revert(int start, int end)
start
- the beginning of the reversion blockend
- the end of the reversion block
public SignedPermutation revertToNewPermutation(Point start, Point end) throws PermutationException
start
- the beginning of the reversion blockend
- the end of the reversion block
PermutationException
public SignedPermutation revertToNewPermutation(int start, int end)
start
- the beginning of the reversion blockend
- the end of the reversion block
public boolean isAdjacency()
public boolean isSorted()
isSorted
in interface Permutation
public SignedPermutationReversalFilter getReversalFilter()
public java.lang.Object clone()
clone
in class java.lang.Object
public boolean equals(SignedPermutation perm)
public PermutationFormatter getFormatter()
getFormatter
in interface Permutation
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getData()
public java.util.SortedSet<Point> getBreakpoints()
public int getNumberOfCycles()
public java.util.SortedSet<Cycle> getCycles()
public java.util.SortedSet getOrientedCycles()
public boolean isOriented()
public java.util.SortedSet<Point> getPoints()
public java.util.SortedSet<Cycle> getUnorientedCycles()
public int length()
public int[] toIntArray()
public int compareTo(java.lang.Object object)
compareTo
in interface java.lang.Comparable
object
- the other block
public static java.util.Vector<int[]> blocksToIntArrays(java.util.Collection blocks)
blocks
- a collection of blocks
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |