RelativeParameterConvergence Class |
Namespace: Accord.Math
The RelativeParameterConvergence type exposes the following members.
Name | Description | |
---|---|---|
RelativeParameterConvergence |
Initializes a new instance of the RelativeParameterConvergence class.
| |
RelativeParameterConvergence(Int32, Double) |
Initializes a new instance of the RelativeParameterConvergence class.
|
Name | Description | |
---|---|---|
CurrentIteration |
Gets or sets the current iteration number.
| |
Delta |
Gets the maximum relative parameter
change after the last iteration.
| |
HasConverged |
Gets whether the algorithm has converged.
| |
HasDiverged |
Gets whether the algorithm has diverged.
| |
Iterations | Obsolete.
Please use MaxIterations instead.
| |
MaxIterations |
Gets or sets the maximum number of iterations
performed by the iterative algorithm.
| |
NewValues |
Gets or sets the watched value after the iteration.
| |
OldValues |
Gets or sets the watched value before the iteration.
| |
Tolerance |
Gets or sets the maximum change in the watched value
after an iteration of the algorithm used to detect convergence.
|
Name | Description | |
---|---|---|
Clear |
Clears this instance.
| |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Name | Description | |
---|---|---|
HasMethod |
Checks whether an object implements a method with the given name.
(Defined by ExtensionMethods.) | |
IsEqual |
Compares two objects for equality, performing an elementwise
comparison if the elements are vectors or matrices.
(Defined by Matrix.) | |
To(Type) | Overloaded.
Converts an object into another type, irrespective of whether
the conversion can be done at compile time or not. This can be
used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.) | |
ToT | Overloaded.
Converts an object into another type, irrespective of whether
the conversion can be done at compile time or not. This can be
used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.) |
// Converge if the maximum change amongst all parameters is less than 0.1: var criteria = new RelativeParameterConvergence(iterations: 0, tolerance: 0.1); int progress = 1; double[] parameters = { 12345.6, 952.12, 1925.1 }; do { // Do some processing... // Update current iteration information: criteria.NewValues = parameters.Divide(progress++); } while (!criteria.HasConverged); // The method will converge after reaching the // maximum of 11 iterations with a final value // of { 1234.56, 95.212, 192.51 }: int iterations = criteria.CurrentIteration; // 11 var v = criteria.OldValues; // { 1234.56, 95.212, 192.51 }