TTTT Analysis  0.1
Classes | Namespaces | Macros | Typedefs | Functions
value.hpp File Reference
#include <algorithm>
#include <functional>
#include <initializer_list>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <sstream>
#include <tuple>
#include <typeindex>
#include <utility>
#include <vector>
#include "log.hpp"
Include dependency graph for value.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  fv::GenFunction
 Parent class to all Function classes. More...
 
class  fv::Function< R(ArgTypes...)>
 In order to enable proper provenance tracking, and at the same time keep the ability to embed functions into values, the Function class should be used. More...
 
class  fv::Value< T >
 A templated value. More...
 
class  fv::Value< T >
 A templated value. More...
 
class  fv::ObservedValue< T >
 A value supplied by the dataset, not derived. More...
 
class  fv::DerivedValue< T >
 A Value derived from some other Values, not directly from the dataset. More...
 
class  fv::WrapperVector< T >
 A std::vector wrapper around a C-style array. More...
 
class  fv::Pair< T1, T2 >
 Creates a std::pair type from a two other Value objects. More...
 
class  fv::Zip< ArgTypes >
 Zips a series of vectors together. More...
 
class  fv::Map< Ret(ArgTypes...)>
 Maps a function over an input vector. More...
 
class  fv::Tuple< ArgTypes >
 Takes a series of Value objects and bundles them together into a std::tuple object. More...
 
class  fv::DeTup< N, ArgTypes >
 Gets the Nth element from a tuple value. More...
 
class  fv::DeTupVector< N, ArgTypes >
 Creates a vector of extracting the Nth value from each entry in a vector of tuples. More...
 
class  fv::Apply< Ret(ArgTypes...)>
 Applies a function to a tuple of values and returns a value. More...
 
class  fv::Count< T >
 Returns the count of elements in the input vector passing a test function. More...
 
class  fv::Filter< T >
 Returns the elements in a vector that pass a test function. More...
 
class  fv::TupFilter< ArgTypes >
 Returns the elements in a vector that pass a test function. More...
 
class  fv::Reduce< T >
 Reduce a Value of type vector<T> to just a T. More...
 
class  fv::Max< T >
 Find and return the maximum value of a vector. More...
 
class  fv::Min< T >
 Find and return the minimum value of a vector. More...
 
class  fv::Mean< T >
 Calculate the mean value of a vector. More...
 
class  fv::Range< T >
 Calculate the range of the values in a vector. More...
 
class  fv::ElementOf< T >
 Extract the element at a specific index from a vector. More...
 
class  fv::ReduceIndex< T >
 Similar to Reduce, but returns a pair of a T and an int. More...
 
class  fv::MaxIndex< T >
 Find and return the maximum value of a vector and its index. More...
 
class  fv::MinIndex< T >
 Find and return the minimum value of a vector and its index. More...
 
class  fv::Combinations< T, Size >
 Find combinations of items from an input vector. More...
 
class  fv::CartProduct< FST, SND >
 Calculate the cartesian product of two input vectors. More...
 
class  fv::BoundValue< T >
 A generic value owning only a function object. More...
 
class  fv::PointerValue< T >
 A Value of a pointer. More...
 
class  fv::ConstantValue< T >
 A Value which always returns the same value, supplied in the constructor. More...
 

Namespaces

 fv
 The namespace containing all filval classes and functions.
 

Macros

#define FUNC(f)   f, #f
 

Typedefs

typedef std::map< std::string, GenValue * > fv::ValueSet
 

Functions

template<typename Array , std::size_t... I>
decltype(auto) fv::detail::a2t_impl (const Array &a, std::index_sequence< I... >)
 
template<typename T , std::size_t N, typename Indices = std::make_index_sequence<N>>
decltype(auto) fv::a2t (const std::array< T, N > &a)
 Converts a std::array to a std::tuple.
 
template<typename R , typename Tuple , std::size_t... Is>
decltype(auto) fv::detail::t2v_impl (const Tuple &t, std::index_sequence< Is... >)
 
template<typename R , typename... ArgTypes>
std::vector< R > fv::t2v (const std::tuple< ArgTypes... > &t)
 Converts a std::tuple to a std::vector.
 
template<class F , class Tuple , std::size_t... I>
decltype(auto) constexpr fv::detail::call_impl (F &&f, Tuple &&t, std::index_sequence< I... >)
 
template<class F , class Tuple >
decltype(auto) constexpr fv::call (F &&f, Tuple &&t)
 Call a function f with the elements of the tuple t as arguments.
 
std::ostream & fv::operator<< (std::ostream &os, GenValue &gv)
 
std::string fv::impl::zip_fmt_name ()
 
template<typename Head >
std::string fv::impl::zip_fmt_name (Value< std::vector< Head >> *head)
 
template<typename Head1 , typename Head2 , typename... Tail>
std::string fv::impl::zip_fmt_name (Value< std::vector< Head1 >> *head1, Value< std::vector< Head2 >> *head2, Value< std::vector< Tail >> *... tail)
 
std::string fv::impl::tuple_fmt_name ()
 
template<typename Head >
std::string fv::impl::tuple_fmt_name (Value< Head > *head)
 
template<typename Head1 , typename Head2 , typename... Tail>
std::string fv::impl::tuple_fmt_name (Value< Head1 > *head1, Value< Head2 > *head2, Value< Tail > *... tail)
 

Detailed Description

Author
Caleb Fangmeier caleb.nosp@m.@fan.nosp@m.gmeie.nosp@m.r.te.nosp@m.ch
Version
0.1

LICENSE

MIT License

Copyright (c) 2017 Caleb Fangmeier

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

DESCRIPTION

This header defines a set of generic classes that wrap up "values". In essence, a Value<T> object is just something that contains a value of type T and can provide it when requested. The usefulness stems from composing values together with calculations. This enables very clear dependency mapping and a way to know clearly how every value was arrived at. This could be used to, for example, automatically generate commentary for plots that explain the exect calculation used to create it. Or easily making a series of plots contrasting different values that have been composed slightly differently.

Definition in file value.hpp.