|
| Vec () |
| Default constructor.
|
|
| Vec (const Vec< D, double > &v) |
| Copy constructor.
|
|
| Vec (double const *v) |
| Constructor from a C-array.
|
|
| Vec (double s) |
| Constructor, initialize all elements to a common scalar value.
|
|
Vec< D, double > & | operator= (const Vec< D, double > &v) |
| Copy assignment.
|
|
Vec< D, double > & | operator= (double s) |
| Assignment all elements to the same scalar T value.
|
|
Vec< D, double > & | setToZero () |
| Set all elements to zero.
|
|
void | operator+= (const Vec< D, double > &dv) |
| Add vector dv to this vector.
|
|
void | operator+= (double s) |
| Add a common scalar to all components.
|
|
void | operator-= (const Vec< D, double > &dv) |
| Subtract vector dv from this vector.
|
|
void | operator-= (double s) |
| Subtract a common scalar from all components.
|
|
void | operator*= (double s) |
| Multiply this vector by scalar s.
|
|
const double & | operator[] (int i) const |
| Return one Cartesian element by value.
|
|
double & | operator[] (int i) |
| Return one element of the vector by references.
|
|
Vec< D, double > & | add (const Vec< D, double > &v1, const Vec< D, double > &v2) |
| Add vectors v1 and v2.
|
|
Vec< D, double > & | subtract (const Vec< D, double > &v1, const Vec< D, double > &v2) |
| Subtract vector v2 from v1.
|
|
Vec< D, double > & | multiply (const Vec< D, double > &v, double s) |
| Multiply a vector v by a scalar s.
|
|
Vec< D, double > & | negate (const Vec< D, double > &v) |
| Return negative of vector v.
|
|
Vec< D, double > & | negate () |
| Negate all elements of this vector.
|
|
void | serialize (Archive &ar, const unsigned int version) |
| Serialize to/from an archive.
|
|
template<int D, typename T = double>
class Pscf::RealVec< D, T >
A RealVec<D, T> is D-component vector with elements of floating type T.
Default of type T is T = double.
Definition at line 27 of file RealVec.h.