|
Gaia
|
This class serves as a ref-counted wrapper for a SearchSpace, which is much more convenient to deal with than having to remember who owns the results or who's responsible for deleting it. More...
#include <searchspace.h>
Public Member Functions | |
| BaseResultSet (BaseSearchSpace< SearchPointType, DataSetType > *sspace) | |
| SearchResults | get (int n, int offset=0) |
| Returns the list of search results, which are pairs of (pointName, distance). More... | |
| int | size () const |
| BaseResultSet | limit (int n) |
| This function limits the number of results contained in this ResultSet. More... | |
| BaseResultSet | thresholdLimit (float maxDist) |
| This method limits the number of results contained in this ResultSet. More... | |
| void | addPoints (const DataSetType *dataset, const QList< QString > &ids) |
| void | removePoints (const QList< QString > &ids) |
| BaseSearchSpace< SearchPointType, DataSetType > * | searchSpace () |
Protected Attributes | |
| QExplicitlySharedDataPointer< SearchSpaceWrapper< SearchPointType, DataSetType > > | _d |
This class serves as a ref-counted wrapper for a SearchSpace, which is much more convenient to deal with than having to remember who owns the results or who's responsible for deleting it.
| SearchResults BaseResultSet::get | ( | int | n, |
| int | offset = 0 |
||
| ) |
Returns the list of search results, which are pairs of (pointName, distance).
| n | the number of desired results |
| offset | the start offset |
Referenced by Cyclops::chainedSearch(), Cyclops::nnSearchById(), and Cyclops::nnSearchByIdWithFilter().
|
inline |
This function limits the number of results contained in this ResultSet.
If there were fewer points before than the given number, the ResultSet is left untouched, otherwise it will have a maximum of n points after the call. Returns this object so it is possible to chain this method call with a get() one.
References gaia2::BaseResultSet< SearchPointType, DataSetType >::limit().
Referenced by gaia2::BaseResultSet< SearchPointType, DataSetType >::limit().
|
inline |
This method limits the number of results contained in this ResultSet.
All the results which have a distance higher than the specified maxDist will be discarded from this SearchSpace. Returns this object so it is possible to chain this method call with a get() one.
References gaia2::BaseResultSet< SearchPointType, DataSetType >::thresholdLimit().
Referenced by Cyclops::chainedSearch(), and gaia2::BaseResultSet< SearchPointType, DataSetType >::thresholdLimit().