Class RookPivoting<T>
Rook pivoting strategy.
Inherited Members
Namespace: SpiceSharp.Algebra
Assembly: SpiceSharp.dll
Syntax
public class RookPivoting<T> : ParameterSet<RookPivoting<T>>, IParameterSet, ICloneable<RookPivoting<T>>
Type Parameters
Name | Description |
---|---|
T | The base value type. |
Constructors
RookPivoting(Func<T, double>)
Initializes a new instance of the RookPivoting<T> class.
Declaration
public RookPivoting(Func<T, double> magnitude)
Parameters
Type | Name | Description |
---|---|---|
Func<T, double> | magnitude | The function for turning elements into a scalar. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown if |
Properties
AbsolutePivotThreshold
Gets or sets the absolute pivot threshold.
Declaration
[ParameterName("pivtol")]
[ParameterInfo("The absolute threshold for validating pivots")]
[GreaterThanOrEquals(0)]
[Finite]
public double AbsolutePivotThreshold { get; set; }
Property Value
Type | Description |
---|---|
double | The absolute pivot threshold. |
Exceptions
Type | Condition |
---|---|
ArgumentOutOfRangeException | Thrown if the value is negative. |
Magnitude
Gets the magnitude.
Declaration
public Func<T, double> Magnitude { get; }
Property Value
Type | Description |
---|---|
Func<T, double> | The magnitude. |
RelativePivotThreshold
Gets or sets the relative pivot threshold.
Declaration
[ParameterName("pivrel")]
[ParameterInfo("The relative threshold for validating pivots")]
[GreaterThan(0)]
[Finite]
public double RelativePivotThreshold { get; set; }
Property Value
Type | Description |
---|---|
double | The relative pivot threshold. |
Exceptions
Type | Condition |
---|---|
ArgumentOutOfRangeException | Thrown if the value is not greater than 0. |
Methods
FindPivot(IMatrix<T>, int, int)
Finds a pivot in the matrix.
Declaration
public Pivot<MatrixLocation> FindPivot(IMatrix<T> matrix, int eliminationStep, int max)
Parameters
Type | Name | Description |
---|---|---|
IMatrix<T> | matrix | The matrix. |
int | eliminationStep | The elimination step. |
int | max | The maximum row/column index. |
Returns
Type | Description |
---|---|
Pivot<MatrixLocation> | The pivot. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown if |
IsValidPivot(IMatrix<T>, int, int)
Determines whether the current pivot is valid.
Declaration
public bool IsValidPivot(IMatrix<T> matrix, int eliminationStep, int max)
Parameters
Type | Name | Description |
---|---|---|
IMatrix<T> | matrix | The matrix. |
int | eliminationStep | The elimination step. |
int | max | The maximum row/column index. |
Returns
Type | Description |
---|---|
bool |
|
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown if |