Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Struct: RT.Coordinates.Link<T>

Summary

Represents an unordered set of two items.

Generic type parameters

T The type of elements in the set.

Remarks

This type is used in this library for two purposes:

  • When used with cell types (Square, Hex, etc.), it represents a traversible link between two cells.
  • When used with Vertex, it represents an edge connecting two vertices when rendering SVG.

Two instances of Link<T> containing the same two elements will compare equal regardless of the order in which the elements are specified.

Constructors

Link<T>(T elem1, T elem2)
Constructor.

Instance methods

T
Apart(out T other)
Returns the elements of this link in no particular order.
void
Deconstruct(out T elem1, out T elem2)
Deconstructor. (see also remarks)
bool
Equals(Link<T> other)
  • Implements: IEquatable<Link<T>>.Equals(Link<T>)
Refer to the documentation for IEquatable<Link<T>>.Equals.
bool
Equals(object obj)
  • Overrides: object.Equals(object)
Refer to the documentation for object.Equals.
Link<T>.LinkEnumeratorReturns the elements linked by this Link<T> without guaranteeing an order.
int
  • Overrides: object.GetHashCode()
Refer to the documentation for object.GetHashCode.
T
Other(T one)
Given an element in this link, returns the other element.
string
  • Overrides: object.ToString()
Refer to the documentation for object.ToString.

Operators

bool
operator==(Link<T> one, Link<T> two)
Compares two Link<T> values for equality.
bool
operator!=(Link<T> one, Link<T> two)
Compares two Link<T> values for inequality.

Nested types

Iterates the two elements in a Link<T>.