C# Class RC3.Graphs.Digraph

Simple adjaceny list representation of a directed graph.
Inheritance: IDigraph
Datei anzeigen Open project: Bartlett-RC3/RC3-Sandbox-2017 Class Usage Examples

Public Properties

Property Type Description
Factory RC3.Graphs.DigraphFactory

Public Methods

Method Description
AddEdge ( int v0, int v1 ) : void

Adds an edge from the first given vertex to the second.

AddVertex ( ) : void

Adds a new vertex to the graph.

AddVertex ( int capacityOut, int capacityIn ) : void

Digraph ( int vertexCapacity = _defaultCapacity ) : System

GetDegreeIn ( int vertex ) : int

Returns the the number of vertices that connect to the given vertex.

GetDegreeOut ( int vertex ) : int

Returns the number of vertices that the given vertex connects to.

GetVertexNeighborIn ( int vertex, int index ) : int

GetVertexNeighborOut ( int vertex, int index ) : int

GetVertexNeighborsIn ( int vertex ) : IEnumerable

Returns all vertices that connect to the given vertex.

GetVertexNeighborsOut ( int vertex ) : IEnumerable

Returns all vertices that the given vertex connects to.

HasEdge ( int v0, int v1 ) : bool

Method Details

AddEdge() public method

Adds an edge from the first given vertex to the second.
public AddEdge ( int v0, int v1 ) : void
v0 int
v1 int
return void

AddVertex() public method

Adds a new vertex to the graph.
public AddVertex ( ) : void
return void

AddVertex() public method

public AddVertex ( int capacityOut, int capacityIn ) : void
capacityOut int
capacityIn int
return void

Digraph() public method

public Digraph ( int vertexCapacity = _defaultCapacity ) : System
vertexCapacity int
return System

GetDegreeIn() public method

Returns the the number of vertices that connect to the given vertex.
public GetDegreeIn ( int vertex ) : int
vertex int
return int

GetDegreeOut() public method

Returns the number of vertices that the given vertex connects to.
public GetDegreeOut ( int vertex ) : int
vertex int
return int

GetVertexNeighborIn() public method

public GetVertexNeighborIn ( int vertex, int index ) : int
vertex int
index int
return int

GetVertexNeighborOut() public method

public GetVertexNeighborOut ( int vertex, int index ) : int
vertex int
index int
return int

GetVertexNeighborsIn() public method

Returns all vertices that connect to the given vertex.
public GetVertexNeighborsIn ( int vertex ) : IEnumerable
vertex int
return IEnumerable

GetVertexNeighborsOut() public method

Returns all vertices that the given vertex connects to.
public GetVertexNeighborsOut ( int vertex ) : IEnumerable
vertex int
return IEnumerable

HasEdge() public method

public HasEdge ( int v0, int v1 ) : bool
v0 int
v1 int
return bool

Property Details

Factory public_oe static_oe property

public static DigraphFactory,RC3.Graphs Factory
return RC3.Graphs.DigraphFactory