algo
Class RunByteLocTSP

java.lang.Object
  extended by java.lang.Thread
      extended by algo.RunByteLocTSP
All Implemented Interfaces:
java.lang.Runnable

 class RunByteLocTSP
extends java.lang.Thread

Thread for parallel computation.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
private  BestByteLocStore best
           
 int COUNT
           
private  Deque globalStack
           
private  long iter
           
private  long maxiter
           
private  long pushes
           
private  java.util.ArrayList stack
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
RunByteLocTSP(Deque s, BestByteLocStore b, long max)
           
 
Method Summary
 void getBest(Path path)
           
 void getBestRec(Path path, int depth)
           
 long getIterations()
           
 long getMaxIterations()
           
 void run()
           
 long setMaxIterations(long m)
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

best

private BestByteLocStore best

globalStack

private Deque globalStack

maxiter

private long maxiter

iter

private long iter

pushes

private long pushes

stack

private java.util.ArrayList stack

COUNT

public final int COUNT
Constructor Detail

RunByteLocTSP

public RunByteLocTSP(Deque s,
                     BestByteLocStore b,
                     long max)
Parameters:
s - work queue.
b - storage for best path.
max - maximal number of iterations.
Method Detail

run

public void run()
Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

getBest

public void getBest(Path path)
Parameters:
path - a starting path.

getBestRec

public void getBestRec(Path path,
                       int depth)
Parameters:
path - a starting path.
depth - length of this path.

getIterations

public long getIterations()
Returns:
iter.

getMaxIterations

public long getMaxIterations()
Returns:
maxiter.

setMaxIterations

public long setMaxIterations(long m)
Parameters:
m - new maxIter.
Returns:
old maxIter.