C# Class numl.Data.Graph

Graph class.
Afficher le fichier Open project: sethjuarez/numl Class Usage Examples

Méthodes publiques

Méthode Description
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.

Method Details

AddEdge() public méthode

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.
Résultat void

AddEdges() public méthode

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.
Résultat void

AddVertex() public méthode

Adds the specified IVertex to the current Graph.
public AddVertex ( IVertex v ) : void
v IVertex IVertex object to add.
Résultat void

AddVertices() public méthode

Adds the enumerable of IVertex objects to the current Graph.
public AddVertices ( IEnumerable vertices ) : void
vertices IEnumerable Collection of IVertex objects to add.
Résultat void

ContainsVertex() public méthode

Returns True if the specified vertex exists in the graph.
public ContainsVertex ( IVertex v ) : bool
v IVertex IVertex to check exists.
Résultat bool

Equals() public méthode

Determines whether the current Graph is equal to the specified Graph object.
public Equals ( object obj ) : bool
obj object Graph object.
Résultat bool

GetChildren() public méthode

Gets the child vertices for the specified IVertex object.
public GetChildren ( IVertex v ) : IEnumerable
v IVertex IVertex object to return child vertices for.
Résultat IEnumerable

GetEdges() public méthode

Returns all IEdge objects in the current graph.
public GetEdges ( ) : IEnumerable
Résultat IEnumerable

GetHashCode() public méthode

Returns the hash code for this Graph object.
public GetHashCode ( ) : int
Résultat int

GetInEdges() public méthode

Gets the afferent or inbound connections for the specified IVertex object.
public GetInEdges ( IVertex v ) : IEnumerable
v IVertex IVertex object to return edges for.
Résultat IEnumerable

GetOutEdges() public méthode

Gets the efferent or outbound connections for the specified IVertex object.
public GetOutEdges ( IVertex v ) : IEnumerable
v IVertex IVertex object to return edges for.
Résultat IEnumerable

GetParents() public méthode

Gets the parent vertices for the specified IVertex object.
public GetParents ( IVertex v ) : IEnumerable
v IVertex IVertex object to return parent vertices for.
Résultat IEnumerable

GetVertex() public méthode

Gets the IVertex associated with the specified identifier.
public GetVertex ( int id ) : IVertex
id int Identifier of the IVertex to return.
Résultat IVertex

GetVertices() public méthode

Returns all IVertex objects in the current graph.
public GetVertices ( ) : IEnumerable
Résultat IEnumerable

Graph() public méthode

Initializes a new Graph.
public Graph ( ) : System
Résultat System

RemoveEdge() public méthode

Removes the Edge object from the graph.
public RemoveEdge ( IEdge edge ) : void
edge IEdge IEdge object to remove.
Résultat void

RemoveVertex() public méthode

Removes the specified Vertex and its associated edges from the Graph.
public RemoveVertex ( IVertex v ) : void
v IVertex IVertex to remove.
Résultat void

this() public méthode

Gets the IVertex by the specified Id.
public this ( int id ) : IVertex
id int The key of the specified IVertex to return.
Résultat IVertex