Package network
Class VNFgraph
java.lang.Object
network.VNFgraph
public class VNFgraph
extends java.lang.Object
VNF forwarding graph class
-
Field Summary
Fields Modifier and Type Field Description (package private) int
banddemand
default bandwidth demand in case it is not defined(package private) Codec
codec
(package private) int
cpudemand
default cpu demand in case it is not defined(package private) int
defedgew
default edge weight in case it is not defined(package private) int
defnodew
default node weight in case it is not definedint
edges
number of edges(package private) int[]
edgew
edge weights(package private) java.lang.String
filename
name of file VNFgraph(package private) int[]
graph
graph in Edge Vector formatint
maxacedgew
maximum accumulated edge weightint
maxedgew
maximum edge weightint
maxnodew
maximum node weightint
minedgew
minimum edge weightint
minnodew
minimum node weight(package private) int[]
nodeacw
node accumulated weightsint
nodes
number of nodes(package private) int[]
nodesort
sorted nodes(package private) int[]
nodew
node weights -
Constructor Summary
Constructors Constructor Description VNFgraph(java.lang.String filename)
-
Method Summary
Modifier and Type Method Description int
cpugetdemand()
get total capacity demandvoid
demands()
updates minimum and maximum demand valuesint
getbanddemand()
get total bandwidth demandint
getedges()
get number of edgesint[]
getedgew()
get bandwidth demands for all edgesint[]
getgraph()
get graph in Edge Vector formatint
getmaxacedgew()
get maximum bandwidth demandint
getmaxnodew()
get maximum capacity demandint
getminedgew()
get minimum bandwidth demandsint
getminnodew()
get minimum capacity demandint[]
getnodeacw()
computes the total bandwidth demands for all nodesint
getnodeacw(int i)
get the total bandwidth demands form the links connected in given nodeint
getnodedem(int w)
get demand for single virtual nodeint
getnodes()
get number of nodesint[]
getnodew()
get capacity demands for all nodesint
getsortednode(int i)
get sorted nodesvoid
loadEdgeVector(java.lang.String filename)
load graph from file in edge vector formatvoid
loadedgew(java.lang.String filename)
load edge demands from filevoid
loadnodew(java.lang.String filename)
load node demands from filevoid
nodeacw()
computes the total bandwidth demands of all the virtual links connected on every VNFvoid
nodedemsort()
sorts nodes in ascending order based on their capacity demandsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
graph
int[] graphgraph in Edge Vector format -
nodew
int[] nodewnode weights -
edgew
int[] edgewedge weights -
nodeacw
int[] nodeacwnode accumulated weights -
nodesort
int[] nodesortsorted nodes -
edges
public int edgesnumber of edges -
nodes
public int nodesnumber of nodes -
maxnodew
public int maxnodewmaximum node weight -
maxedgew
public int maxedgewmaximum edge weight -
maxacedgew
public int maxacedgewmaximum accumulated edge weight -
minnodew
public int minnodewminimum node weight -
minedgew
public int minedgewminimum edge weight -
defnodew
int defnodewdefault node weight in case it is not defined -
defedgew
int defedgewdefault edge weight in case it is not defined -
cpudemand
int cpudemanddefault cpu demand in case it is not defined -
banddemand
int banddemanddefault bandwidth demand in case it is not defined -
filename
java.lang.String filenamename of file VNFgraph -
codec
Codec codec
-
-
Constructor Details
-
VNFgraph
public VNFgraph(java.lang.String filename)
-
-
Method Details
-
nodedemsort
public void nodedemsort()sorts nodes in ascending order based on their capacity demands -
demands
public void demands()updates minimum and maximum demand values -
nodeacw
public void nodeacw()computes the total bandwidth demands of all the virtual links connected on every VNF -
loadEdgeVector
public void loadEdgeVector(java.lang.String filename)load graph from file in edge vector format -
loadnodew
public void loadnodew(java.lang.String filename)load node demands from file -
loadedgew
public void loadedgew(java.lang.String filename)load edge demands from file -
getedges
public int getedges()get number of edges -
getnodes
public int getnodes()get number of nodes -
getmaxnodew
public int getmaxnodew()get maximum capacity demand -
getmaxacedgew
public int getmaxacedgew()get maximum bandwidth demand -
getminnodew
public int getminnodew()get minimum capacity demand -
getminedgew
public int getminedgew()get minimum bandwidth demands -
getgraph
public int[] getgraph()get graph in Edge Vector format -
getnodew
public int[] getnodew()get capacity demands for all nodes -
getedgew
public int[] getedgew()get bandwidth demands for all edges -
getnodedem
public int getnodedem(int w)get demand for single virtual node -
getnodeacw
public int getnodeacw(int i)get the total bandwidth demands form the links connected in given node -
getnodeacw
public int[] getnodeacw()computes the total bandwidth demands for all nodes -
cpugetdemand
public int cpugetdemand()get total capacity demand -
getbanddemand
public int getbanddemand()get total bandwidth demand -
getsortednode
public int getsortednode(int i)get sorted nodes
-