Class GraphModel<TNode, TContainment, TConnection>
- Namespace
- Shift.Common.Graphs
- Assembly
- Shift.Common.dll
public class GraphModel<TNode, TContainment, TConnection> : IGraph, ISerializable where TNode : GraphNodeModel where TContainment : GraphEdgeModel where TConnection : GraphEdgeModel
Type Parameters
TNode
TContainment
TConnection
- Inheritance
-
GraphModel<TNode, TContainment, TConnection>
- Implements
-
- Inherited Members
-
- Extension Methods
-
Constructors
GraphModel()
Properties
Nodes
public IEnumerable<TNode> Nodes { get; }
Property Value
- IEnumerable<TNode>
Methods
AddConnection(TConnection)
public void AddConnection(TConnection edge)
Parameters
edge TConnection
AddContainment(TContainment)
public void AddContainment(TContainment edge)
Parameters
edge TContainment
AddNode(TNode)
public void AddNode(TNode node)
Parameters
node TNode
GetIncomingConnections(Guid)
public IReadOnlyList<TConnection> GetIncomingConnections(Guid nodeId)
Parameters
nodeId Guid
Returns
- IReadOnlyList<TConnection>
GetIncomingContainments(Guid)
public IReadOnlyList<TContainment> GetIncomingContainments(Guid nodeId)
Parameters
nodeId Guid
Returns
- IReadOnlyList<TContainment>
GetNode(Guid)
public TNode GetNode(Guid nodeId)
Parameters
nodeId Guid
Returns
- TNode
GetOutgoingConnections(Guid)
public IReadOnlyList<TConnection> GetOutgoingConnections(Guid nodeId)
Parameters
nodeId Guid
Returns
- IReadOnlyList<TConnection>
GetOutgoingContainments(Guid)
public IReadOnlyList<TContainment> GetOutgoingContainments(Guid nodeId)
Parameters
nodeId Guid
Returns
- IReadOnlyList<TContainment>
HasNode(Guid)
public bool HasNode(Guid nodeId)
Parameters
nodeId Guid
Returns
- bool
HasNode(TNode)
public bool HasNode(TNode node)
Parameters
node TNode
Returns
- bool
ReplaceNode(TNode)
public void ReplaceNode(TNode node)
Parameters
node TNode