java.lang.Object
de.grogra.imp2d.layout.GraphUtilities
A Utility-Class with helping methods for layouting graphs
especially for hierarchical graph layouts
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetConnectedNodes(Node nodes) Dividing the nodes of the graph into connectedNodes (= nodes that have edges to other nodes) and unconnectedNodes (= nodes that don't have edges to other nodes of the graph)protected intgetConnectedNodesSize(Node nodes) intgetNodeCount(Node nodes) Returns the number of nodes of the graphgetNodesList(Node nodes) getNodesListDFS(Node nodes) Getting all nodes converted to a linked list and arranged in depth first search-stylegetUnconnectedNodes(Node nodes) Dividing the nodes of the graph into connectedNodes (= nodes that have edges to other nodes) and unconnectedNodes (= nodes that don't have edges to other nodes of the graph)booleanisEdgeAccessed(Edge edgeTemp) checks if a edge is marked or unmarkedbooleanisNodeAccessed(Node nodeTemp) checks if a node is marked or unmarkedvoidsetAllEdgesAccessed(Node nodeList, boolean value) voidsetAllNodesEdgesAccessed(Node nodeList, boolean value) voidsetEdgeAccessed(Edge edgeTemp, boolean value) Setting a concrete edge marked or unmarkedvoidsetNodeAccessed(Node nodeTemp, boolean value) Setting a concrete Node marked or unmarked
-
Constructor Details
-
GraphUtilities
public GraphUtilities()
-
-
Method Details
-
getNodesList
-
getNodesListDFS
Getting all nodes converted to a linked list and arranged in depth first search-style- Parameters:
nodes-- Returns:
-
setAllNodesEdgesAccessed
-
setAllEdgesAccessed
-
getNodeCount
Returns the number of nodes of the graph- Returns:
- nodeCount number of nodes
-
setNodeAccessed
Setting a concrete Node marked or unmarked- Parameters:
value-trueif unmarked,falseif markednode- Node that has to be marked
-
setEdgeAccessed
Setting a concrete edge marked or unmarked- Parameters:
value-trueif unmarked,falseif markededge- Edge that has to be marked
-
isNodeAccessed
checks if a node is marked or unmarked- Parameters:
node- Node that will be checked- Returns:
trueif unmarked,falseif marked
-
isEdgeAccessed
checks if a edge is marked or unmarked- Parameters:
edge- Edge that will be checked- Returns:
trueif unmarked,falseif marked
-
getRoots
-
getConnectedNodes
Dividing the nodes of the graph into connectedNodes (= nodes that have edges to other nodes) and unconnectedNodes (= nodes that don't have edges to other nodes of the graph) -
getConnectedNodesSize
-
getUnconnectedNodes
Dividing the nodes of the graph into connectedNodes (= nodes that have edges to other nodes) and unconnectedNodes (= nodes that don't have edges to other nodes of the graph)
-