|
CubeTwister 2.0alpha142 2012-02-11 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectch.randelshofer.rubik.solver.Combinatorials
public class Combinatorials
Combinatorial algorithms. This class has been derived from Combinat.cpp and Combinat.h from the 'Kociemba Cube Solver 1.0' (KCube) (c) Greg Schmidt.
| Constructor Summary | |
|---|---|
Combinatorials()
|
|
| Method Summary | |
|---|---|
static int |
NChooseM(int N,
int M)
N Choose M - Compute the number of ways a subset of N items can be selected from a set of M items. |
static void |
ordinalToPermutation(int ordinal,
int[] vector,
int off,
int len,
int offset)
OrdinalToPermutation - Given an ordinal in the range (0,...n!-1) compute a unique permutation of n items. |
static int |
permutationToOrdinal(int[] vector,
int off,
int len)
The following pair of permutation algorithms are based on a description in Knuth's "Fundamental Algorithms Volume 2: Seminumerical Algorithms" p64. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Combinatorials()
| Method Detail |
|---|
public static int NChooseM(int N,
int M)
public static int permutationToOrdinal(int[] vector,
int off,
int len)
public static void ordinalToPermutation(int ordinal,
int[] vector,
int off,
int len,
int offset)
|
(c) Werner Randelshofer. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||