**** _ The specification of the general vector class. _ c.f. \$MAT{*,*,*} This is mostly straightforward except for a small trickiness: complex vectors still need to have lengths which return real numbers, and not CPX. (ben) However, the length in a complex vector has to be the same as the type of the components of the complex, since this fact is used in some of the functions. _ the vector type should not need to know about its companion, matrix type, though the matrix type does know about the vector type. Hence, all matrix-vector operations are in the matrix class and not the vector class. _

Descendants
 \$VEC{_,_,_} VEC VECD VECCPXD VECCPX

Public

Features
 **** _ Get the projection of the vector in the i'th direction. _
 **** _ result := An array of same dimensionality with projections of this vector upon each axis. _
 **** _ Set the projection of the vector in the i'th direction. _
 **** _ result := copy of self. Creates new return value. _ Example: v2 ::= v.copy;
 **** result := "new vector size 'sz' "
 **** _ result := "new vector same size as arg" _
 **** The number of dimensions.
 **** _ self := arg1 - arg2 _ Example: a,b,c:VEC; c.inplace_arg_minus_arg(a,b);
 **** _ self := arg1 + arg2 _ Example: a,b,c:VEC; c.inplace_arg_plus_arg(a,b);
 **** _ self := arg1 + s*arg2; _ Example: a,b,c:VEC; c.inplace_arg_plus_scaled_arg(a,3.1415d0,b);
 **** _ "array portion of self" := "array portion of arg" _ Example: v2.inplace_contents(v);
 **** "array portion of self"(i) = function(i) all i _
 **** _ Assign the components of 'arg' from [srcbeg,srcbeg+n-1] to 'self' from [destbeg,destbeg+n-1]. For vectors of elementary value objects, this means "copy elements". _
 **** make self be 'arg' in all directions. _
 **** _ self := self - arg. _ Example: a,b:VEC; a.inplace_minus_arg(b);
 **** _ self := self + arg. _ Example: a,b:VEC; a.inplace_plus_arg(b);
 **** _ self := self + s*arg; _ Example: a,b:VEC; a.inplace_plus_scaled_arg(3.0d0,b);
 **** _ self := self * s; _ Example: v.inplace_scaled_by(4.0d0);
 **** _ Swap contents of self with same sized "arg". _ Example: v2.swap(v1);
 **** make "self" the unit vector in the 'ith' direction. i in [0,dim-1].
 **** Return true if 'arg = self'
 **** _ result (created) := self + arg. _ Example: a,b,c:VEC; c := a - b; Sugar for "a - b", synonym for "minus_arg".
 **** _ result (created) := self - arg. _ Example: a,b,c:VEC; c := a - b;
 **** _ result (created) := self + arg. _ Example: a,b,c:VEC; c := a + b; Sugar for "a + b", synonym for "plus_arg".
 **** _ result (created) := self + arg. _ Example: a,b,c:VEC; c := a + b;
 **** _ result := self + s*arg; _ Example: a,b,c:VEC; c := a.plus_scaled_arg(3.0d0,b);
 **** true if arg has the same size as self. Is false if either 'self' or 'arg' is void or even both. Intent is to be useful in preconditions.
 **** _ result (created) := self * s; _ Example: m2 ::= m * 0.40d0; _
 **** _ result := "a string representation of self" _
 **** _ result (created) := self * s; _ Example: v2 ::= v * 0.40d0; Sugar for "vec * scalar", synonym for 'scaled_by'.