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 Filter* lookup_filter(
const std::string& name){
19 Filter* f =
dynamic_cast<Filter*
>(GenValue::get_value(name));
21 CRITICAL(
"Filter: "+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 T1,
typename T2>
36 template <
typename T1,
typename T2>
37 Pair<T1, T2>* pair(
const std::string& name1,
const std::string& name2,
const std::string& alias=
""){
38 return pair<T1,T2>(lookup<T1>(name1), lookup<T2>(name2), alias);
41 template <
typename Ret,
typename... ArgTypes>
42 Map<Ret(ArgTypes...)>* map(
Function<Ret(ArgTypes...)>& fn,
44 return new Map<Ret(ArgTypes...)>(fn, arg, alias);
48 Max<T>* max(
Value<std::vector<T>>* v,
const std::string alias){
49 return new Max<T>(v, alias);
53 Max<T>* max(
const std::string& v_name,
const std::string alias){
54 return max(lookup<std::vector<T>>(v_name), alias);
58 Min<T>* min(
Value<std::vector<T>>* v,
const std::string alias){
59 return new Min<T>(v, alias);
63 Min<T>* min(
const std::string& v_name,
const std::string alias){
64 return min(lookup<std::vector<T>>(v_name), alias);
68 Range<T>* range(
Value<std::vector<T>>* v,
const std::string alias){
73 Range<T>* range(
const std::string& v_name,
const std::string alias){
74 return range(lookup<std::vector<T>>(v_name), alias);
78 Mean<T>* mean(
Value<std::vector<T>>* v,
const std::string alias){
83 Mean<T>* mean(
const std::string& v_name,
const std::string alias){
84 return mean(lookup<std::vector<T>>(v_name), alias);
89 return new Count<T>(selector, v, alias);
93 Count<T>* count(
Function<
bool(T)>& selector,
const std::string& v_name,
const std::string alias){
94 return count<T>(selector, lookup<std::vector<T>>(v_name), alias);
97 Filter* filter(
const std::string& name, std::function<
bool()> filter_function,
const std::string& impl=
""){
98 return new Filter(name, filter_function, impl);
Definition: value.hpp:213
Find and return the maximum value of a vector.
Definition: value.hpp:692
Zips a series of vectors together.
Definition: value.hpp:541
Calculate the range of the values in a vector.
Definition: value.hpp:733
Returns the count of elements in the input vector passing a test function.
Definition: value.hpp:644
Definition: filter.hpp:44
Find and return the minimum value of a vector.
Definition: value.hpp:705
Creates a std::pair type from a two other Value objects.
Definition: value.hpp:454
The namespace containing all filval classes and functions.
Definition: api.hpp:6
Calculate the mean value of a vector.
Definition: value.hpp:718
A generic value.
Definition: value.hpp:338
Definition: value.hpp:564