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);
63 PInsist(D==2,
"Number of arguments does not match Vektor dimension!!");
69 PInsist(D==3,
"Number of arguments does not match Vektor dimension!!");
75 Vektor(
const T& x00,
const T& x01,
const T& x02,
const T& x03) {
76 PInsist(D==4,
"Number of arguments does not match Vektor dimension!!");
169 return !(*
this == that);
192template<
class T,
unsigned D>
199template<
class T,
unsigned D>
206template<
class T,
unsigned D>
213template<
class T,
unsigned D>
228template<
class T,
unsigned D>
236template<
class T,
unsigned D>
263template <
class T1,
class T2,
unsigned D >
274template <
class T1,
class T2,
unsigned D >
284template <
class T,
unsigned D >
294template<
class T,
unsigned D>
297 std::streamsize sw = out.width();
301 for (
unsigned int i=0; i<D - 1; i++)
302 out << std::setw(sw) << rhs[i] <<
" , ";
303 out << std::setw(sw) << rhs[D - 1] <<
" )";
305 out <<
"( " << std::setw(sw) << rhs[0] <<
" )";
Tps< T > sqrt(const Tps< T > &x)
Square root.
#define TSV_ELEMENTWISE_OPERATOR(TSV, OP, APP)
double Min(double a, double b)
double Max(double a, double b)
Vektor(const T &x00, const T &x01, const T &x02)
Vektor< T, D > & operator-=(const T &rhs)
Message & getMessage(Message &m)
Message & putMessage(Message &m) const
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)
Vektor(const T &x00, const T &x01, const T &x02, const T &x03)
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)
Vektor(const T &x00, const T &x01)
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)