V - the vertex typeE - the edge typepublic class MixedGraphUnion<V,E> extends GraphUnion<V,E,Graph<V,E>> implements DirectedGraph<V,E>
| Constructor and Description |
|---|
MixedGraphUnion(UndirectedGraph<V,E> g1,
DirectedGraph<V,E> g2)
Construct a new graph union.
|
MixedGraphUnion(UndirectedGraph<V,E> g1,
DirectedGraph<V,E> g2,
WeightCombiner operator)
Construct a new graph union.
|
| Modifier and Type | Method and Description |
|---|---|
Set<E> |
incomingEdgesOf(V vertex)
Returns a set of all edges incoming into the specified vertex.
|
int |
inDegreeOf(V vertex)
Returns the "in degree" of the specified vertex.
|
int |
outDegreeOf(V vertex)
Returns the "out degree" of the specified vertex.
|
Set<E> |
outgoingEdgesOf(V vertex)
Returns a set of all edges outgoing from the specified vertex.
|
addEdge, addEdge, addVertex, containsEdge, containsVertex, edgeSet, edgesOf, getAllEdges, getEdge, getEdgeFactory, getEdgeSource, getEdgeTarget, getEdgeWeight, getG1, getG2, removeEdge, removeEdge, removeVertex, vertexSetassertVertexExist, containsEdge, equals, hashCode, removeAllEdges, removeAllEdges, removeAllEdges, removeAllVertices, toString, toStringFromSetsclone, finalize, getClass, notify, notifyAll, wait, wait, waitaddEdge, addEdge, addVertex, containsEdge, containsEdge, containsVertex, edgeSet, edgesOf, getAllEdges, getEdge, getEdgeFactory, getEdgeSource, getEdgeTarget, getEdgeWeight, removeAllEdges, removeAllEdges, removeAllVertices, removeEdge, removeEdge, removeVertex, vertexSetpublic MixedGraphUnion(UndirectedGraph<V,E> g1, DirectedGraph<V,E> g2, WeightCombiner operator)
g1 - the undirected graphg2 - the directed graphoperator - the weight combiner (policy for edge weight calculation)public MixedGraphUnion(UndirectedGraph<V,E> g1, DirectedGraph<V,E> g2)
WeightCombiner.SUM weight
combiner.g1 - the undirected graphg2 - the directed graphpublic int inDegreeOf(V vertex)
DirectedGraphinDegreeOf in interface DirectedGraph<V,E>vertex - vertex whose degree is to be calculated.public Set<E> incomingEdgesOf(V vertex)
DirectedGraphincomingEdgesOf in interface DirectedGraph<V,E>vertex - the vertex for which the list of incoming edges to be returned.public int outDegreeOf(V vertex)
DirectedGraphoutDegreeOf in interface DirectedGraph<V,E>vertex - vertex whose degree is to be calculated.public Set<E> outgoingEdgesOf(V vertex)
DirectedGraphoutgoingEdgesOf in interface DirectedGraph<V,E>vertex - the vertex for which the list of outgoing edges to be returned.Copyright © 2016. All rights reserved.