choco.kernel.common.util.comparator
Interface IPermutation

All Known Implementing Classes:
AbstractSortingPermutation, ConstantPermutation, Identity, IntPermutation

public interface IPermutation

Modelize a sorting permutation of a set.

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

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()
           
 

Method Detail

applyPermutation

<T> void applyPermutation(T[] source,
                          T[] dest)
apply the permutation on the source array

Parameters:
source - the array to be permuted
dest - the permuted array

applyPermutation

<T> void applyPermutation(List<T> source,
                          T[] dest)

applyPermutation

int[] applyPermutation(int[] source)
apply the permutation to the integer array

Returns:
the permuted array

getOriginalIndex

int getOriginalIndex(int idx)
retu

Parameters:
idx - the permutation index
Returns:
the index in the original order

getPermutationIndex

int getPermutationIndex(int idx)
return

Parameters:
idx - the index in the original order
Returns:
the index in the permutation

isIdentity

boolean isIdentity()


Copyright © 2012. All Rights Reserved.