Class ElementSet<T>
A set of matrix and right-hand-side vector elements
Inherited Members
Namespace: SpiceSharp.Algebra
Assembly: SpiceSharp.dll
Syntax
public class ElementSet<T>
Type Parameters
Name | Description |
---|---|
T | The base type. |
Constructors
ElementSet(ISparseSolver<T>, params MatrixLocation[])
Initializes a new instance of the ElementSet<T> class.
Declaration
public ElementSet(ISparseSolver<T> solver, params MatrixLocation[] matrixPins)
Parameters
Type | Name | Description |
---|---|---|
ISparseSolver<T> | solver | The solver. |
MatrixLocation[] | matrixPins | The matrix pins. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown if |
ElementSet(ISparseSolver<T>, MatrixLocation[], int[])
Initializes a new instance of the ElementSet<T> class.
Declaration
public ElementSet(ISparseSolver<T> solver, MatrixLocation[] matrixPins, int[] rhsPins = null)
Parameters
Type | Name | Description |
---|---|---|
ISparseSolver<T> | solver | The solver. |
MatrixLocation[] | matrixPins | The Y-matrix indices. |
int[] | rhsPins | The right-hand side vector indices. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown if |
ElementSet(ISparseSolver<T>, params int[])
Initializes a new instance of the ElementSet<T> class.
Declaration
public ElementSet(ISparseSolver<T> solver, params int[] rhsPins)
Parameters
Type | Name | Description |
---|---|---|
ISparseSolver<T> | solver | The solver. |
int[] | rhsPins | The RHS pins. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown if |
Methods
Add(params T[])
Adds the specified values to each element. First come the matrix elements, then the RHS vector elements.
Declaration
public void Add(params T[] values)
Parameters
Type | Name | Description |
---|---|---|
T[] | values | The values. |
Subtract(params T[])
Subtracts the specified values. First come the matrix elements, then the RHS vector elements.
Declaration
public void Subtract(params T[] values)
Parameters
Type | Name | Description |
---|---|---|
T[] | values | The values. |
ToString()
Converts to string.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | A string that represents this instance. |