30template<
class T,
unsigned D>
50 template<
class T1,
unsigned D1>
52 for (
unsigned d=0; d<D; ++d)
53 X[d] = (d < D1) ? rhs[d] : T1(0);
61 Vektor(std::initializer_list<T> init) {
63 for(
auto it = init.begin(); it != init.end() && i < D; ++it, ++i) {
157 return !(*
this == that);
180template<
class T,
unsigned D>
188template<
class T,
unsigned D>
196template<
class T,
unsigned D>
203template<
class T,
unsigned D>
218template<
class T,
unsigned D>
226template<
class T,
unsigned D>
253template <
class T1,
class T2,
unsigned D >
264template <
class T1,
class T2,
unsigned D >
274template <
class T,
unsigned D >
278 return std::sqrt(
dot(
a,
a));
284template<
class T,
unsigned D>
287 std::streamsize sw = out.width();
291 for (
unsigned int i=0; i<D - 1; i++)
292 out << std::setw(sw) << rhs[i] <<
" , ";
293 out << std::setw(sw) << rhs[D - 1] <<
" )";
295 out <<
"( " << std::setw(sw) << rhs[0] <<
" )";
ReduceLoc< typename PETEBinaryReturn< T1, T2, FnMin >::type, LOC > Min(const ReduceLoc< T1, LOC > &lhs, const ReduceLoc< T2, LOC > &rhs)
ReduceLoc< typename PETEBinaryReturn< T1, T2, FnMax >::type, LOC > Max(const ReduceLoc< T1, LOC > &lhs, const ReduceLoc< T2, LOC > &rhs)
#define TSV_ELEMENTWISE_OPERATOR(TSV, OP, APP)
Vektor< T, D > & operator-=(const T &rhs)
Message & getMessage(Message &m)
Message & putMessage(Message &m) const
Vektor(std::initializer_list< T > init)
Vektor< T, D > & operator-=(const Vektor< T1, D > &rhs)
Vektor< T, D > & operator*=(const T &rhs)
Vektor(const Vektor< T, D > &rhs)
Vektor< T, D > & operator+=(const T &rhs)
Element_t operator()(unsigned int i) const
const Vektor< T, D > & operator=(const Vektor< T1, D > &rhs)
Vektor(const Vektor< T1, D1 > &rhs)
Vektor< T, D > & operator*=(const Vektor< T1, D > &rhs)
bool operator==(const Vektor< T, D > &that) const
Vektor< T, D > & operator+=(const Vektor< T1, D > &rhs)
const Vektor< T, D > & operator=(const Vektor< T, D > &rhs)
bool operator!=(const Vektor< T, D > &that) const
Element_t & operator()(unsigned int i)
Element_t operator[](unsigned int i) const
Vektor< T, D > & operator/=(const Vektor< T1, D > &rhs)
const Vektor< T, D > & operator=(const T &rhs)
Vektor< T, D > & operator/=(const T &rhs)
Element_t & operator[](unsigned int i)
static bool apply(const T1 *lhs, const T2 *rhs)
Message & setCopy(const bool c)
PETE_ComputeBinaryType< T1, T2, Op, Op::tag >::type type
Vektor< T, D > operator-(const Vektor< T, D > &op)
const Vektor< T, D > & operator+(const Vektor< T, D > &op)
double euclidean_norm(const Vektor< T, D > &a)
PETEBinaryReturn< T1, T2, OpMultipply >::type dot(const Vektor< T1, D > &lhs, const Vektor< T2, D > &rhs)
std::ostream & operator<<(std::ostream &out, const Vektor< T, D > &rhs)
Vektor< typename PETEBinaryReturn< T1, T2, OpMultipply >::type, D > cross(const Vektor< T1, D > &lhs, const Vektor< T2, D > &rhs)