public class PebblingNumberForkJoinTask
extends java.util.concurrent.RecursiveTask<java.lang.Integer>
Modifier and Type | Field and Description |
---|---|
long |
numberMovesMade |
Constructor and Description |
---|
PebblingNumberForkJoinTask(int startIndex,
int numPebbles,
int[] config,
PebbleInstance puz,
int pebNumBound) |
PebblingNumberForkJoinTask(int startIndex,
int numPebbles,
int[] config,
PebbleInstance puz,
int pebNumBound,
java.util.concurrent.atomic.AtomicBoolean quitRequested)
This version of the constructor is used so that it passes the same quitRequested boolean object to all of the
tasks that are part of this computation.
|
PebblingNumberForkJoinTask(int startIndex,
int numPebbles,
int[] config,
PebbleInstance puz,
int pebNumBound,
int root)
Use this for rooted pebbling number.
|
PebblingNumberForkJoinTask(int startIndex,
int numPebbles,
int[] config,
PebbleInstance puz,
int pebNumBound,
int root,
java.util.concurrent.atomic.AtomicBoolean quitRequested)
Use this constructor to do rooted pebbling number.
|
Modifier and Type | Method and Description |
---|---|
void |
requestQuit() |
adapt, adapt, adapt, cancel, compareAndSetForkJoinTaskTag, complete, completeExceptionally, fork, get, get, getException, getForkJoinTaskTag, getPool, getQueuedTaskCount, getSurplusQueuedTaskCount, helpQuiesce, inForkJoinPool, invoke, invokeAll, invokeAll, invokeAll, isCancelled, isCompletedAbnormally, isCompletedNormally, isDone, join, quietlyComplete, quietlyInvoke, quietlyJoin, reinitialize, setForkJoinTaskTag, tryUnfork
public PebblingNumberForkJoinTask(int startIndex, int numPebbles, int[] config, PebbleInstance puz, int pebNumBound, java.util.concurrent.atomic.AtomicBoolean quitRequested)
startIndex
- numPebbles
- config
- puz
- quitRequested
- public PebblingNumberForkJoinTask(int startIndex, int numPebbles, int[] config, PebbleInstance puz, int pebNumBound, int root, java.util.concurrent.atomic.AtomicBoolean quitRequested)
startIndex
- numPebbles
- config
- puz
- pebNumBound
- root
- quitRequested
- public PebblingNumberForkJoinTask(int startIndex, int numPebbles, int[] config, PebbleInstance puz, int pebNumBound)
startIndex
- The first index at which to place pebbles.numPebbles
- The number of pebbles in the starting configuration (quicker to keep track than recompute).config
- The starting configuration. This array will be copied (For the sake of concurrency).puz
- It is assumed that this puzzle has no pebbles (for the sake of efficiency).public PebblingNumberForkJoinTask(int startIndex, int numPebbles, int[] config, PebbleInstance puz, int pebNumBound, int root)
startIndex
- numPebbles
- config
- puz
- pebNumBound
- root
-