Class SoftMutableBidirectionalGraph<TVertex, TEdge>
Bidirectional graph that implements soft mutability.
Inheritance
Implements
Inherited Members
Namespace: GraphShape
Assembly: GraphShape.dll
Syntax
[Serializable]
public class SoftMutableBidirectionalGraph<TVertex, TEdge> : BidirectionalGraph<TVertex, TEdge>, IEdgeListAndIncidenceGraph<TVertex, TEdge>, IMutableBidirectionalGraph<TVertex, TEdge>, IMutableVertexAndEdgeListGraph<TVertex, TEdge>, IMutableVertexListGraph<TVertex, TEdge>, IMutableIncidenceGraph<TVertex, TEdge>, IMutableVertexAndEdgeSet<TVertex, TEdge>, IMutableVertexSet<TVertex>, IMutableEdgeListGraph<TVertex, TEdge>, IMutableGraph<TVertex, TEdge>, ICloneable, ISoftMutableGraph<TVertex, TEdge>, IBidirectionalGraph<TVertex, TEdge>, IVertexAndEdgeListGraph<TVertex, TEdge>, IVertexListGraph<TVertex, TEdge>, IEdgeListGraph<TVertex, TEdge>, IVertexSet<TVertex>, IEdgeSet<TVertex, TEdge>, IBidirectionalIncidenceGraph<TVertex, TEdge>, IIncidenceGraph<TVertex, TEdge>, IImplicitGraph<TVertex, TEdge>, IGraph<TVertex, TEdge>, IImplicitVertexSet<TVertex> where TEdge : IEdge<TVertex>
Type Parameters
Name | Description |
---|---|
TVertex | Vertex type. |
TEdge | Edge type. |
Constructors
| Improve this Doc View SourceSoftMutableBidirectionalGraph()
Initializes a new instance of the SoftMutableHierarchicalGraph<TVertex, TEdge> class.
Declaration
public SoftMutableBidirectionalGraph()
SoftMutableBidirectionalGraph(Boolean)
Initializes a new instance of the SoftMutableHierarchicalGraph<TVertex, TEdge> class.
Declaration
public SoftMutableBidirectionalGraph(bool allowParallelEdges)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | allowParallelEdges | Indicates if parallel edges are allowed. |
SoftMutableBidirectionalGraph(Boolean, Int32)
Initializes a new instance of the SoftMutableHierarchicalGraph<TVertex, TEdge> class.
Declaration
public SoftMutableBidirectionalGraph(bool allowParallelEdges, int capacity)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | allowParallelEdges | Indicates if parallel edges are allowed. |
System.Int32 | capacity | Vertex capacity. |
Properties
| Improve this Doc View SourceHiddenEdgeCount
Gets the number of hidden edges.
Declaration
public int HiddenEdgeCount { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
HiddenEdges
Gets the set of hidden edges.
Declaration
public IEnumerable<TEdge> HiddenEdges { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<TEdge> |
HiddenVertexCount
Gets the number of hidden vertices.
Declaration
public int HiddenVertexCount { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
HiddenVertices
Gets the set of hidden vertices.
Declaration
public IEnumerable<TVertex> HiddenVertices { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<TVertex> |
Methods
| Improve this Doc View SourceHiddenEdgeCountOf(TVertex)
Gets the number of hidden edges connected to the given vertex
.
Declaration
public int HiddenEdgeCountOf(TVertex vertex)
Parameters
Type | Name | Description |
---|---|---|
TVertex | vertex | Vertex to check. |
Returns
Type | Description |
---|---|
System.Int32 | Number of hidden edges. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
QuikGraph.VertexNotFoundException |
|
HiddenEdgesOf(TVertex)
Gets the hidden edges connected to the given vertex
.
Declaration
public IEnumerable<TEdge> HiddenEdgesOf(TVertex vertex)
Parameters
Type | Name | Description |
---|---|---|
TVertex | vertex | Vertex to check. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<TEdge> | Hidden edges. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
QuikGraph.VertexNotFoundException |
|
HideEdge(TEdge)
Hides the given edge
.
Declaration
public bool HideEdge(TEdge edge)
Parameters
Type | Name | Description |
---|---|---|
TEdge | edge | Edge to hide. |
Returns
Type | Description |
---|---|
System.Boolean | True if the edge is hidden, false otherwise. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
HideEdge(TEdge, String)
Hides the given edge
, and gives a tag
associated to this hidden edge.
Declaration
public bool HideEdge(TEdge edge, string tag)
Parameters
Type | Name | Description |
---|---|---|
TEdge | edge | Edge to hide. |
System.String | tag | Tag associated to the hidden edge. |
Returns
Type | Description |
---|---|
System.Boolean | True if the edge is hidden, false otherwise. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
System.ArgumentNullException |
|
HideEdges(IEnumerable<TEdge>)
Hides the given set of edges
.
Declaration
public void HideEdges(IEnumerable<TEdge> edges)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<TEdge> | edges | Edges to hide. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
HideEdges(IEnumerable<TEdge>, String)
Hides the given set of edges
, and gives a tag
associated to this hidden edges.
Declaration
public void HideEdges(IEnumerable<TEdge> edges, string tag)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<TEdge> | edges | Edges to hide. |
System.String | tag | Tag associated to the hidden edges. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
System.ArgumentNullException |
|
HideEdgesIf(Predicate<TEdge>, String)
Hides edges matching the given predicate
, and gives a tag
associated to these hidden edges.
Declaration
public void HideEdgesIf(Predicate<TEdge> predicate, string tag)
Parameters
Type | Name | Description |
---|---|---|
System.Predicate<TEdge> | predicate | Hide predicate. |
System.String | tag | Tag associated to the hidden edges. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
System.ArgumentNullException |
|
HideVertex(TVertex)
Hides the given vertex
.
Declaration
public bool HideVertex(TVertex vertex)
Parameters
Type | Name | Description |
---|---|---|
TVertex | vertex | Vertex to hide. |
Returns
Type | Description |
---|---|
System.Boolean | True if the vertex is hidden, false otherwise. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
QuikGraph.VertexNotFoundException |
|
HideVertex(TVertex, String)
Hides the given vertex
, and gives a tag
associated to this hidden vertex.
Declaration
public bool HideVertex(TVertex vertex, string tag)
Parameters
Type | Name | Description |
---|---|---|
TVertex | vertex | Vertex to hide. |
System.String | tag | Tag associated to the hidden vertex. |
Returns
Type | Description |
---|---|
System.Boolean | True if the vertex is hidden, false otherwise. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
System.ArgumentNullException |
|
QuikGraph.VertexNotFoundException |
|
HideVertices(IEnumerable<TVertex>)
Hides the given set of vertices
.
Declaration
public void HideVertices(IEnumerable<TVertex> vertices)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<TVertex> | vertices | Vertices to hide. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
QuikGraph.VertexNotFoundException | At least one of |
HideVertices(IEnumerable<TVertex>, String)
Hides the given set of vertices
, and gives a tag
associated to these hidden vertices.
Declaration
public void HideVertices(IEnumerable<TVertex> vertices, string tag)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<TVertex> | vertices | Vertices to hide. |
System.String | tag | Tag associated to the hidden vertices. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
QuikGraph.VertexNotFoundException | At least one of |
System.ArgumentNullException |
|
HideVerticesIf(Predicate<TVertex>, String)
Hides vertices matching the given predicate
, and gives a tag
associated to these hidden vertices.
Declaration
public void HideVerticesIf(Predicate<TVertex> predicate, string tag)
Parameters
Type | Name | Description |
---|---|---|
System.Predicate<TVertex> | predicate | Hide predicate. |
System.String | tag | Tag associated to the hidden vertices. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
System.ArgumentNullException |
|
IsHiddenEdge(TEdge)
Checks if the given edge
is hidden.
Declaration
public bool IsHiddenEdge(TEdge edge)
Parameters
Type | Name | Description |
---|---|---|
TEdge | edge | Edge to check. |
Returns
Type | Description |
---|---|
System.Boolean | True if the edge is hidden, false otherwise. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
IsHiddenVertex(TVertex)
Checks if the given vertex
is hidden.
Declaration
public bool IsHiddenVertex(TVertex vertex)
Parameters
Type | Name | Description |
---|---|---|
TVertex | vertex | Vertex to check. |
Returns
Type | Description |
---|---|
System.Boolean | True if the vertex is hidden, false otherwise. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
QuikGraph.VertexNotFoundException |
|
Unhide(String)
Un-hides all vertices and edges that were hidden with the given tag
.
Declaration
public bool Unhide(string tag)
Parameters
Type | Name | Description |
---|---|---|
System.String | tag | Tag to un-hide. |
Returns
Type | Description |
---|---|
System.Boolean | True if the tag has been un-hidden, false otherwise. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
UnhideAll()
Un-hides all hidden vertices and edges.
Declaration
public bool UnhideAll()
Returns
Type | Description |
---|---|
System.Boolean | True if operation succeed, false otherwise. |
UnhideEdge(TEdge)
Un-hides the given edge
if it is hidden.
Declaration
public bool UnhideEdge(TEdge edge)
Parameters
Type | Name | Description |
---|---|---|
TEdge | edge | Edge to un-hide. |
Returns
Type | Description |
---|---|
System.Boolean | True if the edge has been un-hidden, false otherwise. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
UnhideEdges(IEnumerable<TEdge>)
Un-hides the given edges
if they are hidden.
Declaration
public void UnhideEdges(IEnumerable<TEdge> edges)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<TEdge> | edges | Edges to un-hide. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
UnhideEdgesIf(Predicate<TEdge>)
Un-hides edges matching the given predicate
.
Declaration
public void UnhideEdgesIf(Predicate<TEdge> predicate)
Parameters
Type | Name | Description |
---|---|---|
System.Predicate<TEdge> | predicate | Un-hide predicate. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
UnhideVertex(TVertex)
Un-hides the given vertex
if it is hidden.
Declaration
public bool UnhideVertex(TVertex vertex)
Parameters
Type | Name | Description |
---|---|---|
TVertex | vertex | Vertex to un-hide. |
Returns
Type | Description |
---|---|
System.Boolean | True if the vertex has been un-hidden, false otherwise. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
QuikGraph.VertexNotFoundException |
|
UnhideVertexAndEdges(TVertex)
Un-hides the given vertex
and its connected edges if they are hidden.
Declaration
public void UnhideVertexAndEdges(TVertex vertex)
Parameters
Type | Name | Description |
---|---|---|
TVertex | vertex | Vertex to un-hide. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
QuikGraph.VertexNotFoundException |
|
Events
| Improve this Doc View SourceEdgeHidden
Fired when an edge has been hidden.
Declaration
public event EdgeAction<TVertex, TEdge> EdgeHidden
Event Type
Type | Description |
---|---|
QuikGraph.EdgeAction<TVertex, TEdge> |
EdgeUnhidden
Fired when an edge has been unhidden.
Declaration
public event EdgeAction<TVertex, TEdge> EdgeUnhidden
Event Type
Type | Description |
---|---|
QuikGraph.EdgeAction<TVertex, TEdge> |
VertexHidden
Fired when a vertex has been hidden.
Declaration
public event VertexAction<TVertex> VertexHidden
Event Type
Type | Description |
---|---|
QuikGraph.VertexAction<TVertex> |
VertexUnhidden
Fired when a vertex has been unhidden.
Declaration
public event VertexAction<TVertex> VertexUnhidden
Event Type
Type | Description |
---|---|
QuikGraph.VertexAction<TVertex> |