gov.nist.antd.merlin.util
Class AlgoUtil

java.lang.Object
  |
  +--gov.nist.antd.merlin.util.AlgoUtil

public class AlgoUtil
extends java.lang.Object

This class contains some tools for the algorithms

 This class was developed at the National Institute of Standards and
 Technology by employees of the Federal Government in the course of
 their official duties. Pursuant to title 17 Section 105 of the United
 States Code this software is not subject to copyright protection and
 is in the public domain.
 NIST assumes no responsibility whatsoever for its use by other parties,
 and makes no guarantees, expressed or implied, about its quality,
 reliability, or any other characteristic.
 
We would appreciate acknowledgement if the software is used.
NIST ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" CONDITION AND DISCLAIM ANY LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.

Author:
borchert
, rouil , gallo

Field Summary
static int NB_RESULT
          Number of elements return by the method getStatistics
 
Constructor Summary
private AlgoUtil()
          private constructor to avoid instantiation
 
Method Summary
static OpticalConnection executeRouting(OpticalConnection route)
          Execute a routing algorithm
static OpticalConnection executeRWA(OpticalConnection route)
          Execute a RWA algorithm
static OpticalConnection executeWavelengthAssignment(OpticalConnection route)
          Execute a routing algorithm
static int getNoLambdas(Glass net)
          Return the number of lambdas available for the whole topology
static java.util.Vector getRoutesUsingAlgo(java.lang.String algoName, Glass net)
          Return all the routes that use the given algorithm in the net
static double[] getStatistic(java.lang.String algoName, Glass net)
          Return the statistics for the given algorithm
static double[] getStatisticsFromRouting(java.util.Vector routes)
          Return the statistics for the given routes.
static double[] getStatisticsFromRWA(java.util.Vector routes)
          Return the statistics for the given routes.
static double[] getStatisticsFromWavelength(java.util.Vector routes)
          Return the statistics for the given routes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NB_RESULT

public static final int NB_RESULT
Number of elements return by the method getStatistics

See Also:
Constant Field Values
Constructor Detail

AlgoUtil

private AlgoUtil()
private constructor to avoid instantiation

Method Detail

getRoutesUsingAlgo

public static java.util.Vector getRoutesUsingAlgo(java.lang.String algoName,
                                                  Glass net)
Return all the routes that use the given algorithm in the net

Parameters:
algoName - The name of the algorithm
net - The net object
Returns:
The vector of all the routes using the algorithm

getStatistic

public static double[] getStatistic(java.lang.String algoName,
                                    Glass net)
Return the statistics for the given algorithm

Parameters:
algoName - The name of the algorithm
net - The net object
Returns:
The array of statistics value

getStatisticsFromRouting

public static double[] getStatisticsFromRouting(java.util.Vector routes)
Return the statistics for the given routes.

Parameters:
routes - The routes to compute statistics.
Returns:
the statistics for the giver routes.

getStatisticsFromWavelength

public static double[] getStatisticsFromWavelength(java.util.Vector routes)
Return the statistics for the given routes.

Parameters:
routes - The routes to compute statistics.
Returns:
the statistics for the giver routes.

getStatisticsFromRWA

public static double[] getStatisticsFromRWA(java.util.Vector routes)
Return the statistics for the given routes.

Parameters:
routes - The routes to compute statistics.
Returns:
the statistics for the giver routes.

getNoLambdas

public static int getNoLambdas(Glass net)
Return the number of lambdas available for the whole topology

Parameters:
net - The OpNet that contains the topology
Returns:
the numbers of lambdas in the topology.

executeRWA

public static OpticalConnection executeRWA(OpticalConnection route)
Execute a RWA algorithm

Parameters:
route - The OpticalConnection to compute
Returns:
The OpticalConnection computed or null if error.

executeRouting

public static OpticalConnection executeRouting(OpticalConnection route)
Execute a routing algorithm

Parameters:
route - The OpticalConnection to compute
Returns:
The OpticalConnection computed or null if error.

executeWavelengthAssignment

public static OpticalConnection executeWavelengthAssignment(OpticalConnection route)
Execute a routing algorithm

Parameters:
route - The OpticalConnection to compute
Returns:
The OpticalConnection computed or null if error.