Go to the documentation of this file.
28 #include <Eigen/Geometry>
39 if (std::numeric_limits<T>::infinity() ==
value)
41 throw LocalException(
"result value is inf");
46 throw LocalException(
"result value is nan");
53 for (
size_t i = 0; i <
values.size(); ++i)
61 template <
class T> std::vector<T>
operator -(
const std::vector<T>& v1,
const std::vector<T>& v2)
63 std::vector<T> res(
std::min(v1.size(), v2.size()),
T());
66 for (
typename std::vector<T>::iterator i = res.begin(); i != res.end(); ++i)
75 template <
class T> std::vector<T>
operator +(
const std::vector<T>& v1,
const std::vector<T>& v2)
77 std::vector<T> res(
std::min(v1.size(), v2.size()),
T());
80 for (
typename std::vector<T>::iterator i = res.begin(); i != res.end(); ++i)
89 template <
class T> std::vector<T>&
operator +=(std::vector<T>& v1,
const std::vector<T>& v2)
93 for (
typename std::vector<T>::iterator i = v1.begin(); i != v1.end(); ++i)
103 template <
class T> std::vector<T>&
operator -=(std::vector<T>& v1,
const std::vector<T>& v2)
107 for (
typename std::vector<T>::iterator i = v1.begin(); i != v1.end(); ++i)
116 template <
class T> std::vector<T>&
operator *=(std::vector<T>& v1,
double c)
120 for (
typename std::vector<T>::iterator i = v1.begin(); i != v1.end(); ++i)
131 template <
class T> std::vector<T>&
operator /=(std::vector<T>& v1,
double c)
135 for (
typename std::vector<T>::iterator i = v1.begin(); i != v1.end(); ++i)
144 template <
class T> std::vector<T>
operator *(
double c,
const std::vector<T>&
v)
146 std::vector<T> res(
v.size(),
T());
149 for (
typename std::vector<T>::iterator i = res.begin(); i != res.end(); ++i)
158 template <
class T>
double operator *(
const std::vector<T>&
v,
const std::vector<T>& v2)
162 if (
v.size() != v2.size())
164 throw LocalException(
"vectors do not match in size: ") <<
v.size() <<
" vs. " << v2.size();
169 for (
typename std::vector<T>::const_iterator i =
v.begin(); i !=
v.end(); ++i)
179 template <
class T> std::vector<T>
operator +(
const std::vector<T>&
v,
double s)
181 std::vector<T> res(
v.size(),
T());
184 for (
typename std::vector<T>::iterator i = res.begin(); i != res.end(); ++i)
193 template <
class T> std::vector<T>
operator -(
const std::vector<T>&
v,
double s)
195 std::vector<T> res(
v.size(),
T());
198 for (
typename std::vector<T>::iterator i = res.begin(); i != res.end(); ++i)
211 for (
typename std::vector<T>::const_iterator it =
v.begin(); it !=
v.end(); it++)
219 template <
class T>
double vecSum(
const std::vector<T>&
v)
223 for (
typename std::vector<T>::const_iterator it =
v.begin(); it !=
v.end(); it++)
234 std::vector<T> result =
v;
239 template <
class T> std::vector<T>
operator /(
const std::vector<T>&
v,
double c)
241 std::vector<T> res(
v.size(),
T());
244 for (
typename std::vector<T>::iterator i = res.begin(); i != res.end(); ++i)
253 template <
class T> std::vector<T>
abs(
const std::vector<T>&
v)
255 std::vector<T> res(
v.size(),
T());
258 for (
typename std::vector<T>::iterator i = res.begin(); i != res.end(); ++i)
267 template <
class T> std::vector<T>
max(
const std::vector<T>& v1,
const std::vector<T>& v2)
269 std::vector<T> res(
std::min(v1.size(), v2.size()),
T());
272 for (
typename std::vector<T>::iterator i = res.begin(); i != res.end(); ++i)
281 template <
class T>
T max(
const std::vector<T>& v1)
285 for (
typename std::vector<T>::const_iterator i = v1.begin(); i != v1.end(); ++i)
294 template <
class T> std::vector<T>
min(
const std::vector<T>& v1,
const std::vector<T>& v2)
296 std::vector<T> res(
std::min(v1.size(), v2.size()));
299 for (
typename std::vector<T>::iterator i = res.begin(); i != res.end(); ++i)
308 template <
class T>
T min(
const std::vector<T>& v1)
312 for (
typename std::vector<T>::const_iterator i = v1.begin(); i != v1.end(); ++i)
VectorXD< D, T > sqrt(const VectorXD< D, T > &a)
std::vector< T > normalizedVec(const std::vector< T > &v)
std::vector< T > & operator-=(std::vector< T > &v1, const std::vector< T > &v2)
std::vector< T > & operator/=(std::vector< T > &v1, double c)
void checkValues(const std::vector< T > &values)
double vecLength(const std::vector< T > &v)
std::vector< T > max(const std::vector< T > &v1, const std::vector< T > &v2)
std::vector< T > & operator*=(std::vector< T > &v1, double c)
std::vector< T > operator-(const std::vector< T > &v1, const std::vector< T > &v2)
std::vector< T > operator*(double c, const std::vector< T > &v)
std::vector< T > & operator+=(std::vector< T > &v1, const std::vector< T > &v2)
std::shared_ptr< Value > value()
std::vector< T > abs(const std::vector< T > &v)
void checkValue(const T &value)
std::vector< T > operator/(const std::vector< T > &v, double c)
std::vector< T > operator+(const std::vector< T > &v1, const std::vector< T > &v2)
double v(double t, double v0, double a0, double j)
std::vector< T > min(const std::vector< T > &v1, const std::vector< T > &v2)
double vecSum(const std::vector< T > &v)
double s(double t, double s0, double v0, double a0, double j)
This file offers overloads of toIce() and fromIce() functions for STL container types.