Interface IMatrix<T>
Describes a matrix.
Namespace: SpiceSharp.Algebra
Assembly: SpiceSharp.dll
Syntax
public interface IMatrix<T>
Type Parameters
| Name | Description |
|---|---|
| T | The base type. |
Properties
this[MatrixLocation]
Gets or sets the value at the specified location.
Declaration
T this[MatrixLocation location] { get; set; }
Parameters
| Type | Name | Description |
|---|---|---|
| MatrixLocation | location | The location. |
Property Value
| Type | Description |
|---|---|
| T | The value. |
this[int, int]
Gets or sets the value at the specified row and column.
Declaration
T this[int row, int column] { get; set; }
Parameters
| Type | Name | Description |
|---|---|---|
| int | row | The row index. |
| int | column | The column index. |
Property Value
| Type | Description |
|---|---|
| T | The value. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentOutOfRangeException | Thrown if |
Size
Gets the size of the matrix.
Declaration
int Size { get; }
Property Value
| Type | Description |
|---|---|
| int | The matrix size. |
Methods
Clear()
Clears the matrix of any elements. The size of the matrix becomes 0.
Declaration
void Clear()
Reset()
Resets all elements in the matrix to their default value.
Declaration
void Reset()
SwapColumns(int, int)
Swaps two columns in the matrix.
Declaration
void SwapColumns(int column1, int column2)
Parameters
| Type | Name | Description |
|---|---|---|
| int | column1 | The first column index. |
| int | column2 | The second column index. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentOutOfRangeException | Thrown if |
SwapRows(int, int)
Swaps two rows in the matrix.
Declaration
void SwapRows(int row1, int row2)
Parameters
| Type | Name | Description |
|---|---|---|
| int | row1 | The first row index. |
| int | row2 | The second row index. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentOutOfRangeException | Thrown if |