10 void set_matrix_debug(Dstream
&ds
);
16 void OK() const { dat
.OK();}
17 int dim() const { return dat
.size(); }
19 Vector(const Vector
&n
);
24 void insert(Real v
, int i
) {
27 void del(int i
) { dat
.del(i
); }
28 operator String() const;
30 for (int i
=0; i
< dim(); i
++)
34 void operator +=(Vector v
) {
35 assert(v
.dim() == dim());
36 for (int i
=0; i
< dim(); i
++)
40 void operator /=(Real a
) {
44 void operator *=(Real a
) {
45 for (int i
=0; i
< dim(); i
++)
49 void operator -=(Vector v
) {
50 assert(v
.dim() == dim());
51 for (int i
=0; i
< dim(); i
++)
55 Real
&operator()(int i
) { return dat
[i
]; }
56 Real
operator()(int i
) const { return dat
[i
]; }
57 Real
elem(int i
) { return dat
[i
]; }
58 Real
operator *(Vector v
) const {
60 assert(v
.dim() == dim());
61 for (int i
=0; i
< dim(); i
++)
65 Vector
operator-() const;
67 return sqrt(norm_sq() );
70 return ((*this) * (*this));
72 operator Array
<Real
> () { return dat
; }
74 /// set to j-th element of unit-base
75 void set_unit(int j
) ;
78 a vector. Storage is handled in Array, Vector only does the mathematics.
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
) {