public interface IGraph
Modifier and Type | Method and Description |
---|---|
void |
addEdge(java.util.ArrayList<IEdge> listEdge)
Adds a new list of edges to the graph.
|
void |
addEdge(IEdge edge)
Adds a new edge (connecting 2 nodes) to the graph.
|
void |
addNode(java.util.ArrayList<INode> listNode)
Adds a new list of nodes to the graph.
|
void |
addNode(INode node)
Adds a new node to the graph.
|
int |
contains(IEdge edge)
Checks if the graph contains a specific edge connecting 2 nodes.
|
int |
contains(INode node)
Checks if the graph contains a specific node.
|
IEdge |
getEdge(int i)
Gets the ith edge.
|
java.util.ArrayList<IEdge> |
getListEdges()
Gets the list of all edges.
|
int |
getListEdgesSize()
Gets the size of the list of all edges.
|
java.util.ArrayList<INode> |
getListNodes()
Gets the list of all nodes.
|
int |
getListNodesSize()
Gets the size of the list of all nodes.
|
INode |
getNode(int i)
Gets the ith node.
|
void |
removeEdge(IEdge edge)
Removes an edge from the graph.
|
void |
removeEdge(INode node)
Removes all edges which have a common node at one extremity.
|
void |
removeEdge(int i)
Removes the ith edge from the graph.
|
void |
removeNode(INode node)
Removes a node from the graph.
|
void |
removeNode(int i)
Removes the ith node from the graph.
|
void |
setPositionToAllNodes(int width,
int height)
Sets the position of all nodes in the graph.
|
void addNode(INode node)
node
- the node.void addNode(java.util.ArrayList<INode> listNode)
listNode
- the list of nodes.void removeNode(INode node)
node
- the node in question.void removeNode(int i)
i
- index.void addEdge(IEdge edge)
edge
- the new edge.void addEdge(java.util.ArrayList<IEdge> listEdge)
listEdge
- the list of edges.void removeEdge(IEdge edge)
edge
- the edge in question.void removeEdge(int i)
i
- index.void removeEdge(INode node)
node
- the common node.INode getNode(int i)
i
- index.IEdge getEdge(int i)
i
- index.java.util.ArrayList<INode> getListNodes()
java.util.ArrayList<IEdge> getListEdges()
int getListNodesSize()
int getListEdgesSize()
int contains(INode node)
node
- the specific node in question.int contains(IEdge edge)
edge
- the specific edge in question.void setPositionToAllNodes(int width, int height)
width
- width of the graph.height
- height of the graph.