Table of Contents

Class Graph

Namespace
LibGameAI.PathFinding
Assembly
PathFinding.dll
public class Graph : IGraph
Inheritance
Graph
Implements
Inherited Members

Constructors

Graph(IList<IEnumerable<IConnection>>)

Create new graph using an adjacency list.

public Graph(IList<IEnumerable<IConnection>> connections)

Parameters

connections IList<IEnumerable<IConnection>>

Adjacency list with which to create graph.

Graph(float[,])

Create new graph using an adjacency matrix.

public Graph(float[,] adjMatrix)

Parameters

adjMatrix float[,]

Adjacency matrix with which to create graph.

Methods

GetConnections(int)

Get all outgoing connections for the given node.

public IEnumerable<IConnection> GetConnections(int fromNode)

Parameters

fromNode int

A node in the graph.

Returns

IEnumerable<IConnection>

All outgoing connections for the given node.