|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectunbbayes.prs.Network
public class Network
Field Summary | |
---|---|
protected List<Edge> |
edgeList
List of edges that this network has. |
protected String |
id
|
protected String |
name
|
protected Map<String,Integer> |
nodeIndexes
|
protected ArrayList<Node> |
nodeList
List of nodes that this network has. |
protected Node.NodeNameChangedListener |
nodeNameChangedListener
|
Constructor Summary | |
---|---|
Network(String name)
|
Method Summary | |
---|---|
void |
addEdge(Edge edge)
Adds an edge into the net. |
void |
addNode(Node node)
Add the node. |
protected void |
clearEdges()
Clean the edge list |
protected void |
clearNodes()
Clean the node list |
Edge |
getEdge(Node no1,
Node no2)
Retorna o arco entre dois nós caso ele exista |
List<Edge> |
getEdges()
Retorna os edgeList do grafo. |
String |
getId()
Returns the id. |
String |
getName()
Retorna o nome da rede. |
Node |
getNode(String name)
Returns the node that has the given name. |
Node |
getNodeAt(int index)
Retorna o nÔøΩ do grafo com o respectivo ÔøΩndice. |
int |
getNodeCount()
Returna o nÔøΩmero de variÔøΩveis da rede. |
int |
getNodeIndex(String name)
Return the index for the node with the given name. |
Map<String,Integer> |
getNodeIndexes()
|
ArrayList<Node> |
getNodes()
Retorna os nÔøΩs do grafo. |
int |
hasEdge(Node no1,
Node no2)
Verifica existÔøΩncia de determinado arco. |
protected int |
hasEdge(Node no1,
Node no2,
List<Edge> vetArcos)
|
void |
removeEdge(Edge edge)
Remove the edge. |
void |
removeNode(Node element)
Remove node. |
void |
setName(String name)
Seta o nome da rede. |
void |
setNodeIndexes(Map<String,Integer> nodeIndexes)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected String id
protected String name
protected ArrayList<Node> nodeList
protected List<Edge> edgeList
protected Map<String,Integer> nodeIndexes
protected Node.NodeNameChangedListener nodeNameChangedListener
Constructor Detail |
---|
public Network(String name)
Method Detail |
---|
public List<Edge> getEdges()
getEdges
in interface Graph
public ArrayList<Node> getNodes()
getNodes
in interface Graph
public int getNodeCount()
getNodeCount
in interface Graph
public Node getNodeAt(int index)
index
- ÔøΩndice do nÔøΩ.
public Node getNode(String name)
name
- node name.
public int getNodeIndex(String name)
public void removeEdge(Edge edge)
removeEdge
in interface Graph
edge
- the edge to be removed.public void addNode(Node node)
addNode
in interface Graph
node
- node to be added.public void addEdge(Edge edge) throws InvalidParentException
addEdge
in interface Graph
edge
- An edge to be inserted.
InvalidParentException
public void removeNode(Node element)
removeNode
in interface Graph
element
- node to be removed.protected void clearNodes()
protected void clearEdges()
public int hasEdge(Node no1, Node no2)
hasEdge
in interface Graph
no1
- nÔøΩ origem.no2
- nÔøΩ destino.
protected int hasEdge(Node no1, Node no2, List<Edge> vetArcos)
public Edge getEdge(Node no1, Node no2)
no1
- Nó origemno2
- Nó destino
public void setName(String name)
name
- nome da rede.public String getName()
public String getId()
public String toString()
toString
in class Object
Object.toString()
public Map<String,Integer> getNodeIndexes()
public void setNodeIndexes(Map<String,Integer> nodeIndexes)
nodeIndexes
- the nodeIndexes to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |