9 Value<T>* lookup(
const std::string& name){
10 GenValue* gv = GenValue::get_value(name);
13 CRITICAL(
"Value: "+gv->get_name() +
"has improper type.",-1);
18 ObsFilter* lookup_obs_filter(
const std::string& name){
19 ObsFilter* f =
dynamic_cast<ObsFilter*
>(GenValue::get_value(name));
21 CRITICAL(
"ObsFilter: "+f->get_name() +
"has improper type.",-1);
26 template <
typename... ArgTypes>
27 Zip<ArgTypes...>* zip(
Value<std::vector<ArgTypes>>*... args,
const std::string& alias=
""){
28 return new Zip<ArgTypes...>(args..., alias);
31 template <
typename Ret,
typename... ArgTypes>
32 Map<Ret(ArgTypes...)>* map(Function<Ret(ArgTypes...)>& fn,
34 return new Map<Ret(ArgTypes...)>(fn, arg, alias);
38 template <
typename... ArgTypes>
40 return new Tuple<ArgTypes...>(args..., alias);
43 template <
typename Ret,
typename... ArgTypes>
44 Apply<Ret(ArgTypes...)>* apply(Function<Ret(ArgTypes...)>& fn,
46 return new Apply<Ret(ArgTypes...)>(fn, arg, alias);
49 template <
typename T1,
typename T2>
54 template <
typename T1,
typename T2>
55 Pair<T1, T2>* pair(
const std::string& name1,
const std::string& name2,
const std::string& alias=
""){
56 return pair<T1,T2>(lookup<T1>(name1), lookup<T2>(name2), alias);
61 Max<T>* max(
Value<std::vector<T>>* v,
const std::string alias){
62 return new Max<T>(v, alias);
66 Max<T>* max(
const std::string& v_name,
const std::string alias){
67 return max(lookup<std::vector<T>>(v_name), alias);
71 Min<T>* min(
Value<std::vector<T>>* v,
const std::string alias){
72 return new Min<T>(v, alias);
76 Min<T>* min(
const std::string& v_name,
const std::string alias){
77 return min(lookup<std::vector<T>>(v_name), alias);
81 Range<T>* range(
Value<std::vector<T>>* v,
const std::string alias){
86 Range<T>* range(
const std::string& v_name,
const std::string alias){
87 return range(lookup<std::vector<T>>(v_name), alias);
91 Mean<T>* mean(
Value<std::vector<T>>* v,
const std::string alias){
96 Mean<T>* mean(
const std::string& v_name,
const std::string alias){
97 return mean(lookup<std::vector<T>>(v_name), alias);
100 template <
typename T>
101 Count<T>* count(Function<
bool(T)>& selector,
Value<std::vector<T>>* v,
const std::string alias){
102 return new Count<T>(selector, v, alias);
105 template <
typename T>
106 Count<T>* count(Function<
bool(T)>& selector,
const std::string& v_name,
const std::string alias){
107 return count<T>(selector, lookup<std::vector<T>>(v_name), alias);
110 ObsFilter* obs_filter(
const std::string& name, std::function<
bool()> filter_function,
const std::string& impl=
""){
111 return new ObsFilter(name, filter_function, impl);
Find and return the maximum value of a vector.
Definition: value.hpp:788
Zips a series of vectors together.
Definition: value.hpp:546
Calculate the range of the values in a vector.
Definition: value.hpp:829
Takes a series of Value objects and bundles them together into a std::tuple object.
Definition: value.hpp:670
Returns the count of elements in the input vector passing a test function.
Definition: value.hpp:717
Find and return the minimum value of a vector.
Definition: value.hpp:801
Creates a std::pair type from a two other Value objects.
Definition: value.hpp:467
The namespace containing all filval classes and functions.
Definition: api.hpp:6
Calculate the mean value of a vector.
Definition: value.hpp:814
A generic value.
Definition: value.hpp:352