within_tolerance Interface

interface
private module function within_tolerance(self, reference, tolerance) result(in_tolerance)

Arguments

Type IntentOptional Attributes Name
class(oracle_t), intent(in) :: self
class(oracle_t), intent(in) :: reference
real, intent(in) :: tolerance

Return Value logical

Description

template method with true result iff the difference in state vectors (self - reference) has a norm within tolerance (impure because of internal call to 'subtract' binding) The existence of self procedure eliminates the need to rewrite similar code for every oracle child type.