A database storing distances between pairs of stars. More...
#include <databases.hpp>
Public Member Functions | |
| PairDistanceKVectorDatabase (DeserializeContext *des) | |
| Create the database from a serialized buffer. | |
| const int16_t * | FindPairsLiberal (decimal min, decimal max, const int16_t **end) const |
| Return at least all the star pairs whose inter-star distance is between min and max. | |
| const int16_t * | FindPairsExact (const Catalog &, decimal min, decimal max, const int16_t **end) const |
| std::vector< decimal > | StarDistances (int16_t star, const Catalog &) const |
| Return the distances from the given star to each star it's paired with in the database (for debugging). | |
| decimal | MaxDistance () const |
| Upper bound on stored star pair distances. | |
| decimal | MinDistance () const |
| Lower bound on stored star pair distances. | |
| long | NumPairs () const |
| Exact number of stored pairs. | |
Static Public Attributes | |
| static const int32_t | kMagicValue = 0x2536f009 |
| Magic value to use when storing inside a MultiDatabase. | |
A database storing distances between pairs of stars.
Supports fast range queries to find all pairs of stars separated by approximately a certain distance.
Definition at line 56 of file databases.hpp.
|
explicit |
Create the database from a serialized buffer.
Definition at line 298 of file databases.cpp.

| const int16_t * lost::PairDistanceKVectorDatabase::FindPairsLiberal | ( | decimal | minQueryDistance, |
| decimal | maxQueryDistance, | ||
| const int16_t ** | end ) const |
Return at least all the star pairs whose inter-star distance is between min and max.
| end[out] | Is set to an "off-the-end" pointer, one past the last pair being returned by the query. |
Definition at line 314 of file databases.cpp.

|
inline |
Upper bound on stored star pair distances.
Definition at line 65 of file databases.hpp.

|
inline |
Lower bound on stored star pair distances.
Definition at line 67 of file databases.hpp.

| long lost::PairDistanceKVectorDatabase::NumPairs | ( | ) | const |
Exact number of stored pairs.
Number of star pairs stored in the database.
Definition at line 359 of file databases.cpp.

| std::vector< decimal > lost::PairDistanceKVectorDatabase::StarDistances | ( | int16_t | star, |
| const Catalog & | catalog ) const |
Return the distances from the given star to each star it's paired with in the database (for debugging).
Definition at line 364 of file databases.cpp.

|
static |
Magic value to use when storing inside a MultiDatabase.
Definition at line 72 of file databases.hpp.