Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

matlab.unittest.constraints.Tolerance class

Package: matlab.unittest.constraints

Abstract interface class for tolerances

Description

Tolerances define a notion of fuzzy equality for a set of data types and can be plugged in to the IsEqualTo constraint through the 'Within' name-value pair argument.

Classes that derive from the Tolerance interface class must provide a tolerance definition. Use the satisfiedBy method to implement the tolerance definition. Classes that derive from the Tolerance class also must provide a diagnostic for two compared values. The testing framework uses the diagnostic when the compared values are outside of the allowable tolerance. Use the getDiagnosticFor method to implement this condition. Finally, classes that derive from the Tolerance class must provide a means to determine which data types the tolerance supports. Define the supported data types by implementing the supports method.

Methods

getDiagnosticForProduce diagnostic for two values specified to be within tolerance
satisfiedByDetermine whether two values are within tolerance
supportsDetermine whether tolerance supports specified data type

Copy Semantics

Value. To learn how value classes affect copy operations, see Copying Objects.

Was this topic helpful?