A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://accord-framework.net/docs/html/T_Accord_Math_RelativeConvergence.htm below:

RelativeConvergence Class

Relative convergence criteria.

Inheritance Hierarchy

SystemObject
  Accord.MathRelativeConvergence

Namespace:  Accord.Math
Assembly:

Accord.Math (in Accord.Math.dll) Version: 3.8.0

Syntax
public class RelativeConvergence : ISingleValueConvergence, 
	IConvergence<double>, IConvergence
Public Class RelativeConvergence
	Implements ISingleValueConvergence, IConvergence(Of Double), 
	IConvergence
Request Example View Source

The RelativeConvergence type exposes the following members.

Constructors Properties   Name Description CurrentIteration

Gets the current iteration number.

Delta

Gets the absolute difference between the

NewValue

and

OldValue

as as

Math.Abs(OldValue - NewValue)

.

HasConverged

Gets whether the algorithm has converged.

Iterations Obsolete.

Please use MaxIterations instead.

MaxIterations

Gets or sets the maximum number of iterations performed by the iterative algorithm. Default is 100.

NewValue

Gets or sets the watched value after the iteration.

OldValue

Gets or sets the watched value before the iteration.

RelativeDelta

Gets the relative difference between the

NewValue

and

OldValue

as

Math.Abs(OldValue - NewValue) / Math.Abs(OldValue)

.

StartValue

Gets the initial value for the

NewValue

and

OldValue

properties.

Tolerance

Gets or sets the maximum relative change in the watched value after an iteration of the algorithm used to detect convergence. Default is zero.

Top Methods   Name Description Clear

Resets this instance, reverting all iteration statistics statistics (number of iterations, last error) back to zero.

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 this instance.

(Overrides ObjectToString.) Top Extension Methods   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.) Top Remarks

This class can be used to track progress and convergence of methods which rely on the relative change of a value.

Examples
var criteria = new RelativeConvergence(iterations: 0, tolerance: 0.1);

int progress = 1;

do
{
    


    
    criteria.NewValue = 12345.6 / progress++;

} while (!criteria.HasConverged);






int iterations = criteria.CurrentIteration; 
double value = criteria.OldValue; 
See Also

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4