choco.kernel.common.util.comparator
Class Identity

java.lang.Object
  extended by choco.kernel.common.util.comparator.Identity
All Implemented Interfaces:
IPermutation

public class Identity
extends Object
implements IPermutation

identity permutation.

Since:
4 déc. 2008 version 2.0.1
Version:
2.0.1
Author:
Arnaud Malapert

Field Summary
static IPermutation SINGLETON
           
 
Method Summary
 int[] applyPermutation(int[] source)
          apply the permutation to the integer array
<T> void
applyPermutation(List<T> source, T[] dest)
           
<T> void
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

SINGLETON

public static final IPermutation SINGLETON
Method Detail

applyPermutation

public int[] applyPermutation(int[] source)
Description copied from interface: IPermutation
apply the permutation to the integer array

Specified by:
applyPermutation in interface IPermutation
Returns:
the permuted array

applyPermutation

public <T> void applyPermutation(T[] source,
                                 T[] dest)
Description copied from interface: IPermutation
apply the permutation on the source array

Specified by:
applyPermutation in interface IPermutation
Parameters:
source - the array to be permuted
dest - the permuted array

applyPermutation

public <T> void applyPermutation(List<T> source,
                                 T[] dest)
Specified by:
applyPermutation in interface IPermutation

getOriginalIndex

public int getOriginalIndex(int idx)
Description copied from interface: IPermutation
retu

Specified by:
getOriginalIndex in interface IPermutation
Parameters:
idx - the permutation index
Returns:
the index in the original order

getPermutationIndex

public int getPermutationIndex(int idx)
Description copied from interface: IPermutation
return

Specified by:
getPermutationIndex in interface IPermutation
Parameters:
idx - the index in the original order
Returns:
the index in the permutation

isIdentity

public boolean isIdentity()
Specified by:
isIdentity in interface IPermutation

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2012. All Rights Reserved.