|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbe.ac.ulg.montefiore.run.totem.domain.simplifiedDomain.SimplifiedDomain
public class SimplifiedDomain
A simple view of a domain topology. A SimplifiedDomain can be used by algorithms that needs a very simple view of the topology (nodes and links). The SimplifiedDomain is more optimised that Domain and so can be more efficient for complex computing algorithm.
Creation date: 13-Jan-2005 10:37:16
Nested Class Summary | |
---|---|
class |
SimplifiedDomain.Link
Contains the link information |
Constructor Summary | |
---|---|
SimplifiedDomain()
|
|
SimplifiedDomain(java.lang.String name,
int nbNodes,
int maxLinks)
Simple constructor |
Method Summary | |
---|---|
void |
addLink(int linkId,
int srcNode,
int dstNode,
float capacity,
float weight,
float delay)
Add a link |
java.lang.Object |
clone()
|
void |
display()
|
java.util.List<SimplifiedDomain.Link> |
getConnectivity(int srcNode,
int dstNode)
|
int[] |
getInLinks(int nodeId)
Get all the input links of a node |
float |
getLinkCapacity(int linkId)
Get the capacity of the link |
float |
getLinkDelay(int linkId)
Get the weight of the link |
int |
getLinkDst(int linkId)
Get the destination node of the link |
SimplifiedDomain.Link[] |
getLinks()
|
int |
getLinkSrc(int linkId)
Get the source node of the link |
float |
getLinkWeight(int linkId)
Get the weight of the link |
java.lang.String |
getName()
|
int |
getNbLinks()
Retun the number of links |
int |
getNbNodes()
Retun the number of nodes |
int[] |
getNodesPath(int[] linksPath)
|
int[] |
getOutLinks(int nodeId)
Get all the output links of a node |
boolean |
isLink(int linkId)
|
boolean |
isNode(int nodeId)
As the nodeId are not necessarely consecutive, this method checks if the nodeId is a node by cheking that the node has out links. |
void |
removeInOutLinks(int nodeId)
|
void |
removeLink(int linkId)
|
float |
setLinkWeight(int linkId,
float weight)
Set the link weight |
void |
setName(java.lang.String name)
|
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SimplifiedDomain()
public SimplifiedDomain(java.lang.String name, int nbNodes, int maxLinks)
name
- nbNodes
- number of nodesmaxLinks
- number of linksMethod Detail |
---|
public java.lang.String getName()
public void setName(java.lang.String name)
public SimplifiedDomain.Link[] getLinks()
public java.util.List<SimplifiedDomain.Link> getConnectivity(int srcNode, int dstNode)
public void addLink(int linkId, int srcNode, int dstNode, float capacity, float weight, float delay)
srcNode
- source nodedstNode
- destination nodecapacity
- capacity of the linkweight
- weight of the linkdelay
- delay of the linkpublic void removeInOutLinks(int nodeId) throws LinkNotFoundException
LinkNotFoundException
public void removeLink(int linkId) throws LinkNotFoundException
LinkNotFoundException
public int getNbNodes()
public int getNbLinks()
public int getLinkSrc(int linkId) throws LinkNotFoundException
linkId
- ID of the link
LinkNotFoundException
public int getLinkDst(int linkId) throws LinkNotFoundException
linkId
- ID of the link
LinkNotFoundException
public float getLinkCapacity(int linkId) throws LinkNotFoundException
linkId
- ID of the link
LinkNotFoundException
public float getLinkWeight(int linkId) throws LinkNotFoundException
linkId
- ID of the link
LinkNotFoundException
public float setLinkWeight(int linkId, float weight) throws LinkNotFoundException
linkId
- weight
-
LinkNotFoundException
public float getLinkDelay(int linkId) throws LinkNotFoundException
linkId
- ID of the link
LinkNotFoundException
public boolean isNode(int nodeId)
nodeId
-
public boolean isLink(int linkId)
public int[] getOutLinks(int nodeId) throws NodeNotFoundException
nodeId
- ID of the node
NodeNotFoundException
public int[] getInLinks(int nodeId) throws NodeNotFoundException
nodeId
- ID of the node
NodeNotFoundException
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
public void display()
public int[] getNodesPath(int[] linksPath) throws LinkNotFoundException
LinkNotFoundException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |