29 template<
class T,
unsigned D>
49 template<
class T1,
unsigned D1>
51 for (
unsigned d=0; d<D; ++d)
52 X[d] = (d < D1) ? rhs[d] : T1(0);
62 PInsist(D==2,
"Number of arguments does not match Vektor dimension!!");
68 PInsist(D==3,
"Number of arguments does not match Vektor dimension!!");
74 Vektor(
const T& x00,
const T& x01,
const T& x02,
const T& x03) {
75 PInsist(D==4,
"Number of arguments does not match Vektor dimension!!");
168 return !(*
this == that);
191 template<
class T,
unsigned D>
198 template<
class T,
unsigned D>
205 template<
class T,
unsigned D>
212 template<
class T,
unsigned D>
227 template<
class T,
unsigned D>
235 template<
class T,
unsigned D>
262 template < class T1, class T2,
unsigned D >
264 dot(const Vektor<T1,D> &lhs, const Vektor<T2,D> &rhs)
273 template <
class T1,
class T2,
unsigned D >
282 template<
class T,
unsigned D>
283 inline std::ostream& operator<<(std::ostream& out, const Vektor<T,D>& rhs)
285 std::streamsize sw = out.width();
289 for (
unsigned int i=0; i<D - 1; i++)
290 out << std::setw(sw) << rhs[i] <<
" , ";
291 out << std::setw(sw) << rhs[D - 1] <<
" )";
293 out <<
"( " << std::setw(sw) << rhs[0] <<
" )";
Matrix< T > operator+(const Matrix< T > &, const Matrix< T > &)
Matrix addition.
Vektor(const T &x00, const T &x01)
Vektor< T, D > & operator+=(const Vektor< T1, D > &rhs)
Vektor< T, D > & operator/=(const Vektor< T1, D > &rhs)
Vektor< T, D > & operator*=(const T &rhs)
Vektor< T, D > & operator+=(const T &rhs)
Vektor< T, D > & operator-=(const T &rhs)
Element_t & operator[](unsigned int i)
const Vektor< T, D > & operator=(const T &rhs)
double dot(const Vector3D &lhs, const Vector3D &rhs)
Vector dot product.
Vektor(const Vektor< T, D > &rhs)
bool operator==(const Vektor< T, D > &that) const
double Max(double a, double b)
Vector3D cross(const Vector3D &lhs, const Vector3D &rhs)
Vector cross product.
Vektor(const T &x00, const T &x01, const T &x02)
Vektor< T, D > & operator-=(const Vektor< T1, D > &rhs)
Vektor(const Vektor< T1, D1 > &rhs)
static bool apply(const T1 *lhs, const T2 *rhs)
Vektor< T, D > & operator*=(const Vektor< T1, D > &rhs)
double Min(double a, double b)
Vektor< T, D > & operator/=(const T &rhs)
Message & putMessage(Message &m) const
const Vektor< T, D > & operator=(const Vektor< T1, D > &rhs)
Vektor(const T &x00, const T &x01, const T &x02, const T &x03)
Matrix< T > operator-(const Matrix< T > &, const Matrix< T > &)
Matrix subtraction.
Element_t & operator()(unsigned int i)
const Vektor< T, D > & operator=(const Vektor< T, D > &rhs)
Message & getMessage(Message &m)
bool operator!=(const Vektor< T, D > &that) const
#define TSV_ELEMENTWISE_OPERATOR(TSV, OP, APP)
Message & setCopy(const bool c)