C# 클래스 numl.Data.Graph

Graph class.
파일 보기 프로젝트 열기: sethjuarez/numl 1 사용 예제들

공개 메소드들

메소드 설명
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