Package cdc.graphs.impl
Class FilteredSubGraph<N,E>
java.lang.Object
cdc.graphs.impl.FilteredSubGraph<N,E>
- Type Parameters:
N- Node classE- Edge class
- All Implemented Interfaces:
GraphAdapter<N,E>
Graph built from an underlying graph, by applying filters to nodes and edges.
It is the user responsibility to provide consistent filters. If the edge filter gives a positive answer for an edge, then the corresponding nodes should also be accepted.
- Author:
- Damien Carbonne
-
Constructor Summary
ConstructorsConstructorDescriptionFilteredSubGraph(GraphAdapter<N, E> delegate) FilteredSubGraph(GraphAdapter<N, E> delegate, Predicate<N> nodePredicate, Predicate<E> edgePredicate) -
Method Summary
Modifier and TypeMethodDescriptionfinal booleancontainsEdge(E edge) final booleancontainsNode(N node) getEdges()getEdges(N node, EdgeDirection direction) getNodes()final Nfinal voidsetEdgePredicate(Predicate<E> predicate) final voidsetNodePredicate(Predicate<N> predicate) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface cdc.graphs.GraphAdapter
getConnectedNodes, getConnectedNodes, getConnectivity, getEdges, getEdges, getEdges, getEdges, getEdgesCount, getEdgesCount, getEdgesCount, getEdgesStream, getEdgesStream, getEdgesStream, getLeaves, getNodes, getNodesCount, getNodesStream, getRoots, hasEdge, hasEdges, hasEdges, hasEdges, hasNodes, isLeaf, isRoot
-
Constructor Details
-
FilteredSubGraph
-
FilteredSubGraph
-
-
Method Details
-
setNodePredicate
-
setEdgePredicate
-
getNodes
- Specified by:
getNodesin interfaceGraphAdapter<N,E>
-
containsNode
- Specified by:
containsNodein interfaceGraphAdapter<N,E>
-
getEdges
- Specified by:
getEdgesin interfaceGraphAdapter<N,E>
-
containsEdge
- Specified by:
containsEdgein interfaceGraphAdapter<N,E>
-
getEdges
- Specified by:
getEdgesin interfaceGraphAdapter<N,E>
-
getTip
- Specified by:
getTipin interfaceGraphAdapter<N,E>
-