be.ac.ulg.montefiore.run.totem.repository.tomography.utils
Class LinkTrafficMatrix

java.lang.Object
  extended by be.ac.ulg.montefiore.run.totem.repository.tomography.utils.LinkTrafficMatrix

public class LinkTrafficMatrix
extends java.lang.Object

A data structure (Square Matrix) for representation of link-to-link traffic matrices. This struture is associated with a LinkLoadData structure that contain all the info about the link in the matrix.

Creation date: 29-mars-2006

Author:
Quentin Chevalier (quentin.chevalier@gmail.com)

Constructor Summary
LinkTrafficMatrix(LinkLoadData linkData)
           
 
Method Summary
 TrafficMatrix convertToNodeTM(Domain domain)
          This method convert the link traffic matrix in a node traffic matrix
 int length()
          As the traffic matrix is square only one dimension is needed
 void print()
          This method print the link traffic matrix
 void setElement(int orig, int dest, double value)
          This method is used to set a cell in the link tm
 void setElement(java.lang.String orig, java.lang.String dest, double value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LinkTrafficMatrix

public LinkTrafficMatrix(LinkLoadData linkData)
Parameters:
linkData - The structure containing all info about link (SNMP way)
Method Detail

setElement

public void setElement(int orig,
                       int dest,
                       double value)
                throws NotYetImplementedException
This method is used to set a cell in the link tm

Parameters:
orig - the int id of the orig link (id is the same as in the linkLoadData structure)
dest - the int id of the dest link (id is the same as in the linkLoadData structure)
value - the value to set
Throws:
NotYetImplementedException

setElement

public void setElement(java.lang.String orig,
                       java.lang.String dest,
                       double value)
Parameters:
orig - the id of the orig link
dest - the id of the dest link
value - the value to set

length

public int length()
As the traffic matrix is square only one dimension is needed

Returns:
the length of one dimension of the matrix

convertToNodeTM

public TrafficMatrix convertToNodeTM(Domain domain)
                              throws InvalidDomainException,
                                     NodeNotFoundException
This method convert the link traffic matrix in a node traffic matrix

Parameters:
domain - the domain where the tm is computed
Returns:
the trafic matrix with node as source and destination
Throws:
InvalidDomainException
NodeNotFoundException

print

public void print()
This method print the link traffic matrix



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