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 int
getConnectedNodesSize
(Node nodes) int
getNodeCount
(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)boolean
isEdgeAccessed
(Edge edgeTemp) checks if a edge is marked or unmarkedboolean
isNodeAccessed
(Node nodeTemp) checks if a node is marked or unmarkedvoid
setAllEdgesAccessed
(Node nodeList, boolean value) void
setAllNodesEdgesAccessed
(Node nodeList, boolean value) void
setEdgeAccessed
(Edge edgeTemp, boolean value) Setting a concrete edge marked or unmarkedvoid
setNodeAccessed
(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:
node
- Node that has to be markedvalue
-true
if unmarked,false
if marked
-
setEdgeAccessed
Setting a concrete edge marked or unmarked- Parameters:
edge
- Edge that has to be markedvalue
-true
if unmarked,false
if marked
-
isNodeAccessed
checks if a node is marked or unmarked- Parameters:
node
- Node that will be checked- Returns:
true
if unmarked,false
if marked
-
isEdgeAccessed
checks if a edge is marked or unmarked- Parameters:
edge
- Edge that will be checked- Returns:
true
if unmarked,false
if 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)
-