be.ac.ulg.montefiore.run.totem.repository.allDistinctRoutes
Class AllDistinctRoutes

java.lang.Object
  extended by be.ac.ulg.montefiore.run.totem.repository.allDistinctRoutes.AllDistinctRoutes

public class AllDistinctRoutes
extends java.lang.Object

AllDistinctsRoutes can be used to compute all distincts route, load or save them to a file and give easy acces to computed routes. This class use ComputeAllDistinctPath to compute all distinct route on a SimplifiedDomain. We use a deep first search algorithm to explore all the distinct path. The maxDepth parameter is used to limit the maximum length of a path. All the computed path contains no loop. This algorithm can be used to design more intelligent TE methods.

Creation date: 1-Jan-2004

Author:
Fabian Skivee (skivee@run.montefiore.ulg.ac.be)

Field Summary
protected  SimplifiedDomain domain
           
protected  int maxDepth
           
protected  java.util.List<SimplifiedPath>[][] routes
           
 
Constructor Summary
AllDistinctRoutes()
           
 
Method Summary
 void computeAllDistinctRoute(SimplifiedDomain domain, int maxDepth)
          Compute all the distinct routes on a given SimplifiedDomain.
 void computeAllDistinctRoute(SimplifiedDomain domain, int maxDepth, int nbPath, boolean verbose)
           
 java.util.List<SimplifiedPath> getAllDistinctRoutes(int srcNodeId, int dstNodeId)
          Get all the disctinct routes from a source to a destination
 int getMaxDepth()
          Get the maximum path length
 void loadAllDistinctRoute(SimplifiedDomain domain, java.lang.String fileName)
          Load all distinct routes from a file
 void saveAllDistinctRoute(java.lang.String fileName)
          Save all distinct routes to a file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

domain

protected SimplifiedDomain domain

routes

protected java.util.List<SimplifiedPath>[][] routes

maxDepth

protected int maxDepth
Constructor Detail

AllDistinctRoutes

public AllDistinctRoutes()
Method Detail

loadAllDistinctRoute

public void loadAllDistinctRoute(SimplifiedDomain domain,
                                 java.lang.String fileName)
                          throws java.io.IOException,
                                 AllDistinctRoutesException
Load all distinct routes from a file

Parameters:
domain -
fileName -
Throws:
java.io.IOException
AllDistinctRoutesException

saveAllDistinctRoute

public void saveAllDistinctRoute(java.lang.String fileName)
                          throws java.io.IOException,
                                 AllDistinctRoutesException
Save all distinct routes to a file

Parameters:
fileName -
Throws:
java.io.IOException
AllDistinctRoutesException

computeAllDistinctRoute

public void computeAllDistinctRoute(SimplifiedDomain domain,
                                    int maxDepth)
                             throws LinkNotFoundException,
                                    NodeNotFoundException
Compute all the distinct routes on a given SimplifiedDomain. The maxDepth parameter specifies the maximum length of the generated paths

Parameters:
domain -
maxDepth -
Throws:
LinkNotFoundException
NodeNotFoundException

computeAllDistinctRoute

public void computeAllDistinctRoute(SimplifiedDomain domain,
                                    int maxDepth,
                                    int nbPath,
                                    boolean verbose)
                             throws LinkNotFoundException,
                                    NodeNotFoundException
Throws:
LinkNotFoundException
NodeNotFoundException

getMaxDepth

public int getMaxDepth()
Get the maximum path length

Returns:

getAllDistinctRoutes

public java.util.List<SimplifiedPath> getAllDistinctRoutes(int srcNodeId,
                                                           int dstNodeId)
                                                    throws AllDistinctRoutesException
Get all the disctinct routes from a source to a destination

Parameters:
srcNodeId -
dstNodeId -
Returns:
a list of SimplifiedPath
Throws:
AllDistinctRoutesException


Copyright © 2004-2007 Research Unit in Networking, All Rights Reserved.