public class CommandGraph extends Object
Modifier and Type | Field and Description |
---|---|
static int |
COMMAND |
protected boolean |
dropsOnly |
protected static ThreadLocal<boolean[]> |
enqueued |
protected Field |
field |
static int |
NULL_COMMAND |
static int |
NULL_ORIGIN |
static int |
ORIGIN |
static int |
PATH_LENGTH |
protected static ThreadLocal<int[]> |
pending |
protected int |
pendingHead |
protected int |
pendingTail |
protected int |
selectedShape |
protected int |
start |
protected int |
typeMask |
protected int[] |
vertices |
Constructor and Description |
---|
CommandGraph(Field field,
int start,
boolean dropsOnly) |
Modifier and Type | Method and Description |
---|---|
static Command |
commandOf(int[] vertices,
int shape) |
Field |
getField() |
int |
getSelectedShape() |
int |
getStart() |
int[] |
getVertices() |
boolean |
isDropsOnly() |
protected void |
maybeUpdate(int shape,
int origin,
Command command,
int pathLength,
Field f) |
static int |
originOf(int[] vertices,
int shape) |
static int |
pathLengthOf(int[] vertices,
int shape) |
protected void |
search(int shape,
Field f) |
protected void |
searchRoot(int shape,
Field f) |
protected void |
searchRotateLeft(int shape,
Field f) |
protected void |
searchRotateRight(int shape,
Field f) |
protected void |
searchShiftDown(int shape,
Field f) |
protected void |
searchShiftLeft(int shape,
Field f) |
protected void |
searchShiftRight(int shape,
Field f) |
void |
setSelectedShape(int selectedShape) |
protected void |
setVertex(int shape,
int origin,
int command,
int pathLength) |
public static final int ORIGIN
public static final int COMMAND
public static final int PATH_LENGTH
public static final int NULL_ORIGIN
public static final int NULL_COMMAND
protected static ThreadLocal<int[]> pending
protected static ThreadLocal<boolean[]> enqueued
protected int typeMask
protected int[] vertices
protected int pendingHead
protected int pendingTail
protected int selectedShape
protected boolean dropsOnly
protected int start
protected Field field
public CommandGraph(Field field, int start, boolean dropsOnly)
public static int originOf(int[] vertices, int shape)
public static Command commandOf(int[] vertices, int shape)
public static int pathLengthOf(int[] vertices, int shape)
protected void setVertex(int shape, int origin, int command, int pathLength)
protected void searchRoot(int shape, Field f)
protected void maybeUpdate(int shape, int origin, Command command, int pathLength, Field f)
protected void search(int shape, Field f)
protected void searchRotateLeft(int shape, Field f)
protected void searchRotateRight(int shape, Field f)
protected void searchShiftLeft(int shape, Field f)
protected void searchShiftRight(int shape, Field f)
protected void searchShiftDown(int shape, Field f)
public int[] getVertices()
public int getSelectedShape()
public void setSelectedShape(int selectedShape)
public boolean isDropsOnly()
public int getStart()
public Field getField()
Copyright © 2015. All rights reserved.