Loading...
Searching...
No Matches
AbsDiff Class Reference

Compression oracle based on absolute difference. More...

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

## Public Member Functions

| AbsDiff (float tolerance=-1.0f)
| AbsDiff (const AbsDiff &)=default
| ~AbsDiff ()=default
| operator bool () const
void | init (nanovdb::GridClass gClass, float background)
void | setTolerance (float tolerance)
float | getTolerance () const
bool | operator() (float exact, float approx) const
| Return true if the approximate value is within the accepted absolute error bounds of the exact value.

## Detailed Description

Compression oracle based on absolute difference.

## Constructor & Destructor Documentation

## AbsDiff() [1/2]

AbsDiff | ( | float | tolerance = `-1.0f` | ) |

inline

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

## AbsDiff() [2/2]

AbsDiff | ( | const AbsDiff & |  | ) |

default

## ~AbsDiff()

~AbsDiff | ( |  | ) |

default

## Member Function Documentation

## getTolerance()

float getTolerance | ( |  | ) | const

inline

## init()

void init | ( | nanovdb::GridClass | gClass,
|  | float | background
| ) |  |

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 absolute error bounds of the exact value.

Required member method

## setTolerance()

void setTolerance | ( | float | tolerance | ) |

inline