V
- the vertex typeE
- the edge typeAsGraphUnion
.@Deprecated public class MixedGraphUnion<V,E> extends GraphUnion<V,E,Graph<V,E>> implements DirectedGraph<V,E>
Since this graph is a union of an undirected and a directed graph, calls to method
incomingEdgesOf(Object)
and/or
outgoingEdgesOf(Object)
might return edges having their source and target
vertices in the opposite order. Similarly methods degreeOf(Object)
,
inDegreeOf(Object)
and outDegreeOf(Object)
will
return the sum of the degrees in the underlying graphs.
DEFAULT_EDGE_WEIGHT
Constructor and Description |
---|
MixedGraphUnion(UndirectedGraph<V,E> g1,
DirectedGraph<V,E> g2)
Deprecated.
Construct a new graph union.
|
MixedGraphUnion(UndirectedGraph<V,E> g1,
DirectedGraph<V,E> g2,
WeightCombiner operator)
Deprecated.
Construct a new graph union.
|
Modifier and Type | Method and Description |
---|---|
int |
degreeOf(V vertex)
Deprecated.
Returns the degree of the specified vertex.
|
Set<E> |
incomingEdgesOf(V vertex)
Deprecated.
Returns a set of all edges incoming into the specified vertex.
|
int |
inDegreeOf(V vertex)
Deprecated.
Returns the "in degree" of the specified vertex.
|
int |
outDegreeOf(V vertex)
Deprecated.
Returns the "out degree" of the specified vertex.
|
Set<E> |
outgoingEdgesOf(V vertex)
Deprecated.
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, getType, removeEdge, removeEdge, removeVertex, setEdgeWeight, vertexSet
assertVertexExist, containsEdge, equals, hashCode, removeAllEdges, removeAllEdges, removeAllEdges, removeAllVertices, toString, toStringFromSets
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addEdge, addEdge, addVertex, containsEdge, containsEdge, containsVertex, edgeSet, edgesOf, getAllEdges, getEdge, getEdgeFactory, getEdgeSource, getEdgeTarget, getEdgeWeight, getType, removeAllEdges, removeAllEdges, removeAllVertices, removeEdge, removeEdge, removeVertex, setEdgeWeight, vertexSet
public 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)
Graph
The "in degree" of a vertex in a directed graph is the number of inward directed edges from that vertex. See http://mathworld.wolfram.com/Indegree.html.
In the case of undirected graphs this method returns the number of edges touching the vertex. Edges with same source and target vertices (self-loops) are counted twice.
inDegreeOf
in interface Graph<V,E>
inDegreeOf
in class GraphUnion<V,E,Graph<V,E>>
vertex
- vertex whose degree is to be calculated.public Set<E> incomingEdgesOf(V vertex)
Graph
In the case of undirected graphs this method returns all edges touching the vertex, thus, some of the returned edges may have their source and target vertices in the opposite order.
incomingEdgesOf
in interface Graph<V,E>
incomingEdgesOf
in class GraphUnion<V,E,Graph<V,E>>
vertex
- the vertex for which the list of incoming edges to be returned.public int outDegreeOf(V vertex)
Graph
The "out degree" of a vertex in a directed graph is the number of outward directed edges from that vertex. See http://mathworld.wolfram.com/Outdegree.html.
In the case of undirected graphs this method returns the number of edges touching the vertex. Edges with same source and target vertices (self-loops) are counted twice.
outDegreeOf
in interface Graph<V,E>
outDegreeOf
in class GraphUnion<V,E,Graph<V,E>>
vertex
- vertex whose degree is to be calculated.public Set<E> outgoingEdgesOf(V vertex)
Graph
In the case of undirected graphs this method returns all edges touching the vertex, thus, some of the returned edges may have their source and target vertices in the opposite order.
outgoingEdgesOf
in interface Graph<V,E>
outgoingEdgesOf
in class GraphUnion<V,E,Graph<V,E>>
vertex
- the vertex for which the list of outgoing edges to be returned.public int degreeOf(V vertex)
Graph
A degree of a vertex in an undirected graph is the number of edges touching that vertex. Edges with same source and target vertices (self-loops) are counted twice.
In directed graphs this method returns the sum of the "in degree" and the "out degree".
Copyright © 2017. All rights reserved.