10 void set_matrix_debug(Dstream&ds);
13 a vector. Storage is handled in Array, Vector only does the mathematics.
18 void OK() const { dat.OK();}
19 int dim() const { return dat.size(); }
21 Vector(Array<Real> d );
22 Vector(const Vector&n);
27 void insert(Real v, int i) {
30 void del(int i) { dat.del(i); }
31 operator String() const;
33 for (int i=0; i < dim(); i++)
37 void operator +=(Vector v) {
38 assert(v.dim() == dim());
39 for (int i=0; i < dim(); i++)
43 void operator /=(Real a) {
47 void operator *=(Real a) {
48 for (int i=0; i < dim(); i++)
52 void operator -=(Vector v) {
53 assert(v.dim() == dim());
54 for (int i=0; i < dim(); i++)
58 Real &operator()(int i) { return dat[i]; }
59 Real operator()(int i) const { return dat[i]; }
60 Real elem(int i) { return dat[i]; }
61 Real operator *(Vector v) const {
63 assert(v.dim() == dim());
64 for (int i=0; i < dim(); i++)
68 Vector operator-() const;
70 return sqrt(norm_sq() );
73 return ((*this) * (*this));
75 operator Array<Real> () { return dat; }
77 /// set to j-th element of unit-base
78 void set_unit(int j) ;
82 operator+(Vector a, Vector const &b) {
88 operator-(Vector a, Vector const &b) {
94 operator*(Vector v, Real a) {
100 operator*( Real a,Vector v) {
106 operator/(Vector v,Real a) {