Skip to content

MGroup.LinearAlgebra.Iterative.ResidualUpdate

Dimitris Tsapetis edited this page Apr 17, 2019 · 1 revision

IResidualCorrection

Updates the residual vector using an operation provided by the iterative algorithm that uses the MGroup.LinearAlgebra.Iterative.ResidualUpdate.IResidualCorrection instance. If necessary, the residual vector is corrected by using the exact formula r = b - A*x, instead of the iterative algorithm's. Authors: Serafeim Bakalakos

public interface MGroup.LinearAlgebra.Iterative.ResidualUpdate.IResidualCorrection

Methods

Type Name Summary
void Initialize(ILinearTransformation matrix, IVectorView rhs) Initializes the internal state of this MGroup.LinearAlgebra.Iterative.ResidualUpdate.IResidualCorrection instance. Has to be called before each linear system solution.
Boolean UpdateResidual(Int32 iteration, IVectorView solution, IVector residual, Action<IVector> residualCalculation) Updates the residual vector and returns true if a correction was necessary. Correcting the residual vector means using the exact formula r = b - A*x, instead of the iterative algorithm's.

NoResidualCorrection

Updates the residual vector according to the iterative algorithm that uses the instance. No corrections are applied. Authors: Serafeim Bakalakos

public class MGroup.LinearAlgebra.Iterative.ResidualUpdate.NoResidualCorrection
    : IResidualCorrection

Methods

Type Name Summary
void Initialize(ILinearTransformation matrix, IVectorView rhs) See MGroup.LinearAlgebra.Iterative.ResidualUpdate.IResidualCorrection.Initialize(MGroup.LinearAlgebra.Iterative.ILinearTransformation,MGroup.LinearAlgebra.Vectors.IVectorView).
Boolean UpdateResidual(Int32 iteration, IVectorView solution, IVector residual, Action<IVector> residualCalculation) See MGroup.LinearAlgebra.Iterative.ResidualUpdate.IResidualCorrection.UpdateResidual(System.Int32,MGroup.LinearAlgebra.Vectors.IVectorView,MGroup.LinearAlgebra.Vectors.IVector,System.Action{MGroup.LinearAlgebra.Vectors.IVector}).

PeriodicResidualCorrection

The exact residual (r = b - A*x) is calculated with a fixed frequency to remove the floating point error accumulated by the more efficient formula used by the iterative algorithm. This approach is presented in section B1 of "An Introduction to the Conjugate Gradient Method Without the Agonizing Pain", Jonathan Richard Shewchuk, 1994 Authors: Serafeim Bakalakos

public class MGroup.LinearAlgebra.Iterative.ResidualUpdate.PeriodicResidualCorrection
    : IResidualCorrection

Methods

Type Name Summary
void Initialize(ILinearTransformation matrix, IVectorView rhs) See MGroup.LinearAlgebra.Iterative.ResidualUpdate.IResidualCorrection.Initialize(MGroup.LinearAlgebra.Iterative.ILinearTransformation,MGroup.LinearAlgebra.Vectors.IVectorView).
Boolean UpdateResidual(Int32 iteration, IVectorView solution, IVector residual, Action<IVector> residualCalculation) See MGroup.LinearAlgebra.Iterative.ResidualUpdate.IResidualCorrection.UpdateResidual(System.Int32,MGroup.LinearAlgebra.Vectors.IVectorView,MGroup.LinearAlgebra.Vectors.IVector,System.Action{MGroup.LinearAlgebra.Vectors.IVector}).

Clone this wiki locally