[−][src]Trait sample_consensus::Estimator
An Estimator
is able to create a model that best fits a set of data.
It is also able to determine the residual error each data point contributes in relation to the model.
Associated Types
type Model: Model<Data>
Model
is the model which is estimated from the underlying data
type ModelIter: IntoIterator<Item = Self::Model>
Iterator over the models produced from the data.
Associated Constants
const MIN_SAMPLES: usize
The minimum number of samples that the estimator can estimate a model from.
Required methods
fn estimate<I>(&self, data: I) -> Self::ModelIter where
I: Iterator<Item = Data> + Clone,
I: Iterator<Item = Data> + Clone,
Takes in an iterator over the data and produces a model that best fits the data.
This must be passed at least Self::MIN_SAMPLES
data points, otherwise estimate
should panic
to indicate a developer error.
None
should be returned only if a model is impossible to estimate based on the data.
For instance, if a particle has greater than infinite mass, a point is detected behind a camera,
an equation has an imaginary answer, or non-causal events happen, then a model may not be produced.