Provides functionality to hide and unhide nodes and edges of a graph temporarily for algorithmic operations.
Remarks
Type Details
- yfiles module
- algorithms
- yfiles-umd modules
- All layout modules, view-layout-bridge
- Legacy UMD name
- yfiles.algorithms.LayoutGraphHider
See Also
Constructors
Instantiates a new GraphHider for the given graph.
Remarks
Properties
Gets the Graph
for which this GraphHider
was created.
Methods
The edges that are currently hidden
Returns
- ↪IEdgeCursor
- a cursor of the currently hidden edges
The nodes that are currently hidden
Returns
- ↪INodeCursor
- a cursor of the currently hidden nodes
Hides the given node and all it's adjacent edges from the graph.
Remarks
Hides the given edge from the graph.
Remarks
Hides the given list of edges from the graph.
Remarks
Hides the given list of nodes from the graph.
Remarks
Hides the given edges from the graph.
Remarks
Hides the given elements from the graph.
Remarks
Hides the given nodes from the graph.
Remarks
Hides all self-loops and multiple edges from the graph.
Remarks
This method will be called whenever the hider is requested to unhide the given edge from the graph.
This method will be called whenever the hider is requested to unhide the given node from the graph.
Unhides the given edge.
Remarks
Also updates hiddenEdges.
Note that unhiding an edge whose source/target is not in the graph (e.g., because it's currently hidden/removed) causes an exception. Hence, in such cases, you first have to unhide/reinsert the corresponding endpoints.
Complexity
O(hiddenEdges.size())
Parameters
A map of options to pass to the method.
- e - Edge
- the edge that will be unhidden
Unhides the given edges.
Remarks
Also updates hiddenEdges.
Note that unhiding an edge whose source/target is not in the graph (e.g., because it's currently hidden/removed) causes an exception. Hence, in such cases, you first have to unhide/reinsert the corresponding endpoints.
Complexity
O(hiddenEdges.size())
Parameters
A map of options to pass to the method.
- edges - EdgeList
- the edges that will be unhidden
Unhides the given node and if requested its adjacent edges.
Remarks
Complexity
O(hiddenNodes.size()+hiddenEdges.size())
Parameters
A map of options to pass to the method.
- v - YNode
- the node that will be unhidden
- unhideAdjacentEdges - boolean
- whether of not to unhide previously hidden edges connected at
v
whose other end point is not hidden, i.e. it is part of the graph.
Unhides the given nodes and if requested its adjacent edges.
Remarks
Complexity
O(hiddenNodes.size()+hiddenEdges.size())
Parameters
A map of options to pass to the method.
- nodes - YNodeList
- the nodes that will be unhidden
- unhideAdjacentEdges - boolean
- whether of not to unhide previously hidden edges connected at the given nodes whose other end point is not hidden, i.e. it is part of the graph.
Fields
Static Methods
Hides the subgraph induced by the given edges from the given graph.
Remarks
Unhides the subgraph induced by the given edges in the given graph.
Remarks
The induced subgraph defined by the given edges consists of the given edges and all nodes that are either source or target of at least one of the given edges.
Parts of the subgraph that are already contained in the given graph will not be unhidden and pose no problem to this method.