Show / Hide Table of Contents

Class Graph

Defines an oriented graph.

Inheritance
System.Object
Graph
Graph<TNodeValue>
UnorientedGraph
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Kephas.Graphs
Assembly: Kephas.Core.dll
Syntax
public class Graph

Properties

| Improve this Doc View Source

Edges

Gets a list of the graph edges.

Declaration
public IReadOnlyList<IGraphEdge> Edges { get; }
Property Value
Type Description
System.Collections.Generic.IReadOnlyList<IGraphEdge>
| Improve this Doc View Source

Nodes

Gets a list of the graph nodes.

Declaration
public IReadOnlyList<IGraphNode> Nodes { get; }
Property Value
Type Description
System.Collections.Generic.IReadOnlyList<IGraphNode>

Methods

| Improve this Doc View Source

AddEdge(IGraphEdge)

Adds an edge to the graph, if not already contained.

Declaration
protected bool AddEdge(IGraphEdge edge)
Parameters
Type Name Description
IGraphEdge edge

The edge to be added.

Returns
Type Description
System.Boolean

true if the edge was added, false if it was already contained.

| Improve this Doc View Source

AddEdge(IGraphNode, IGraphNode)

Adds an edge between the two nodes.

Declaration
public virtual IGraphEdge AddEdge(IGraphNode from, IGraphNode to)
Parameters
Type Name Description
IGraphNode from

The starting node.

IGraphNode to

The ending node.

Returns
Type Description
IGraphEdge

The new edge.

| Improve this Doc View Source

AddNode()

Adds a node to the graph and returns it.

Declaration
public virtual IGraphNode AddNode()
Returns
Type Description
IGraphNode

The new node.

| Improve this Doc View Source

AddNode(IGraphNode)

Adds a node to the graph, if not already contained.

Declaration
protected bool AddNode(IGraphNode node)
Parameters
Type Name Description
IGraphNode node

The node to be added.

Returns
Type Description
System.Boolean

true if the node was added, false if it was already contained.

| Improve this Doc View Source

CreateEdge(GraphNode, GraphNode)

Creates an edge between two nodes.

Declaration
protected virtual GraphEdge CreateEdge(GraphNode from, GraphNode to)
Parameters
Type Name Description
GraphNode from

The starting node.

GraphNode to

The ending node.

Returns
Type Description
GraphEdge

The new edge.

| Improve this Doc View Source

CreateNode()

Creates a new node.

Declaration
protected virtual GraphNode CreateNode()
Returns
Type Description
GraphNode

The new node.

| Improve this Doc View Source

CreateSubgraph()

Creates a subgraph.

Declaration
protected virtual Graph CreateSubgraph()
Returns
Type Description
Graph

The new subgraph.

| Improve this Doc View Source

HasEdge(IGraphNode, IGraphNode)

Indicates whether the graph has an edge with the indicated nodes.

Declaration
public bool HasEdge(IGraphNode from, IGraphNode to)
Parameters
Type Name Description
IGraphNode from

The starting node.

IGraphNode to

The ending node.

Returns
Type Description
System.Boolean

true if an edge exists, false if not.

Extension Methods

DynamicObjectExtensions.SetPropertyValue(Object, String, Object)
DynamicObjectExtensions.TrySetPropertyValue(Object, String, Object)
DynamicObjectExtensions.GetPropertyValue(Object, String)
DynamicObjectExtensions.TryGetPropertyValue(Object, String, out Object)
DynamicObjectExtensions.GetRuntimeTypeInfo(Object)
DynamicObjectExtensions.ToDynamic(Object)
DynamicObjectExtensions.ToExpando(Object)
BehaviorValue.ToBehaviorValue<TValue>(TValue)
CollectionExtensions.AddRange<T, TItem>(T, IEnumerable<TItem>)
GraphExtensions.Merge<TGraph>(TGraph, TGraph)
GraphExtensions.GetConnectedSubgraphs<TGraph>(TGraph)
LoggingExtensions.GetLogger(Object, IContext)
TypeExtensions.GetAbstractType(Object)
TypeExtensions.GetAbstractTypeInfo(Object)
ReflectionHelper.GetTypeInfo(Object)
EntityEntryExtensions.TryGetAttachedEntityEntry(Object)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX