Class DenseLUSolver<T>
An base class for dense linear systems that can be solved using LU decomposition. Pivoting is controlled by the
Inheritance
Implements
Inherited Members
Namespace: SpiceSharp.Algebra.Solve
Assembly: SpiceSharp.dll
Syntax
public abstract class DenseLUSolver<T> : PivotingSolver<IMatrix<T>, IVector<T>, T>, IPivotingSolver<IMatrix<T>, IVector<T>, T>, ISolver<T>, IParameterSetCollection, IParameterSet, IParameterized<RookPivoting<T>>
Type Parameters
| Name | Description |
|---|---|
| T | The base value type. |
Constructors
DenseLUSolver(Func<T, double>)
Initializes a new instance of the DenseLUSolver<T> class.
Declaration
protected DenseLUSolver(Func<T, double> magnitude)
Parameters
| Type | Name | Description |
|---|---|---|
| Func<T, double> | magnitude | The magnitude. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | Thrown if |
DenseLUSolver(int, Func<T, double>)
Initializes a new instance of the DenseLUSolver<T> class.
Declaration
protected DenseLUSolver(int size, Func<T, double> magnitude)
Parameters
| Type | Name | Description |
|---|---|---|
| int | size | The size. |
| Func<T, double> | magnitude | The magnitude. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | Thrown if |
| ArgumentOutOfRangeException | Thrown if |
Properties
Parameters
Gets the pivoting strategy.
Declaration
public RookPivoting<T> Parameters { get; }
Property Value
| Type | Description |
|---|---|
| RookPivoting<T> | The pivoting strategy. |
Methods
Clear()
Clears the system of any elements. The size of the system becomes 0.
Declaration
public override void Clear()
Overrides
Eliminate(int, int)
Eliminates the submatrix right and below the pivot.
Declaration
protected abstract void Eliminate(int step, int size)
Parameters
| Type | Name | Description |
|---|---|---|
| int | step | The current elimination step. |
| int | size | The maximum row/column to be eliminated. |
Exceptions
| Type | Condition |
|---|---|
| AlgebraException | Thrown if the pivot has a magnitude of zero. |
Factor()
Factor the equation matrix and right hand side vector. This method can save time when factoring similar matrices in succession.
Declaration
public override bool Factor()
Returns
| Type | Description |
|---|---|
| bool |
|
Overrides
Factor(int)
Factor the equation matrix and right hand side vector.
Declaration
public bool Factor(int size)
Parameters
| Type | Name | Description |
|---|---|---|
| int | size | The size of the matrix that should be factored. |
Returns
| Type | Description |
|---|---|
| bool |
|
Remarks
This factoring method allows reusing matrices if only a small matrix is needed.
OrderAndFactor()
Order and factor the equation matrix and right hand side vector. This method will reorder the matrix as it sees fit.
Declaration
public override int OrderAndFactor()
Returns
| Type | Description |
|---|---|
| int | The number of rows that were successfully eliminated. |
Overrides
Precondition(PreconditioningMethod<IMatrix<T>, IVector<T>, T>)
Preconditions the solver matrix and right hand side vector.
Declaration
public override void Precondition(PreconditioningMethod<IMatrix<T>, IVector<T>, T> method)
Parameters
| Type | Name | Description |
|---|---|---|
| PreconditioningMethod<IMatrix<T>, IVector<T>, T> | method | The method. |