icedb
version 0.5.1
Snow particle scattering database API
|
Class to define and search on intervals. More...
#include <splitSet.hpp>
Public Member Functions | |
intervals (const std::string &s="") | |
intervals (const std::vector< std::string > &s) | |
~intervals () | |
void | append (const std::string &instr, const std::map< std::string, std::string > *aliases=nullptr) |
void | append (const std::vector< std::string > &s, const std::map< std::string, std::string > *aliases=nullptr) |
void | append (const intervals< T > &src) |
bool | inRange (const T &val) const |
bool | isNear (const T &val, const T &linSep, const T &factorSep) const |
Public Attributes | |
std::vector< std::pair< T, T > > | ranges |
Class to define and search on intervals.
This is a simple class used for searching based on user input. It does not provide interval unions, intersections, etc. It can, however, aid in setting these up, such as for a database query.
Accepts standard paramSet notation, but also adds the '-' range operator, implying that values may be found in a certain range.
Definition at line 67 of file splitSet.hpp.
icedb::splitSet::intervals< T >::intervals | ( | const std::string & | s = "" | ) |
Definition at line 429 of file splitSet.cpp.
icedb::splitSet::intervals< T >::intervals | ( | const std::vector< std::string > & | s | ) |
Definition at line 432 of file splitSet.cpp.
icedb::splitSet::intervals< T >::~intervals | ( | ) |
Definition at line 435 of file splitSet.cpp.
void icedb::splitSet::intervals< T >::append | ( | const std::string & | instr, |
const std::map< std::string, std::string > * | aliases = nullptr |
||
) |
Definition at line 438 of file splitSet.cpp.
References icedb::splitSet::extractInterval(), icedb::splitSet::splitSet(), and icedb::splitSet::splitVector().
void icedb::splitSet::intervals< T >::append | ( | const std::vector< std::string > & | s, |
const std::map< std::string, std::string > * | aliases = nullptr |
||
) |
Definition at line 478 of file splitSet.cpp.
void icedb::splitSet::intervals< T >::append | ( | const intervals< T > & | src | ) |
Definition at line 485 of file splitSet.cpp.
References icedb::splitSet::intervals< T >::ranges.
bool icedb::splitSet::intervals< T >::inRange | ( | const T & | val | ) | const |
Definition at line 490 of file splitSet.cpp.
bool icedb::splitSet::intervals< T >::isNear | ( | const T & | val, |
const T & | linSep, | ||
const T & | factorSep | ||
) | const |
Definition at line 502 of file splitSet.cpp.
std::vector<std::pair<T, T> > icedb::splitSet::intervals< T >::ranges |
Definition at line 70 of file splitSet.hpp.
Referenced by icedb::splitSet::intervals< T >::append().