TypeVertex
- The type of values stored in the vertices. Must be a Comparable type.TypeEdge
- The type of values stored in the edges. Must be a Comparable type.public class GraphMultiDirectedValuated<TypeVertex extends java.lang.Comparable<TypeVertex>,TypeEdge extends java.lang.Comparable<TypeEdge>> extends java.lang.Object implements GraphDirectedValuated<TypeVertex,TypeEdge>, GraphMultiDirected<TypeVertex>, GraphMultiValuated<TypeVertex,TypeEdge>
Constructor and Description |
---|
GraphMultiDirectedValuated(TypeEdge defaultValue)
Create a new graph.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clear the graph (vertices and edges).
|
TypeEdge |
getDefaultValue()
Get the default value used for new edges.
|
EdgesMultiDirectedValuated<TypeVertex,TypeEdge> |
getEdges()
Get the edges of the graph.
|
VerticesDirected<TypeVertex> |
getVertices()
Get the vertices of the graph.
|
void |
importFrom(Graph<TypeVertex> graph)
Import a graph from another one.
|
public GraphMultiDirectedValuated(TypeEdge defaultValue)
defaultValue
- The default value for new edges.public final void clear()
Graph
clear
in interface Graph<TypeVertex extends java.lang.Comparable<TypeVertex>>
public final TypeEdge getDefaultValue()
GraphValuated
getDefaultValue
in interface GraphValuated<TypeVertex extends java.lang.Comparable<TypeVertex>,TypeEdge extends java.lang.Comparable<TypeEdge>>
public final EdgesMultiDirectedValuated<TypeVertex,TypeEdge> getEdges()
Graph
getEdges
in interface Graph<TypeVertex extends java.lang.Comparable<TypeVertex>>
getEdges
in interface GraphDirected<TypeVertex extends java.lang.Comparable<TypeVertex>>
getEdges
in interface GraphDirectedValuated<TypeVertex extends java.lang.Comparable<TypeVertex>,TypeEdge extends java.lang.Comparable<TypeEdge>>
getEdges
in interface GraphMulti<TypeVertex extends java.lang.Comparable<TypeVertex>>
getEdges
in interface GraphMultiDirected<TypeVertex extends java.lang.Comparable<TypeVertex>>
getEdges
in interface GraphMultiValuated<TypeVertex extends java.lang.Comparable<TypeVertex>,TypeEdge extends java.lang.Comparable<TypeEdge>>
getEdges
in interface GraphValuated<TypeVertex extends java.lang.Comparable<TypeVertex>,TypeEdge extends java.lang.Comparable<TypeEdge>>
public final VerticesDirected<TypeVertex> getVertices()
Graph
getVertices
in interface Graph<TypeVertex extends java.lang.Comparable<TypeVertex>>
getVertices
in interface GraphDirected<TypeVertex extends java.lang.Comparable<TypeVertex>>
getVertices
in interface GraphValuated<TypeVertex extends java.lang.Comparable<TypeVertex>,TypeEdge extends java.lang.Comparable<TypeEdge>>
public final void importFrom(Graph<TypeVertex> graph)
Graph
importFrom
in interface Graph<TypeVertex extends java.lang.Comparable<TypeVertex>>
graph
- The original graph.