Adapter for functions that return only one result. This class also describes the interface expected for the NVFunc template parameter for the tree / set / map classes.
More...
#include <orbtree.h>
|
typedef NVFunc::result_type | result_type |
| Type of the result of this function.
|
|
|
constexpr unsigned int | get_nr () const |
| Dimension of result. In case of a simple function, it is one. More...
|
|
void | operator() (const typename NVFunc::argument_type &node_value, result_type *res) const |
| Calculate the function value associated with one node. More...
|
|
| NVFunc_Adapter_Simple (const NVFunc &f_) |
| Create a new instance storing the given function.
|
|
| NVFunc_Adapter_Simple (NVFunc &&f_) |
|
template<class T > |
| NVFunc_Adapter_Simple (const T &t) |
|
template<class NVFunc>
struct orbtree::NVFunc_Adapter_Simple< NVFunc >
Adapter for functions that return only one result. This class also describes the interface expected for the NVFunc template parameter for the tree / set / map classes.
- Template Parameters
-
NVFunc | simple function taking one argument and returning the associated value to be stored. Should define a member type as argument_type to use this adapter. |
◆ get_nr()
Dimension of result. In case of a simple function, it is one.
Main use case: for a function that has an adjustable parameter, it can be used as a vector function and results for multiple parameter combinations can be calculated at the same time.
◆ operator()()
Calculate the function value associated with one node.
- Parameters
-
node_value | Node's value, i.e. the key in case of a set or multiset, and a pair of key and value for a map or multimap |
res | result is stored here (should be an array of size at least the number returned by get_nr() |
The documentation for this struct was generated from the following file: