|
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.Cubes
public class Cubes
This class provides static utility methods for Cube objects.
| Method Summary | |
|---|---|
static Cube |
create(int layerCount)
Creates a cube with the specified layer count. |
static int |
getFaceOfSticker(CubeAttributes attr,
int stickerIndex)
|
static int[][] |
getMappedStickers(Cube cube,
int[] mappings)
Returns the stickers reflecting the current permutation of the cube. |
static int[][] |
getMappedStickers(Cube cube,
int[][] mappings)
Returns the stickers reflecting the current permutation of the cube. |
static int |
getOrder(Cube cube)
Returns a number that describes the order of the permutation of the supplied cube. |
static int |
getVisibleOrder(Cube cube)
Returns a number that describes the order of the permutation of the supplied cube, assuming that all stickers only have a solid color, and that all stickers on the same face have the same color. |
static void |
setToStickers(Cube cube,
int[] stickers)
Sets the cube to the specified stickers. |
static java.lang.String |
toCornerPermutationString(Cube cube)
|
static java.lang.String |
toCornerPermutationString(Cube cube,
Notation notation)
|
static java.lang.String |
toEdgePermutationString(Cube cube)
|
static java.lang.String |
toEdgePermutationString(Cube cube,
Notation notation)
|
static java.lang.String |
toMappedStickersString(Cube cube,
int[] mappings)
Returns a String that describes the current location of the stickers. |
static java.lang.String |
toNormalizedStickersString(Cube cube)
Returns a String that describes the current location of the stickers. |
static java.lang.String |
toPermutationString(Cube cube)
|
static java.lang.String |
toPermutationString(Cube cube,
Notation notation)
|
static java.lang.String |
toSidePermutationString(Cube cube)
|
static java.lang.String |
toSidePermutationString(Cube cube,
Notation notation)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static Cube create(int layerCount)
public static int getOrder(Cube cube)
The order says how many times the permutation has to be applied to the cube to get the initial state.
cube - A cube
public static int getVisibleOrder(Cube cube)
On a cube with such stickers, we can not visually determine the orientation of its side parts, and we can not visually determine a permutation of side parts of which all side parts are on the same face of the cube.
The order says how many times the permutation has to be applied to the cube to get the initial state.
cube - A cube
public static java.lang.String toNormalizedStickersString(Cube cube)
public static java.lang.String toMappedStickersString(Cube cube,
int[] mappings)
public static int[][] getMappedStickers(Cube cube,
int[] mappings)
mappings - An array with sticker mappings. It must have the
same structure as described for method setStickers().
public static int[][] getMappedStickers(Cube cube,
int[][] mappings)
mappings - An array with sticker mappings. It must have the
same structure as described for method setStickers().
public static int getFaceOfSticker(CubeAttributes attr,
int stickerIndex)
public static java.lang.String toPermutationString(Cube cube)
public static java.lang.String toPermutationString(Cube cube,
Notation notation)
public static java.lang.String toCornerPermutationString(Cube cube,
Notation notation)
public static java.lang.String toCornerPermutationString(Cube cube)
public static java.lang.String toEdgePermutationString(Cube cube,
Notation notation)
public static java.lang.String toEdgePermutationString(Cube cube)
public static java.lang.String toSidePermutationString(Cube cube,
Notation notation)
public static java.lang.String toSidePermutationString(Cube cube)
public static void setToStickers(Cube cube,
int[] stickers)
|
(c) Werner Randelshofer. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||