27 #ifndef ANTIOCH_VALARRAY_UTILS_DECL_H
28 #define ANTIOCH_VALARRAY_UTILS_DECL_H
30 #ifdef ANTIOCH_METAPROGRAMMING_H
31 # error valarray_utils_decl.h must be included before metaprogramming.h
48 static const bool value =
false;
77 template <
typename T,
typename T2>
80 Antioch::is_valarray<T>::value,
82 pow (
const T& in,
const T2& n);
87 max (
const std::valarray<T>& a,
const std::valarray<T>& b);
92 min (
const std::valarray<T>& a,
const std::valarray<T>& b);
99 template <
typename T,
typename NewScalar>
102 typedef std::valarray<NewScalar>
type;
105 template <
typename T>
108 max (
const std::valarray<T>& in);
110 template <
typename T>
113 min (
const std::valarray<T>& in);
115 template <
typename T>
118 template <typename T>
121 template <typename T>
124 template <typename T>
127 template <typename T>
130 template <typename T>
135 template <typename T1, typename T2>
138 zero_clone(std::valarray<T1>& output, const std::valarray<T2>& example);
140 template <typename T, typename Scalar>
143 constant_clone(const std::valarray<T>& example, const Scalar& value);
145 template <typename T>
148 init_clone(std::valarray<T>& output, const std::valarray<T>& example);
155 template <typename T>
158 if_else(const std::valarray<bool>& condition,
159 const std::valarray<T>& if_true,
160 const std::valarray<T>& if_false);
163 template <typename VectorT>
166 Antioch::is_valarray<typename value_type<VectorT>::type>::value,
167 typename value_type<VectorT>::type
169 eval_index(const VectorT& vec, const std::valarray<unsigned int>& index);
174 #endif //ANTIOCH_VALARRAY_UTILS_DECL_H
Antioch::enable_if_c< is_eigen< T >::value, typename value_type< T >::type >::type max(const T &in)
Antioch::enable_if_c< Antioch::is_valarray< T >::value, std::ostream & >::type operator<<(std::ostream &output, const T &a)
Antioch::enable_if_c< is_eigen< T >::value, typename value_type< T >::type >::type min(const T &in)
Antioch::enable_if_c< Antioch::is_valarray< T >::value, typename Antioch::state_type< T >::type >::type pow(const T &in, const T2 &n)
void init_clone(T &output, const T &example)
std::valarray< NewScalar > type
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)
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)