mascoptLib.algos.abstractalgos
Class PathGeneratorRandomWalk

java.lang.Object
  extended bymascoptLib.algos.abstractalgos.PathGenerator
      extended bymascoptLib.algos.abstractalgos.PathGeneratorRandomWalk

public class PathGeneratorRandomWalk
extends PathGenerator

Computes paths or disjoint paths for a set of request using a Random Walk.

This class computes paths for requests. The requests are contained in a Graph given to the constructor. Then, in option, for each request (an edge of this request graph), some paths are computed with random walks.

The disjoint paths are edge-disjoint from the set of edges of the main paths. In fact, for each edge of the set of edges of the main paths, a path is computed, not using this edge.


Field Summary
 int MAXSIZE
           
 int stretch_factor
          The stretch factor on shortest path for allowed generated path.
 
Constructor Summary
PathGeneratorRandomWalk(AbstractGraph g, AbstractGraph requests)
          Constructs a path generator on a graph for some requests.
 
Method Summary
 void run()
          Run the generation of paths.
 void setDisjointNbPathsForRequest(int number)
          Fix the number of additional paths, generated for each edge of the set of edges of the main paths.
 void setNbPathsForRequest(int number)
          Fix the number of paths to compute for each request.
 
Methods inherited from class mascoptLib.algos.abstractalgos.PathGenerator
computeDisjointPathsForGeneratedPaths, getPaths, getPathsForThisEdge
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAXSIZE

public int MAXSIZE

stretch_factor

public int stretch_factor
The stretch factor on shortest path for allowed generated path.

Constructor Detail

PathGeneratorRandomWalk

public PathGeneratorRandomWalk(AbstractGraph g,
                               AbstractGraph requests)
Constructs a path generator on a graph for some requests.

Parameters:
g - the graph
requests - the requests for which we want paths
Method Detail

setNbPathsForRequest

public void setNbPathsForRequest(int number)
Fix the number of paths to compute for each request. Default value is 1.

Parameters:
number - the number of paths

setDisjointNbPathsForRequest

public void setDisjointNbPathsForRequest(int number)
Fix the number of additional paths, generated for each edge of the set of edges of the main paths. Default value is 1.

Parameters:
number - the number of paths

run

public void run()
Run the generation of paths.

Overrides:
run in class PathGenerator