public abstract class AbstractAStarThreadNoModelMoves<H extends nl.tue.astar.Head,T extends nl.tue.astar.Tail> extends java.lang.Object implements ObservableAStarThread<H,T>
Modifier and Type | Class and Description |
---|---|
static class |
AbstractAStarThreadNoModelMoves.QueueingModel |
static interface |
AbstractAStarThreadNoModelMoves.StorageHandler<H extends nl.tue.astar.Head,T extends nl.tue.astar.Tail>
The storageHandler handles the storing and retrieving of elements from
the statespace searched by the AStar algorithm
|
AStarThread.ASynchronousMoveSorting, AStarThread.Canceller, AStarThread.CPUEfficient<H extends nl.tue.astar.Head,T extends nl.tue.astar.Tail>, AStarThread.MemoryEfficient<H extends nl.tue.astar.Head,T extends nl.tue.astar.Tail>, AStarThread.Type
Modifier and Type | Field and Description |
---|---|
protected int |
computedEstimateCount |
protected gnu.trove.set.TLongSet |
considered |
protected nl.tue.astar.Delegate<H,T> |
delegate |
protected double |
epsilon |
protected double |
expectedLength |
protected static int |
i |
protected int |
maxStates |
protected java.util.List<nl.tue.astar.AStarObserver> |
observers |
protected AbstractPDelegate<T> |
pDelegate |
protected int |
poll |
protected nl.tue.astar.util.FastLookupPriorityQueue |
queue |
protected int |
queuedStateCount |
protected boolean |
reliable |
protected AStarThread.ASynchronousMoveSorting |
sorting |
protected AbstractAStarThreadNoModelMoves.StorageHandler<H,T> |
storageHandler |
protected nl.tue.astar.Trace |
trace |
protected int |
traversedArcCount |
protected AStarThread.Type |
type |
ESTIMATEIRRELEVANT
NOMOVE
Constructor and Description |
---|
AbstractAStarThreadNoModelMoves(nl.tue.astar.Delegate<H,T> delegate,
nl.tue.astar.Trace trace,
int maxStates,
AbstractAStarThreadNoModelMoves.StorageHandler<H,T> storageHandler)
any implementation should, after calling this constructor, call
initializeQueue(initialHead);
|
Modifier and Type | Method and Description |
---|---|
void |
addObserver(nl.tue.astar.AStarObserver observer) |
protected T |
computeNewTail(nl.tue.astar.Record newRec,
T tail,
H newHead,
int modelMove,
int movedEvent,
int activity) |
protected H |
computeNextHead(nl.tue.astar.Record rec,
H head,
int modelMove,
int movedEvent,
int activity) |
nl.tue.astar.Delegate<H,T> |
getDelegate()
returns the delegate used for determining the possible moves during
replay.
|
nl.tue.astar.Record |
getOptimalRecord(AStarThread.Canceller c)
Returns a Record for an optimal alignment.
|
nl.tue.astar.Record |
getOptimalRecord(AStarThread.Canceller c,
double timeLimit) |
nl.tue.astar.Record |
getOptimalRecord(AStarThread.Canceller c,
int stopAt)
Returns a Record for an optimal alignment.
|
nl.tue.astar.Record |
getOptimalRecord(AStarThread.Canceller c,
int stopAt,
double timeLimit)
gets the optimal record.
|
boolean |
getPreferBreadth() |
int |
getQueuedStateCount()
Returns the number of nodes queueud.
|
AStarThread.ASynchronousMoveSorting |
getSorting() |
nl.tue.astar.Trace |
getTrace()
Returns the trace for which this AStarThread was instantiated.
|
AStarThread.Type |
getType()
Returns the type of AStar used
|
int |
getVisitedStateCount()
Returns the number of visited states.
|
protected void |
initializeQueue(H head) |
protected boolean |
isValidMoveOnLog(nl.tue.astar.Record rec,
int nextEvent,
int activity,
gnu.trove.list.TIntList modelMoves,
gnu.trove.list.TIntList syncMoves) |
protected boolean |
isValidMoveOnModel(nl.tue.astar.Record rec,
gnu.trove.TIntCollection nextEvents,
int activity,
gnu.trove.list.TIntList modelMoves) |
protected nl.tue.astar.Record |
poll() |
protected void |
processMove(H head,
T tail,
nl.tue.astar.Record rec,
int modelMove,
int movedEvent,
int activity) |
protected void |
processMovesForRecord(nl.tue.astar.Record rec,
H head,
T tail,
int stopAt,
double timeLimit,
long endTime) |
protected void |
processMovesForRecordWithUpToDateTail(nl.tue.astar.Record rec,
H head,
T tail,
int stopAt,
double timeLimit,
long endTime) |
void |
removeObserver(nl.tue.astar.AStarObserver observer) |
void |
setASynchronousMoveSorting(AStarThread.ASynchronousMoveSorting sorting)
When aligning a trace with a model, any moves between two synchronous
moves can be sorted.
|
protected void |
setConsidered(nl.tue.astar.Record record) |
void |
setEpsilon(double epsilon)
Set epsilon for the weighted variants of A Star
|
void |
setQueue(nl.tue.astar.util.FastLookupPriorityQueue newQueue) |
void |
setQueueingModel(AbstractAStarThreadNoModelMoves.QueueingModel model) |
void |
setType(AStarThread.Type type)
Sets the type of the AStar algorithm.
|
java.lang.String |
toString() |
boolean |
wasReliable()
After a call to run(), this method returns true if the returned Record
yields the optimal result.
|
protected nl.tue.astar.util.FastLookupPriorityQueue queue
protected final nl.tue.astar.Trace trace
protected final int maxStates
protected int queuedStateCount
protected int traversedArcCount
protected int computedEstimateCount
protected final nl.tue.astar.Delegate<H extends nl.tue.astar.Head,T extends nl.tue.astar.Tail> delegate
protected final AbstractPDelegate<T extends nl.tue.astar.Tail> pDelegate
protected int poll
protected static int i
protected AStarThread.ASynchronousMoveSorting sorting
protected boolean reliable
protected final gnu.trove.set.TLongSet considered
protected java.util.List<nl.tue.astar.AStarObserver> observers
protected final AbstractAStarThreadNoModelMoves.StorageHandler<H extends nl.tue.astar.Head,T extends nl.tue.astar.Tail> storageHandler
protected AStarThread.Type type
protected double epsilon
protected double expectedLength
public AbstractAStarThreadNoModelMoves(nl.tue.astar.Delegate<H,T> delegate, nl.tue.astar.Trace trace, int maxStates, AbstractAStarThreadNoModelMoves.StorageHandler<H,T> storageHandler)
delegate
- trace
- maxStates
- storageHandler
- public nl.tue.astar.Trace getTrace()
AStarThread
getTrace
in interface AStarThread<H extends nl.tue.astar.Head,T extends nl.tue.astar.Tail>
public nl.tue.astar.Delegate<H,T> getDelegate()
AStarThread
getDelegate
in interface AStarThread<H extends nl.tue.astar.Head,T extends nl.tue.astar.Tail>
public void setQueueingModel(AbstractAStarThreadNoModelMoves.QueueingModel model)
public void setQueue(nl.tue.astar.util.FastLookupPriorityQueue newQueue)
public void addObserver(nl.tue.astar.AStarObserver observer)
addObserver
in interface ObservableAStarThread<H extends nl.tue.astar.Head,T extends nl.tue.astar.Tail>
public void removeObserver(nl.tue.astar.AStarObserver observer)
removeObserver
in interface ObservableAStarThread<H extends nl.tue.astar.Head,T extends nl.tue.astar.Tail>
public boolean getPreferBreadth()
public void setASynchronousMoveSorting(AStarThread.ASynchronousMoveSorting sorting)
AStarThread
setASynchronousMoveSorting
in interface AStarThread<H extends nl.tue.astar.Head,T extends nl.tue.astar.Tail>
public AStarThread.ASynchronousMoveSorting getSorting()
getSorting
in interface AStarThread<H extends nl.tue.astar.Head,T extends nl.tue.astar.Tail>
public nl.tue.astar.Record getOptimalRecord(AStarThread.Canceller c) throws nl.tue.astar.AStarException
AStarThread
getOptimalRecord
in interface AStarThread<H extends nl.tue.astar.Head,T extends nl.tue.astar.Tail>
nl.tue.astar.AStarException
public nl.tue.astar.Record getOptimalRecord(AStarThread.Canceller c, int stopAt) throws nl.tue.astar.AStarException
AStarThread
getOptimalRecord
in interface AStarThread<H extends nl.tue.astar.Head,T extends nl.tue.astar.Tail>
nl.tue.astar.AStarException
public nl.tue.astar.Record getOptimalRecord(AStarThread.Canceller c, double timeLimit) throws nl.tue.astar.AStarException
nl.tue.astar.AStarException
protected nl.tue.astar.Record poll()
public nl.tue.astar.Record getOptimalRecord(AStarThread.Canceller c, int stopAt, double timeLimit) throws nl.tue.astar.AStarException
c
- stopAt
- timeLimit
- nl.tue.astar.AStarException
protected void processMovesForRecord(nl.tue.astar.Record rec, H head, T tail, int stopAt, double timeLimit, long endTime) throws nl.tue.astar.AStarException
nl.tue.astar.AStarException
protected void processMovesForRecordWithUpToDateTail(nl.tue.astar.Record rec, H head, T tail, int stopAt, double timeLimit, long endTime) throws nl.tue.astar.AStarException
nl.tue.astar.AStarException
protected void setConsidered(nl.tue.astar.Record record)
protected boolean isValidMoveOnModel(nl.tue.astar.Record rec, gnu.trove.TIntCollection nextEvents, int activity, gnu.trove.list.TIntList modelMoves)
protected boolean isValidMoveOnLog(nl.tue.astar.Record rec, int nextEvent, int activity, gnu.trove.list.TIntList modelMoves, gnu.trove.list.TIntList syncMoves)
public boolean wasReliable()
AStarThread
wasReliable
in interface AStarThread<H extends nl.tue.astar.Head,T extends nl.tue.astar.Tail>
protected void processMove(H head, T tail, nl.tue.astar.Record rec, int modelMove, int movedEvent, int activity) throws nl.tue.astar.AStarException
nl.tue.astar.AStarException
protected H computeNextHead(nl.tue.astar.Record rec, H head, int modelMove, int movedEvent, int activity)
protected T computeNewTail(nl.tue.astar.Record newRec, T tail, H newHead, int modelMove, int movedEvent, int activity)
protected void initializeQueue(H head) throws nl.tue.astar.AStarException
nl.tue.astar.AStarException
public int getVisitedStateCount()
AStarThread
getVisitedStateCount
in interface AStarThread<H extends nl.tue.astar.Head,T extends nl.tue.astar.Tail>
public int getQueuedStateCount()
AStarThread
getQueuedStateCount
in interface AStarThread<H extends nl.tue.astar.Head,T extends nl.tue.astar.Tail>
public java.lang.String toString()
toString
in class java.lang.Object
public void setType(AStarThread.Type type)
AStarThread
setType
in interface AStarThread<H extends nl.tue.astar.Head,T extends nl.tue.astar.Tail>
public AStarThread.Type getType()
getType
in interface AStarThread<H extends nl.tue.astar.Head,T extends nl.tue.astar.Tail>
public void setEpsilon(double epsilon)
setEpsilon
in interface AStarThread<H extends nl.tue.astar.Head,T extends nl.tue.astar.Tail>
epsilon
-