27 #ifndef ANTIOCH_METAPROGRAMMING_H
28 #define ANTIOCH_METAPROGRAMMING_H
38 #define ANTIOCH_PLAIN_SCALAR(Type) \
42 max (const Type& in) { return in; } \
46 min (const Type& in) { return in; } \
50 Type if_else(bool condition, \
61 struct has_size<Type> \
63 const static bool value = false; \
67 struct return_auto<Type> \
69 const static bool value = false; \
73 struct value_type<Type> \
79 struct raw_value_type<Type> \
84 template <typename NewScalar> \
85 struct rebind<Type, NewScalar> \
87 typedef NewScalar type; \
101 template <
typename T>
105 template <
typename T>
109 template <
typename T,
typename T2>
113 template <
typename T>
115 void init_clone(T& output,
const T& example) { output = example; }
117 template <
typename Vector,
typename Scalar>
122 i != output.size(); ++i)
126 template <
typename T,
typename Scalar>
130 template <
typename T,
typename Scalar>
134 template <
typename T,
typename VectorScalar>
136 T
custom_clone(
const T& ,
const VectorScalar& values,
unsigned int indexes) {
return values[indexes];}
138 template <
typename T,
typename VectorScalar>
142 T returnval(indexes.size());
144 for(
unsigned int i = 0; i < indexes.size(); i++)
146 returnval[i] = values[indexes[i]];
152 template <
typename VectorT>
154 typename value_type<VectorT>::type
166 template <
typename T>
174 template <
typename T>
178 for(
unsigned int i = 0; i < vec.size(); i++)
180 if(!vec[i])
return false;
191 template <
typename T>
199 template <
typename T>
203 for(
unsigned int i = 0; i < vec.size(); i++)
205 if(vec[i])
return true;
212 #endif //ANTIOCH_METAPROGRAMMING_H
bool conjunction_root(const T &vec, eigen_library_tag)
bool conjunction(const bool &vec)
T custom_clone(const T &, const VectorScalar &values, unsigned int indexes)
bool disjunction_root(const T &vec, eigen_library_tag)
void init_clone(T &output, const T &example)
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)
void set_zero(_Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > &a)
void constant_fill(_Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > &output, const Scalar &value)
ANTIOCH_PLAIN_SCALAR(float)
void init_constant(Vector &output, const Scalar &example)
The parameters are reduced parameters.
_Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > zero_clone(const _Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > &ex)
bool disjunction(const bool &vec)