]> git.tdb.fi Git - libs/math.git/blobdiff - source/linal/vector.h
Add dynamically allocated versions of matrix and vector
[libs/math.git] / source / linal / vector.h
index 6dfe6ca0167fb3e1d57e65217003e3d700f6a3b3..152c26e66482e943e5837c5ddecc54fc9e7c2fde 100644 (file)
@@ -74,6 +74,8 @@ template<typename T, unsigned N>
 class Vector: public VectorComponents<T, N>
 {
 public:
+       typedef T ElementType;
+
        Vector();
        Vector(const T *);
        Vector(T, T);
@@ -82,6 +84,8 @@ public:
        template<typename U>
        Vector(const Vector<U, N> &);
 
+       unsigned size() const { return N; }
+
        template<unsigned M>
        Vector<T, M> slice(unsigned) const;