Jafar
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
mathVect.hpp
00001 #ifndef RIDE_MATH_VECT_HPP
00002 #define RIDE_MATH_VECT_HPP
00003 
00007 #include <vector>
00008 //#include "kernel/jafarException.hpp"
00009 //#include "ride/rideException.hpp"
00010 
00011 
00012 namespace jafar {
00013 
00014     namespace ride {
00015 
00020         class Vect {
00021             private:
00022                 std::vector<double> data;
00023 
00024             public:
00025                 Vect(const int dim);
00026                 Vect(const Vect & v);
00027                 ~Vect();
00028                 bool operator == (const Vect & other) const;
00029                 Vect operator + (const Vect & other) const;
00030                 Vect operator - (const Vect & other) const;
00031                 Vect operator - () const;
00034                 double operator * (const Vect & other) const;
00037                 double operator ^ (const Vect & other) const;
00040                 Vect operator / (const double d) const;
00043                 double norm() const;
00046                 Vect orth() const;
00047                 std::vector<double> get() const;
00048                 double get(const int index) const;
00049                 void set(const int index, const double value);
00050                 void set(const double x, const double y);
00051                 void set(const double x, const double y, const double z);
00052                 void set(const Vect & other);
00053                 int size() const;
00054                 double x() const;
00055                 double y() const;
00056                 double z() const;
00057         };
00058         
00063         Vect operator * (const double m, const Vect & _v);
00064         
00069         double norm(const Vect & v);
00070         
00075         Vect normVect(const Vect & a, const Vect & b);
00076 
00081         double angleVect(const Vect & a, const Vect & b);
00082         
00087         Vect eltWiseProduct(const Vect & a, const Vect & b);
00088 
00093         Vect rotateVect(const Vect & a, const double angle);
00094 
00095 
00096     }
00097 
00098 }
00099 
00100 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on Wed Oct 15 2014 00:37:26 for Jafar by doxygen 1.7.6.1
LAAS-CNRS