Struct s2::metric::Metric[][src]

pub struct Metric { /* fields omitted */ }

Methods

impl Metric
[src]

value returns the value of the metric at the given level.

min_level returns the minimum level such that the metric is at most the given value, or maxLevel (30) if there is no such level.

For example, MINLevel(0.1) returns the minimum level such that all cell diagonal lengths are 0.1 or smaller. The returned value is always a valid level.

In C++, this is called GetLevelForMAXValue.

max_level returns the maximum level such that the metric is at least the given value, or zero if there is no such level.

For example, MAXLevel(0.1) returns the maximum level such that all cells have a minimum width of 0.1 or larger. The returned value is always a valid level.

In C++, this is called GetLevelForMINValue.

closest_level returns the level at which the metric has approximately the given value. The return value is always a valid level. For example, AVG_EDGEMETRIC.closest_level(0.1) returns the level at which the average cell edge length is approximately 0.1.

Auto Trait Implementations

impl Send for Metric

impl Sync for Metric