public class ChiralPermutations extends Object
Modifier and Type | Field and Description |
---|---|
static int[] |
basic4Permutation |
Constructor and Description |
---|
ChiralPermutations() |
Modifier and Type | Method and Description |
---|---|
static int |
getNumOfPairSwitches(int[] permutation1,
int[] permutation2)
Calculates the number of pair switches needed to obtain
permutation2 starting from permutation1
The number is not unique (since various paths are possible),
but the parity (even/odd) of the switches number must always be the same
|
static int |
getPos(int value,
int[] array) |
static void |
move(int startPos,
int endPos,
int[] array) |
static String |
permutationToString(int[] p) |
static void |
switchPos(int pos1,
int pos2,
int[] array) |
public static int getNumOfPairSwitches(int[] permutation1, int[] permutation2)
permutation1
- permutation2
- public static void switchPos(int pos1, int pos2, int[] array)
public static int getPos(int value, int[] array)
public static void move(int startPos, int endPos, int[] array)
public static String permutationToString(int[] p)
Copyright © 2004–2020 Ideaconsult Ltd.. All rights reserved.