public class IntPermutation extends Object implements Serializable
| Constructor and Description |
|---|
IntPermutation(int len) |
IntPermutation(int[] permutation)
Builds permutation object using given array
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
List<Set<Integer>> |
findCycles() |
int[] |
getArray() |
IntPermutation |
getInversePermutation()
Generates inverse permutation
|
int |
getMax() |
int |
getMin() |
boolean |
isConsistentWith(IntPermutation perm)
Checks if the object is consistent with given permutation
|
IntPermutation |
productPermutation(IntPermutation perm)
Computes product(composition) of permuataions this * perm
According to:
Biggs, Norman L.; White, A.
|
void |
shufflePermutation(int seed) |
String |
toString() |
public IntPermutation(int[] permutation)
throws IllegalArgumentException
permutation - IllegalArgumentExceptionpublic IntPermutation(int len)
throws IllegalArgumentException
IllegalArgumentExceptionpublic int[] getArray()
public int getMin()
public int getMax()
public boolean isConsistentWith(IntPermutation perm)
perm - public IntPermutation productPermutation(IntPermutation perm) throws IllegalArgumentException
product - IllegalArgumentExceptionpublic IntPermutation getInversePermutation()
public void shufflePermutation(int seed)
Copyright © 2020. All rights reserved.