C# Класс numl.Data.Graph

Graph class.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
AddEdge ( IEdge edge ) : void

Inserts the Edge object to the Graph.

Connecting IVertex objects should already be present in the graph before attempting to add a connection.

AddEdges ( IEnumerable edges ) : void

Inserts the enumerable of Edge objects to the Graph.

Connecting IVertex objects should already be present in the graph before attempting to add a connection.

AddVertex ( IVertex v ) : void

Adds the specified IVertex to the current Graph.

AddVertices ( IEnumerable vertices ) : void

Adds the enumerable of IVertex objects to the current Graph.

ContainsVertex ( IVertex v ) : bool

Returns True if the specified vertex exists in the graph.

Equals ( object obj ) : bool

Determines whether the current Graph is equal to the specified Graph object.

GetChildren ( IVertex v ) : IEnumerable

Gets the child vertices for the specified IVertex object.

GetEdges ( ) : IEnumerable

Returns all IEdge objects in the current graph.

GetHashCode ( ) : int

Returns the hash code for this Graph object.

GetInEdges ( IVertex v ) : IEnumerable

Gets the afferent or inbound connections for the specified IVertex object.

GetOutEdges ( IVertex v ) : IEnumerable

Gets the efferent or outbound connections for the specified IVertex object.

GetParents ( IVertex v ) : IEnumerable

Gets the parent vertices for the specified IVertex object.

GetVertex ( int id ) : IVertex

Gets the IVertex associated with the specified identifier.

GetVertices ( ) : IEnumerable

Returns all IVertex objects in the current graph.

Graph ( ) : System

Initializes a new Graph.

RemoveEdge ( IEdge edge ) : void

Removes the Edge object from the graph.

RemoveVertex ( IVertex v ) : void

Removes the specified Vertex and its associated edges from the Graph.

this ( int id ) : IVertex

Gets the IVertex by the specified Id.

Описание методов

AddEdge() публичный Метод

Inserts the Edge object to the Graph.

Connecting IVertex objects should already be present in the graph before attempting to add a connection.

public AddEdge ( IEdge edge ) : void
edge IEdge IEdge object to add.
Результат void

AddEdges() публичный Метод

Inserts the enumerable of Edge objects to the Graph.

Connecting IVertex objects should already be present in the graph before attempting to add a connection.

public AddEdges ( IEnumerable edges ) : void
edges IEnumerable Collection of IEdge objects to add.
Результат void

AddVertex() публичный Метод

Adds the specified IVertex to the current Graph.
public AddVertex ( IVertex v ) : void
v IVertex IVertex object to add.
Результат void

AddVertices() публичный Метод

Adds the enumerable of IVertex objects to the current Graph.
public AddVertices ( IEnumerable vertices ) : void
vertices IEnumerable Collection of IVertex objects to add.
Результат void

ContainsVertex() публичный Метод

Returns True if the specified vertex exists in the graph.
public ContainsVertex ( IVertex v ) : bool
v IVertex IVertex to check exists.
Результат bool

Equals() публичный Метод

Determines whether the current Graph is equal to the specified Graph object.
public Equals ( object obj ) : bool
obj object Graph object.
Результат bool

GetChildren() публичный Метод

Gets the child vertices for the specified IVertex object.
public GetChildren ( IVertex v ) : IEnumerable
v IVertex IVertex object to return child vertices for.
Результат IEnumerable

GetEdges() публичный Метод

Returns all IEdge objects in the current graph.
public GetEdges ( ) : IEnumerable
Результат IEnumerable

GetHashCode() публичный Метод

Returns the hash code for this Graph object.
public GetHashCode ( ) : int
Результат int

GetInEdges() публичный Метод

Gets the afferent or inbound connections for the specified IVertex object.
public GetInEdges ( IVertex v ) : IEnumerable
v IVertex IVertex object to return edges for.
Результат IEnumerable

GetOutEdges() публичный Метод

Gets the efferent or outbound connections for the specified IVertex object.
public GetOutEdges ( IVertex v ) : IEnumerable
v IVertex IVertex object to return edges for.
Результат IEnumerable

GetParents() публичный Метод

Gets the parent vertices for the specified IVertex object.
public GetParents ( IVertex v ) : IEnumerable
v IVertex IVertex object to return parent vertices for.
Результат IEnumerable

GetVertex() публичный Метод

Gets the IVertex associated with the specified identifier.
public GetVertex ( int id ) : IVertex
id int Identifier of the IVertex to return.
Результат IVertex

GetVertices() публичный Метод

Returns all IVertex objects in the current graph.
public GetVertices ( ) : IEnumerable
Результат IEnumerable

Graph() публичный Метод

Initializes a new Graph.
public Graph ( ) : System
Результат System

RemoveEdge() публичный Метод

Removes the Edge object from the graph.
public RemoveEdge ( IEdge edge ) : void
edge IEdge IEdge object to remove.
Результат void

RemoveVertex() публичный Метод

Removes the specified Vertex and its associated edges from the Graph.
public RemoveVertex ( IVertex v ) : void
v IVertex IVertex to remove.
Результат void

this() публичный Метод

Gets the IVertex by the specified Id.
public this ( int id ) : IVertex
id int The key of the specified IVertex to return.
Результат IVertex