|
Tomographer
v2.0
Tomographer C++ Framework Documentation
|
A ValueCalculator-instance which the choice of which ValueCalculator to use at run-time. More...
#include <tomographer2/valuecalculator.h>
Inheritance diagram for Tomographer::MultiplexorValueCalculator< ValueType_, ValueCalculators >:
Collaboration diagram for Tomographer::MultiplexorValueCalculator< ValueType_, ValueCalculators >:Public Types | |
| typedef ValueType_ | ValueType |
| typedef std::tuple< ValueCalculators... > | ValueCalculatorsTupleType |
Public Member Functions | |
| template<typename... Args> | |
| MultiplexorValueCalculator (const int i, Args &&...valcalcs) | |
| Constructor. More... | |
| template<int I> | |
| const std::tuple_element< I, ValueCalculatorsTupleType >::type & | getValueCalculator () const |
| Get a particular value calculator [static index]. | |
| template<int I, typename PointType > | |
| ValueType | getValueI (PointType &&x) const |
| Calculate the value at the given point, using the I-th value calculator. | |
| template<typename PointType > | |
| ValueType | getValue (PointType &&x) const |
| The main method which computes the value according to the pre-chosen ValueCalculator. More... | |
Static Public Attributes | |
| static constexpr int | NumValueCalculators = sizeof...(ValueCalculators) |
| static constexpr int | NumStaticallyOptimizedIfs = 6 |
A ValueCalculator-instance which the choice of which ValueCalculator to use at run-time.
Definition at line 184 of file valuecalculator.h.
|
inline |
Constructor.
The first parameter, i, selects which value calculator is applied. (The whole idea is that this value can be selected at run-time.)
Specify as argument a list of value calculator instances, in the same order as the template parameters.
Definition at line 212 of file valuecalculator.h.
|
inline |
The main method which computes the value according to the pre-chosen ValueCalculator.
Calculates the value according to the ValueCalculator instance which was chosen at constructor-time (via the index i).
Definition at line 237 of file valuecalculator.h.