Show / Hide Table of Contents

Class Graph<TNodeValue>

Defines an oriented graph with value nodes.

Inheritance
System.Object
Graph
Graph<TNodeValue>
UnorientedGraph<TNodeValue>
Inherited Members
Graph.Nodes
Graph.Edges
Graph.AddEdge(IGraphNode, IGraphNode)
Graph.HasEdge(IGraphNode, IGraphNode)
Graph.AddNode(IGraphNode)
Graph.AddEdge(IGraphEdge)
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<TNodeValue> : Graph
Type Parameters
Name Description
TNodeValue

Type of the node value.

Methods

| Improve this Doc View Source

AddEdge(TNodeValue, TNodeValue)

Adds an edge between two nodes having the given values. If for a value a corresponding node cannot be found, it will be created. If multiple nodes with the same value are found, an exception occurs.

Declaration
public IGraphEdge<TNodeValue> AddEdge(TNodeValue fromValue, TNodeValue toValue)
Parameters
Type Name Description
TNodeValue fromValue

The starting node identified by this value.

TNodeValue toValue

The ending node identified by this value.

Returns
Type Description
IGraphEdge<TNodeValue>

The new edge.

| Improve this Doc View Source

AddEdge(IGraphNode<TNodeValue>, IGraphNode<TNodeValue>)

Adds an edge between the two nodes.

Declaration
public IGraphEdge<TNodeValue> AddEdge(IGraphNode<TNodeValue> from, IGraphNode<TNodeValue> to)
Parameters
Type Name Description
IGraphNode<TNodeValue> from

The starting node.

IGraphNode<TNodeValue> to

The ending node.

Returns
Type Description
IGraphEdge<TNodeValue>

The new edge.

| Improve this Doc View Source

AddNode()

Adds a node to the graph and returns it.

Declaration
public IGraphNode<TNodeValue> AddNode()
Returns
Type Description
IGraphNode<TNodeValue>

The new node.

| Improve this Doc View Source

AddNode(TNodeValue)

Adds a node with the given value to the graph and returns it.

Declaration
public IGraphNode<TNodeValue> AddNode(TNodeValue value)
Parameters
Type Name Description
TNodeValue value

The node value.

Returns
Type Description
IGraphNode<TNodeValue>

The new node.

| Improve this Doc View Source

CreateEdge(GraphNode, GraphNode)

Creates an edge between two nodes.

Declaration
protected override 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.

Overrides
Graph.CreateEdge(GraphNode, GraphNode)
| Improve this Doc View Source

CreateNode()

Creates a new node.

Declaration
protected override GraphNode CreateNode()
Returns
Type Description
GraphNode

The new node.

Overrides
Graph.CreateNode()
| Improve this Doc View Source

CreateSubgraph()

Creates a subgraph.

Declaration
protected override Graph CreateSubgraph()
Returns
Type Description
Graph

The new subgraph.

Overrides
Graph.CreateSubgraph()
| Improve this Doc View Source

FindNodesByValue(TNodeValue)

Finds the nodes holding the provided value.

Declaration
public IEnumerable<IGraphNode<TNodeValue>> FindNodesByValue(TNodeValue value)
Parameters
Type Name Description
TNodeValue value

The node value.

Returns
Type Description
System.Collections.Generic.IEnumerable<IGraphNode<TNodeValue>>

An enumeration of found nodes.

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