Show / Hide Table of Contents

Struct MatrixLocation

A simple struct for describing a matrix row/column location.

Implements
IEquatable<MatrixLocation>
Inherited Members
object.Equals(object, object)
object.GetType()
object.ReferenceEquals(object, object)
Namespace: SpiceSharp.Algebra
Assembly: SpiceSharp.dll
Syntax
public readonly struct MatrixLocation : IEquatable<MatrixLocation>

Constructors

MatrixLocation(int, int)

Initializes a new instance of the MatrixLocation struct.

Declaration
public MatrixLocation(int row, int column)
Parameters
Type Name Description
int row

The row.

int column

The column.

Exceptions
Type Condition
ArgumentOutOfRangeException

Thrown if row or column is not positive.

Fields

Column

The column index.

Declaration
public readonly int Column
Field Value
Type Description
int

Row

The row index.

Declaration
public readonly int Row
Field Value
Type Description
int

Methods

Equals(MatrixLocation)

Indicates whether the current object is equal to another object of the same type.

Declaration
public bool Equals(MatrixLocation other)
Parameters
Type Name Description
MatrixLocation other

An object to compare with this object.

Returns
Type Description
bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object)

Determines whether the specified object, is equal to this instance.

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
object obj

The object to compare with this instance.

Returns
Type Description
bool

true if the specified object is equal to this instance; otherwise, false.

Overrides
ValueType.Equals(object)

GetHashCode()

Returns a hash code for this instance.

Declaration
public override int GetHashCode()
Returns
Type Description
int

A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.

Overrides
ValueType.GetHashCode()

ToString()

Converts to string.

Declaration
public override string ToString()
Returns
Type Description
string

A string that represents this instance.

Overrides
ValueType.ToString()

Operators

operator ==(MatrixLocation, MatrixLocation)

Implements the operator ==.

Declaration
public static bool operator ==(MatrixLocation left, MatrixLocation right)
Parameters
Type Name Description
MatrixLocation left

The left argument.

MatrixLocation right

The right argument.

Returns
Type Description
bool

The result of the operator.

operator !=(MatrixLocation, MatrixLocation)

Implements the operator !=.

Declaration
public static bool operator !=(MatrixLocation left, MatrixLocation right)
Parameters
Type Name Description
MatrixLocation left

The left argument.

MatrixLocation right

The right argument.

Returns
Type Description
bool

The result of the operator.

Implements

IEquatable<T>

Extension Methods

Utility.ThrowIfNull<T>(T, string)
In this article
Back to top Generated by DocFX