Loading...
Searching...
No Matches
RelDiff Class Reference

Compression oracle based on relative difference. More...

`#include <nanovdb/util/CreateNanoGrid.h>`

## Public Member Functions

| RelDiff (float tolerance=-1.0f)
| RelDiff (const RelDiff &)=default
| ~RelDiff ()=default
| operator bool () const
void | setTolerance (float tolerance)
float | getTolerance () const
bool | operator() (float exact, float approx) const
| Return true if the approximate value is within the accepted relative error bounds of the exact value.

## Detailed Description

Compression oracle based on relative difference.

## Constructor & Destructor Documentation

## RelDiff() [1/2]

RelDiff | ( | float | tolerance = -1.0f | ) |

inline

Note
  The default value of -1 means it's un-initialized!

## RelDiff() [2/2]

RelDiff | ( | const RelDiff & |  | ) |

default

## ~RelDiff()

~RelDiff | ( |  | ) |

default

## Member Function Documentation

## getTolerance()

float getTolerance | ( |  | ) | const

inline

## operator bool()

operator bool | ( |  | ) | const

inline

## operator()()

bool operator() | ( | float | exact,
|  | float | approx ) const

inline

Return true if the approximate value is within the accepted relative error bounds of the exact value.

Required member method

## setTolerance()

void setTolerance | ( | float | tolerance | ) |

inline