Go to the documentation of this file.
31 #include <Eigen/Geometry>
41 if (std::numeric_limits<T>::infinity() ==
value)
43 throw LocalException(
"result value is inf");
48 throw LocalException(
"result value is nan");
56 for (
size_t i = 0; i <
values.size(); ++i)
64 operator-(
const std::vector<T>& v1,
const std::vector<T>& v2)
66 std::vector<T> res(
std::min(v1.size(), v2.size()),
T());
69 for (
typename std::vector<T>::iterator i = res.begin(); i != res.end(); ++i)
80 operator+(
const std::vector<T>& v1,
const std::vector<T>& v2)
82 std::vector<T> res(
std::min(v1.size(), v2.size()),
T());
85 for (
typename std::vector<T>::iterator i = res.begin(); i != res.end(); ++i)
100 for (
typename std::vector<T>::iterator i = v1.begin(); i != v1.end(); ++i)
115 for (
typename std::vector<T>::iterator i = v1.begin(); i != v1.end(); ++i)
130 for (
typename std::vector<T>::iterator i = v1.begin(); i != v1.end(); ++i)
145 for (
typename std::vector<T>::iterator i = v1.begin(); i != v1.end(); ++i)
158 std::vector<T> res(
v.size(),
T());
161 for (
typename std::vector<T>::iterator i = res.begin(); i != res.end(); ++i)
176 if (
v.size() != v2.size())
178 throw LocalException(
"vectors do not match in size: ")
179 <<
v.size() <<
" vs. " << v2.size();
184 for (
typename std::vector<T>::const_iterator i =
v.begin(); i !=
v.end(); ++i)
197 std::vector<T> res(
v.size(),
T());
200 for (
typename std::vector<T>::iterator i = res.begin(); i != res.end(); ++i)
213 std::vector<T> res(
v.size(),
T());
216 for (
typename std::vector<T>::iterator i = res.begin(); i != res.end(); ++i)
231 for (
typename std::vector<T>::const_iterator it =
v.begin(); it !=
v.end(); it++)
245 for (
typename std::vector<T>::const_iterator it =
v.begin(); it !=
v.end(); it++)
258 std::vector<T> result =
v;
267 std::vector<T> res(
v.size(),
T());
270 for (
typename std::vector<T>::iterator i = res.begin(); i != res.end(); ++i)
283 std::vector<T> res(
v.size(),
T());
286 for (
typename std::vector<T>::iterator i = res.begin(); i != res.end(); ++i)
297 max(
const std::vector<T>& v1,
const std::vector<T>& v2)
299 std::vector<T> res(
std::min(v1.size(), v2.size()),
T());
302 for (
typename std::vector<T>::iterator i = res.begin(); i != res.end(); ++i)
313 max(
const std::vector<T>& v1)
317 for (
typename std::vector<T>::const_iterator i = v1.begin(); i != v1.end(); ++i)
327 min(
const std::vector<T>& v1,
const std::vector<T>& v2)
329 std::vector<T> res(
std::min(v1.size(), v2.size()));
332 for (
typename std::vector<T>::iterator i = res.begin(); i != res.end(); ++i)
343 min(
const std::vector<T>& v1)
347 for (
typename std::vector<T>::const_iterator i = v1.begin(); i != v1.end(); ++i)
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)
VectorXD< D, T > sqrt(const VectorXD< D, T > &a)
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.