LOST 0.0.1
LOST: Open-source Star Tracker
Loading...
Searching...
No Matches
lost::KVectorIndex Class Reference

A data structure enabling constant-time range queries into fixed numerical data. More...

#include <databases.hpp>

Public Member Functions

 KVectorIndex (DeserializeContext *des)
 Construct from serialized buffer.
long QueryLiberal (decimal minQueryDistance, decimal maxQueryDistance, long *upperIndex) const
 Finds all the entries in the given range, and possibly a few just outside the range on the ends.
long NumValues () const
 The number of data points in the data referred to by the kvector.
long NumBins () const
decimal Max () const
 Upper bound on elements.
decimal Min () const

Detailed Description

A data structure enabling constant-time range queries into fixed numerical data.

Note
Not an instantiable database on its own – used in other databases

Definition at line 25 of file databases.hpp.

Constructor & Destructor Documentation

◆ KVectorIndex()

lost::KVectorIndex::KVectorIndex ( DeserializeContext * des)
explicit

Construct from serialized buffer.

Definition at line 111 of file databases.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ Max()

decimal lost::KVectorIndex::Max ( ) const
inline

Upper bound on elements.

Definition at line 35 of file databases.hpp.

◆ Min()

decimal lost::KVectorIndex::Min ( ) const
inline

Definition at line 37 of file databases.hpp.

◆ NumBins()

long lost::KVectorIndex::NumBins ( ) const
inline

Definition at line 33 of file databases.hpp.

◆ NumValues()

long lost::KVectorIndex::NumValues ( ) const
inline

The number of data points in the data referred to by the kvector.

Definition at line 32 of file databases.hpp.

◆ QueryLiberal()

long lost::KVectorIndex::QueryLiberal ( decimal minQueryDistance,
decimal maxQueryDistance,
long * upperIndex ) const

Finds all the entries in the given range, and possibly a few just outside the range on the ends.

Parameters
upperIndex[out]Is set to the index of the last returned value +1.
Returns
the index (starting from zero) of the first value matching the query

Definition at line 130 of file databases.cpp.


The documentation for this class was generated from the following files: