Table of Contents

Struct Edge<TVertex>

Namespace
Graph1x.Edges
Assembly
Graph1x.dll

An unweighted edge between two vertices, with value equality over the (source, target) pair.

public readonly record struct Edge<TVertex> : IEdge<TVertex>, IEquatable<Edge<TVertex>> where TVertex : notnull

Type Parameters

TVertex

The vertex type.

Implements
IEdge<TVertex>
IEquatable<Edge<TVertex>>
Inherited Members

Constructors

Edge(TVertex, TVertex)

Initializes a new edge from source to target.

public Edge(TVertex source, TVertex target)

Parameters

source TVertex

The vertex the edge starts at.

target TVertex

The vertex the edge ends at.

Exceptions

ArgumentNullException

Either vertex is null.

Properties

Source

Gets the vertex the edge starts at.

public TVertex Source { get; }

Property Value

TVertex

Target

Gets the vertex the edge ends at.

public TVertex Target { get; }

Property Value

TVertex

Methods

Deconstruct(out TVertex, out TVertex)

Deconstructs the edge into its endpoints.

public void Deconstruct(out TVertex source, out TVertex target)

Parameters

source TVertex

The vertex the edge starts at.

target TVertex

The vertex the edge ends at.

ToString()

Returns the fully qualified type name of this instance.

public override string ToString()

Returns

string

The fully qualified type name.