org.jgrapht.graph
Class UndirectedMaskSubgraph<V,E>
- java.lang.Object
-
- org.jgrapht.graph.AbstractGraph<V,E>
-
- org.jgrapht.graph.MaskSubgraph<V,E>
-
- org.jgrapht.graph.UndirectedMaskSubgraph<V,E>
-
- Type Parameters:
V- the graph vertex typeE- the graph edge type
- All Implemented Interfaces:
- Graph<V,E>, UndirectedGraph<V,E>
public class UndirectedMaskSubgraph<V,E> extends MaskSubgraph<V,E> implements UndirectedGraph<V,E>
An undirected graph that is aMaskSubgraphof another graph.- Since:
- July 5, 2007
-
-
Constructor Summary
Constructors Constructor and Description UndirectedMaskSubgraph(UndirectedGraph<V,E> base, MaskFunctor<V,E> mask)Deprecated.in favor of using lambdasUndirectedMaskSubgraph(UndirectedGraph<V,E> base, java.util.function.Predicate<V> vertexMask, java.util.function.Predicate<E> edgeMask)Create a new undirectedMaskSubgraphof another graph.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description intdegreeOf(V vertex)Returns the degree of the specified vertex.-
Methods inherited from class org.jgrapht.graph.MaskSubgraph
addEdge, addEdge, addVertex, containsEdge, containsVertex, edgeSet, edgesOf, getAllEdges, getEdge, getEdgeFactory, getEdgeSource, getEdgeTarget, getEdgeWeight, removeAllEdges, removeAllEdges, removeAllVertices, removeEdge, removeEdge, removeVertex, vertexSet
-
Methods inherited from class org.jgrapht.graph.AbstractGraph
containsEdge, equals, hashCode, toString
-
Methods inherited from interface org.jgrapht.Graph
addEdge, addEdge, addVertex, containsEdge, containsEdge, containsVertex, edgeSet, edgesOf, getAllEdges, getEdge, getEdgeFactory, getEdgeSource, getEdgeTarget, getEdgeWeight, removeAllEdges, removeAllEdges, removeAllVertices, removeEdge, removeEdge, removeVertex, vertexSet
-
-
-
-
Constructor Detail
-
UndirectedMaskSubgraph
@Deprecated public UndirectedMaskSubgraph(UndirectedGraph<V,E> base, MaskFunctor<V,E> mask)
Deprecated. in favor of using lambdasCreate a new undirectedMaskSubgraphof another graph.- Parameters:
base- the base graphmask- vertices and edges to exclude in the subgraph. If a vertex/edge is masked, it is as if it is not in the subgraph.
-
UndirectedMaskSubgraph
public UndirectedMaskSubgraph(UndirectedGraph<V,E> base, java.util.function.Predicate<V> vertexMask, java.util.function.Predicate<E> edgeMask)
Create a new undirectedMaskSubgraphof another graph.- Parameters:
base- the base graphvertexMask- vertices to exclude in the subgraph. If a vertex is masked, it is as if it is not in the subgraph. Edges incident to the masked vertex are also masked.edgeMask- edges to exclude in the subgraph. If an edge is masked, it is as if it is not in the subgraph.
-
-
Method Detail
-
degreeOf
public int degreeOf(V vertex)
Returns the degree of the specified vertex. A degree of a vertex in an undirected graph is the number of edges touching that vertex.- Specified by:
degreeOfin interfaceUndirectedGraph<V,E>- Parameters:
vertex- vertex whose degree is to be calculated.- Returns:
- the degree of the specified vertex.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG