|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectchoco.kernel.common.util.comparator.Identity
public class Identity
identity permutation.
Field Summary | |
---|---|
static IPermutation |
SINGLETON
|
Method Summary | ||
---|---|---|
int[] |
applyPermutation(int[] source)
apply the permutation to the integer array |
|
|
applyPermutation(List<T> source,
T[] dest)
|
|
|
applyPermutation(T[] source,
T[] dest)
apply the permutation on the source array |
|
int |
getOriginalIndex(int idx)
retu |
|
int |
getPermutationIndex(int idx)
return |
|
boolean |
isIdentity()
|
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final IPermutation SINGLETON
Method Detail |
---|
public int[] applyPermutation(int[] source)
IPermutation
applyPermutation
in interface IPermutation
public <T> void applyPermutation(T[] source, T[] dest)
IPermutation
applyPermutation
in interface IPermutation
source
- the array to be permuteddest
- the permuted arraypublic <T> void applyPermutation(List<T> source, T[] dest)
applyPermutation
in interface IPermutation
public int getOriginalIndex(int idx)
IPermutation
getOriginalIndex
in interface IPermutation
idx
- the permutation index
public int getPermutationIndex(int idx)
IPermutation
getPermutationIndex
in interface IPermutation
idx
- the index in the original order
public boolean isIdentity()
isIdentity
in interface IPermutation
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |