Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Vector.h

Go to the documentation of this file.
00001 
00040 #ifndef __VECTOR_H__
00041 #define __VECTOR_H__
00042 
00043 
00044 class Vector : public RowVector
00045 {
00046 public:
00047         typedef RowVector BaseClass;
00048 
00049         Vector(int nSize) : RowVector(nSize) {}
00050         Vector(const BaseClass& v) : BaseClass(v) {}
00051         
00052         //Vector CrossProduct(const BaseClass& a, const BaseClass& b);
00053         int Size() const { return Ncols();}
00054 
00055         static double DotProduct(const BaseClass& a, const BaseClass& b);
00056         static double CrossProductMag(const BaseClass& a, const BaseClass& b);
00057         
00058         static double Norm2(const BaseClass& a) { return sqrt(DotProduct(a, a)); }
00059         double Norm2() const { return Norm2(*this); }
00060 
00061         static double DistFromPtToLine(const BaseClass& x, const BaseClass& a, const BaseClass& b);
00062 
00063         double DistanceFromLine(const BaseClass& a, const BaseClass& b) const
00064         {
00065                 return DistFromPtToLine(*this, a, b);
00066         }
00067 
00068         void operator=(const BaseClass& rhs) { BaseClass::operator=(rhs); }
00069 };
00070 
00071 #endif //__VECTOR_H__

Generated on Sat Nov 13 11:21:26 2004 for Noisy DAG Matcher by doxygen1.2.18