Show / Hide Table of Contents

Class SparseMatrix<T>.Row

A class that keeps track of a linked list of matrix elements for a row.

Inheritance
object
SparseMatrix<T>.Row
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: SpiceSharp.Algebra
Assembly: SpiceSharp.dll
Syntax
protected class SparseMatrix<T>.Row

Properties

FirstInRow

Gets the first element in the row.

Declaration
public SparseMatrix<T>.Element FirstInRow { get; }
Property Value
Type Description
SparseMatrix<T>.Element

The first element in the row.

LastInRow

Gets the last element in the row.

Declaration
public SparseMatrix<T>.Element LastInRow { get; }
Property Value
Type Description
SparseMatrix<T>.Element

The last element in the row.

Methods

Clear()

Clears all matrix elements in the row.

Declaration
public void Clear()

CreateOrGetElement(MatrixLocation, out Element)

Gets an element in the row, or creates it if it doesn't exist yet.

Declaration
public bool CreateOrGetElement(MatrixLocation location, out SparseMatrix<T>.Element result)
Parameters
Type Name Description
MatrixLocation location

The location of the element.

SparseMatrix<T>.Element result

The found or created element.

Returns
Type Description
bool

true if the element was found, false if it was created.

Find(int)

Find an element in the row without creating it.

Declaration
public SparseMatrix<T>.Element Find(int column)
Parameters
Type Name Description
int column

The column index.

Returns
Type Description
SparseMatrix<T>.Element

The element at the specified column, or null if the element doesn't exist.

Remove(Element)

Remove an element from the row.

Declaration
public void Remove(SparseMatrix<T>.Element element)
Parameters
Type Name Description
SparseMatrix<T>.Element element

The element to be removed.

Swap(Element, Element, int, int)

Swap two elements in the row, first and columnFirst are supposed to come first in the row.

Declaration
public void Swap(SparseMatrix<T>.Element first, SparseMatrix<T>.Element second, int columnFirst, int columnSecond)
Parameters
Type Name Description
SparseMatrix<T>.Element first

The first matrix element.

SparseMatrix<T>.Element second

The second matrix element.

int columnFirst

The first column.

int columnSecond

The second column.

Extension Methods

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