LOST  0.0.1
LOST: Open-source Star Tracker
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. More...
 
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. More...
 
long NumValues () const
 The number of data points in the data referred to by the kvector. More...
 
long NumBins () const
 
decimal Max () const
 Upper bound on elements. More...
 
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 23 of file databases.hpp.

Constructor & Destructor Documentation

◆ KVectorIndex()

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

Construct from serialized buffer.

Definition at line 110 of file databases.cpp.

Member Function Documentation

◆ Max()

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

Upper bound on elements.

Definition at line 33 of file databases.hpp.

Here is the caller graph for this function:

◆ Min()

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

Definition at line 35 of file databases.hpp.

Here is the caller graph for this function:

◆ NumBins()

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

Definition at line 31 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 30 of file databases.hpp.

Here is the caller graph for this function:

◆ 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 129 of file databases.cpp.

Here is the caller graph for this function:

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