Computes the fair weights for the residuals using the formula: w(r) = 1 / (1 + |r|). Here r is the adjusted redisuals from the AdjustedResidual function of the base class DoubleLeastSqWeightingFunction.

Namespace:  CenterSpace.NMath.Matrix
Assembly:  NMath (in NMath.dll) Version: 5.1.0.0

Syntax

C#
public override void GetWeights(
	DoubleVector residuals,
	ref DoubleVector weights
)
Visual Basic (Declaration)
Public Overrides Sub GetWeights ( _
	residuals As DoubleVector, _
	ByRef weights As DoubleVector _
)
Visual C++
public:
virtual void GetWeights(
	DoubleVector^ residuals, 
	DoubleVector^% weights
) override

Parameters

residuals
Type: CenterSpace.NMath.Core..::.DoubleVector
Residuals from the previous iteration in an iteratively Reweighted least squares problem.
weights
Type: CenterSpace.NMath.Core..::.DoubleVector %
The weights. Note if the input weights vector is non-null and has the same length as the input residual vector its contents are overwritten by the new weights. Otherwise a new vector containing the weights is returned.

Implements

IDoubleLeastSqWeightingFunction..::.GetWeights(DoubleVector, DoubleVector%)

See Also