TTTT Analysis
0.1
|
#include <iomanip>
#include <iostream>
#include <sstream>
#include <utility>
#include <algorithm>
#include <map>
#include <limits>
#include <vector>
#include <tuple>
#include <initializer_list>
#include <functional>
#include "log.hpp"
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 generic 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::TupFilter< ArgTypes > |
Returns the elements in a vector that pass a test function. More... | |
class | fv::Tuple< ArgTypes > |
Takes a series of Value objects and bundles them together into a std::tuple object. 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::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::CartProduct< FST, SND > |
Find and return the minimum value of a vector and its index. 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 F , typename TUPLE > | |
auto | fv::call (F &f, TUPLE &&t) |
This calls a function of type F with the contents of the tuple as separate arguments. More... | |
std::ostream & | fv::operator<< (std::ostream &os, GenValue &gv) |
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.
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.