libcrn
3.9.5
A document image processing library
|
Iterative kNN. More...
#include <CRNkNN.h>
Public Member Functions | |
IterativekNN (size_t neighborhood, const DistFunc &df, size_t fast_min=50, size_t fast_factor=10, size_t fast_max=100) | |
IterativekNN (size_t neighborhood, DistFunc &&df, size_t fast_min=50, size_t fast_factor=10, size_t fast_max=100) | |
void | Add (const DataType &obj) |
Adds a element with full computation of nearest neighbors. More... | |
void | Add (DataType &&obj) |
Adds a element with full computation of nearest neighbors. More... | |
void | FastAdd (const DataType &obj) |
Adds a element with partial computation of nearest neighbors. More... | |
void | FastAdd (DataType &&obj) |
Adds a element with partial computation of nearest neighbors. More... | |
std::vector< double > | GetLOF () const |
std::vector< double > | GetLoOP (double lambda) const |
const DataType & | GetElement (size_t el) const |
size_t | GetNElements () const noexcept |
Iterative kNN.
An iterative kNN computation helper
|
inline |
[in] | neighborhood | the size of the neighborhood |
[in] | df | a distance function: double df(const DataType&, const DataType&) |
[in] | fast_min | minimum number of seeds for fast addition of an element |
[in] | fast_factor | sampling factor for fast addition of an element |
[in] | fast_max | maximum number of seeds for fast addition of an element |
ExceptionDomain | neighborhood <= 1 |
|
inline |
[in] | neighborhood | the size of the neighborhood |
[in] | df | a distance function: double df(const DataType&, const DataType&) |
[in] | fast_min | minimum number of seeds for fast addition of an element |
[in] | fast_factor | sampling factor for fast addition of an element |
[in] | fast_max | maximum number of seeds for fast addition of an element |
ExceptionDomain | neighborhood <= 1 |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
ExceptionDimension | #samples < k |
|
inline |
ExceptionDimension | #samples < k |
[in] | lambda | the precision of the density estimation (lambda=1 -> 68%, 2 -> 95%, 3 -> 99.7%) |
|
inlinenoexcept |