27 #ifndef ANTIOCH_SIGMA_BIN_MANAGER_H
28 #define ANTIOCH_SIGMA_BIN_MANAGER_H
41 template <
typename VectorCoeffType = std::vector<
double> >
48 template <
typename VectorStateType>
49 void y_on_custom_grid(
const VectorCoeffType &x_old,
const VectorCoeffType &y_old,
50 const VectorStateType &x_new, VectorStateType &y_new)
const;
54 template <
typename StateType,
typename VUIntType>
55 StateType
custom_bin_value(
const StateType & custom_head,
const StateType & custom_tail,
56 const VUIntType & index_heads,
unsigned int custom_head_index,
57 const VectorCoeffType & list_ref_head_tails,
58 const VectorCoeffType & list_ref_values)
const;
62 template <
typename VectorCoeffType>
69 template <
typename VectorCoeffType>
76 template <
typename VectorCoeffType>
77 template <
typename VectorStateType>
80 const VectorStateType &x_custom, VectorStateType &y_custom)
const
91 unsigned int>::type UIntType;
103 VUIntType ihead(x_custom.size());
108 for(
unsigned int ic = 0; ic < x_custom.size(); ic++)
111 for (
unsigned int i = 0; i != x_old.size() - 1; ++i)
125 for(
unsigned int ic = 0; ic < x_custom.size() - 1; ic++)
127 y_custom[ic] = this->custom_bin_value(x_custom[ic], x_custom[ic + 1],ihead, ic, x_old, y_old);
134 template <
typename VectorCoeffType>
135 template <
typename StateType,
typename VUIntType>
138 const VUIntType & index_heads,
unsigned int custom_head_index,
139 const VectorCoeffType & list_ref_head_tails,
140 const VectorCoeffType & list_ref_values)
const
154 UIntType start_head = index_heads[custom_head_index];
158 (UIntType)(index_heads[index_heads.size() - 1]));
175 (StateType)(ref_value * (ref_head - custom_head)),
176 (StateType)(ref_value * (custom_tail - custom_head)))
191 (StateType)((ref_tail - ref_head) * ref_value),
211 ref_head > custom_tail,
213 (StateType)(ref_value * (custom_tail - ref_head)));
215 return surf / (custom_tail - custom_head);
Antioch::enable_if_c< is_eigen< T >::value, typename value_type< T >::type >::type max(const T &in)
#define antioch_assert_equal_to(expr1, expr2)
StateType custom_bin_value(const StateType &custom_head, const StateType &custom_tail, const VUIntType &index_heads, unsigned int custom_head_index, const VectorCoeffType &list_ref_head_tails, const VectorCoeffType &list_ref_values) const
#define antioch_assert_not_equal_to(expr1, expr2)
bool conjunction(const bool &vec)
T custom_clone(const T &, const VectorScalar &values, unsigned int indexes)
Antioch::enable_if_c< is_eigen< T >::value, typename value_type< T >::type >::type min(const T &in)
enable_if_c< is_eigen< typename value_type< VectorT >::type >::value, typename value_type< VectorT >::type >::type eval_index(const VectorT &vec, const _Matrix< _UIntT, _Rows, _Cols, _Options, _MaxRows, _MaxCols > &index)
_Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > constant_clone(const _Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > &ex, const Scalar &value)
max(const _Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > &a, const _Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > &b) ANTIOCH_AUTOFUNC(_Matrix< _Scalar ANTIOCH_COMMA _Rows ANTIOCH_COMMA _Cols ANTIOCH_COMMA _Options ANTIOCH_COMMA _MaxRows ANTIOCH_COMMA _MaxCols >
enable_if_c< is_eigen< T1 >::value &&is_eigen< T2 >::value, typename state_type< T1 >::type >::type if_else(const Condition &condition, const T1 &if_true, const T2 &if_false)
void y_on_custom_grid(const VectorCoeffType &x_old, const VectorCoeffType &y_old, const VectorStateType &x_new, VectorStateType &y_new) const
void init_constant(Vector &output, const Scalar &example)
The parameters are reduced parameters.
typename _Scalar int _Rows int _Cols int _Options int _MaxRows int _MaxCols inline min(const _Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > &a, const _Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > &b) ANTIOCH_AUTOFUNC(_Matrix< _Scalar ANTIOCH_COMMA _Rows ANTIOCH_COMMA _Cols ANTIOCH_COMMA _Options ANTIOCH_COMMA _MaxRows ANTIOCH_COMMA _MaxCols >
_Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > zero_clone(const _Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > &ex)
bool disjunction(const bool &vec)