--- trunk/src/math/Vector.hpp 2004/10/19 21:28:55 110 +++ trunk/src/math/Vector.hpp 2004/10/25 22:46:19 151 @@ -65,6 +65,9 @@ namespace oopse { class Vector{ public: + typedef Real ElemType; + typedef Real* ElemPoinerType; + /** default constructor */ inline Vector(){ for (unsigned int i = 0; i < Dim; i++) @@ -139,6 +142,18 @@ namespace oopse { return data_[i]; } + /** Copy the internal data to an array*/ + void getArray(Real* array) { + for (unsigned int i = 0; i < Dim; i ++) { + array[i] = data_[i]; + } + } + + /** Returns the pointer of internal array */ + Real* getArrayPointer() { + return data_; + } + /** * Tests if this vetor is equal to other vector * @return true if equal, otherwise return false