C# Class Smrf.NodeXL.Core.Edge

Represents an edge.
An edge is a connection between two vertices in the same graph. An edge can be directed or undirected. A directed edge has a front and a back.

An edge always connects two vertices. Although an edge can be created before it is added to a graph, it can't be created without specifying the vertices it connects. An edge can be added only to the graph that contains the edge's vertices.

An Edge can be created via its constructor and then added to a graph via Graph.Edges.EdgeCollection.Add(IEdge), or created and added to a graph at the same time via Graph.Edges..

An edge is immutable, meaning that its vertices can't be removed. An edge can be removed from a graph and disposed of, but once the edge is removed, the edge is unusable. Attempting to access the edge's properties or methods will lead to unpredictable results.

Inheritance: GraphVertexEdgeBase, IEdge
Show file Open project: 2014-sed-team3/term-project Class Usage Examples

Protected Properties

Property Type Description
m_bIsDirected System.Boolean
m_oVertex1 IVertex
m_oVertex2 IVertex

Private Properties

Property Type Description
Edge System

Public Methods

Method Description
AssertValid ( ) : void
Clone ( System.Boolean copyMetadataValues, System.Boolean copyTag ) : IEdge
Clone ( System.Boolean copyMetadataValues, System.Boolean copyTag, IVertex vertex1, IVertex vertex2, System.Boolean isDirected ) : IEdge
Edge ( IVertex vertex1, IVertex vertex2, System.Boolean isDirected ) : System

Initializes a new instance of the Edge class.

GetAdjacentVertex ( IVertex vertex ) : IVertex
IsAntiparallelTo ( IEdge otherEdge ) : System.Boolean
IsParallelTo ( IEdge otherEdge ) : System.Boolean

Protected Methods

Method Description
CheckVertexArgument ( IVertex oVertex, String sArgumentName ) : void
EdgeToVertices ( IEdge oEdge, String sClassName, String sMethodOrPropertyName, Vertex &oVertex1, Vertex &oVertex2 ) : void
IEdgeToEdge ( IEdge oEdge, String sClassName, String sMethodOrPropertyName ) : Edge

Private Methods

Method Description
Edge ( ) : System

Method Details

AssertValid() public method

public AssertValid ( ) : void
return void

CheckVertexArgument() protected method

protected CheckVertexArgument ( IVertex oVertex, String sArgumentName ) : void
oVertex IVertex
sArgumentName String
return void

Clone() public method

public Clone ( System.Boolean copyMetadataValues, System.Boolean copyTag ) : IEdge
copyMetadataValues System.Boolean
copyTag System.Boolean
return IEdge

Clone() public method

public Clone ( System.Boolean copyMetadataValues, System.Boolean copyTag, IVertex vertex1, IVertex vertex2, System.Boolean isDirected ) : IEdge
copyMetadataValues System.Boolean
copyTag System.Boolean
vertex1 IVertex
vertex2 IVertex
isDirected System.Boolean
return IEdge

Edge() public method

Initializes a new instance of the Edge class.
public Edge ( IVertex vertex1, IVertex vertex2, System.Boolean isDirected ) : System
vertex1 IVertex /// The edge's first vertex. The vertex must have already been added to /// the graph to which the new edge will be added. ///
vertex2 IVertex /// The edge's second vertex. The vertex must have already been added to /// the graph to which the new edge will be added. ///
isDirected System.Boolean /// If true, is the edge's back vertex and /// is the edge's front vertex. If false, the /// edge is undirected. ///
return System

EdgeToVertices() protected static method

protected static EdgeToVertices ( IEdge oEdge, String sClassName, String sMethodOrPropertyName, Vertex &oVertex1, Vertex &oVertex2 ) : void
oEdge IEdge
sClassName String
sMethodOrPropertyName String
oVertex1 Vertex
oVertex2 Vertex
return void

GetAdjacentVertex() public method

public GetAdjacentVertex ( IVertex vertex ) : IVertex
vertex IVertex
return IVertex

IEdgeToEdge() protected static method

protected static IEdgeToEdge ( IEdge oEdge, String sClassName, String sMethodOrPropertyName ) : Edge
oEdge IEdge
sClassName String
sMethodOrPropertyName String
return Edge

IsAntiparallelTo() public method

public IsAntiparallelTo ( IEdge otherEdge ) : System.Boolean
otherEdge IEdge
return System.Boolean

IsParallelTo() public method

public IsParallelTo ( IEdge otherEdge ) : System.Boolean
otherEdge IEdge
return System.Boolean

Property Details

m_bIsDirected protected property

protected Boolean,System m_bIsDirected
return System.Boolean

m_oVertex1 protected property

protected IVertex m_oVertex1
return IVertex

m_oVertex2 protected property

protected IVertex m_oVertex2
return IVertex