#include <colvartypes.h>
Public Methods | |
vector1d (size_t const n=0) | |
Default constructor. More... | |
vector1d (size_t const n, T const *t) | |
Constructor from C array. More... | |
T * | c_array () |
Return a pointer to the data location. More... | |
std::vector< T > & | data_array () |
Return a reference to the data. More... | |
~vector1d () | |
void | reset () |
Set all elements to zero. More... | |
size_t | size () const |
void | resize (size_t const n) |
void | clear () |
T & | operator[] (size_t const i) |
T const & | operator[] (size_t const i) const |
void | operator+= (vector1d< T > const &v) |
void | operator-= (vector1d< T > const &v) |
void | operator *= (cvm::real a) |
void | operator/= (cvm::real a) |
cvm::real | norm2 () const |
Squared norm. More... | |
cvm::real | norm () const |
cvm::real | sum () const |
vector1d< T > const | slice (size_t const i1, size_t const i2) const |
Slicing. More... | |
void | sliceassign (size_t const i1, size_t const i2, vector1d< T > const &v) |
Assign a vector to a slice of this vector. More... | |
size_t | output_width (size_t real_width) const |
Formatted output. More... | |
std::string | to_simple_string () const |
int | from_simple_string (std::string const &s) |
Static Public Methods | |
void | check_sizes (vector1d< T > const &v1, vector1d< T > const &v2) |
Protected Attributes | |
std::vector< T > | data |
Friends | |
vector1d< T > | operator+ (vector1d< T > const &v1, vector1d< T > const &v2) |
vector1d< T > | operator- (vector1d< T > const &v1, vector1d< T > const &v2) |
vector1d< T > | operator * (vector1d< T > const &v, cvm::real a) |
vector1d< T > | operator * (cvm::real a, vector1d< T > const &v) |
vector1d< T > | operator/ (vector1d< T > const &v, cvm::real a) |
T | operator * (vector1d< T > const &v1, vector1d< T > const &v2) |
Inner product. More... | |
std::istream & | operator>> (std::istream &is, cvm::vector1d< T > &v) |
std::ostream & | operator<< (std::ostream &os, cvm::vector1d< T > const &v) |
Definition at line 30 of file colvartypes.h.
|
Default constructor.
Definition at line 39 of file colvartypes.h. References data, n, and colvarmodule::reset. |
|
Constructor from C array.
Definition at line 46 of file colvartypes.h. References data, n, colvarmodule::reset, and colvarmodule::size. |
|
Definition at line 72 of file colvartypes.h. References data. |
|
Return a pointer to the data location.
Definition at line 57 of file colvartypes.h. |
|
Definition at line 106 of file colvartypes.h. References colvarmodule::error, and colvarmodule::to_str. |
|
Definition at line 93 of file colvartypes.h. References data. |
|
Return a reference to the data.
Definition at line 67 of file colvartypes.h. References data. |
|
Definition at line 326 of file colvartypes.h. References COLVARS_ERROR, data, and colvarmodule::size. |
|
Definition at line 220 of file colvartypes.h. References colvarmodule::sqrt. |
|
Squared norm.
Definition at line 210 of file colvartypes.h. References result, and colvarmodule::size. |
|
Definition at line 132 of file colvartypes.h. References colvarmodule::size. |
|
Definition at line 114 of file colvartypes.h. References colvarmodule::size. |
|
Definition at line 123 of file colvartypes.h. References colvarmodule::size. |
|
Definition at line 140 of file colvartypes.h. References colvarmodule::size. |
|
Definition at line 102 of file colvartypes.h. References data. |
|
Definition at line 98 of file colvartypes.h. References data. |
|
Formatted output.
Definition at line 264 of file colvartypes.h. References colvarmodule::size. |
|
Set all elements to zero.
Definition at line 78 of file colvartypes.h. References data. |
|
Definition at line 88 of file colvartypes.h. |
|
Definition at line 83 of file colvartypes.h. References data. |
|
Slicing.
Definition at line 236 of file colvartypes.h. References colvarmodule::error, result, and colvarmodule::size. |
|
Assign a vector to a slice of this vector.
Definition at line 250 of file colvartypes.h. References colvarmodule::error, and colvarmodule::size. |
|
Definition at line 225 of file colvartypes.h. References result, and colvarmodule::size. |
|
Definition at line 312 of file colvartypes.h. References colvarmodule::size, and string. |
|
Inner product.
Definition at line 198 of file colvartypes.h. |
|
Definition at line 182 of file colvartypes.h. |
|
Definition at line 172 of file colvartypes.h. |
|
Definition at line 148 of file colvartypes.h. |
|
Definition at line 160 of file colvartypes.h. |
|
Definition at line 187 of file colvartypes.h. |
|
Definition at line 294 of file colvartypes.h. |
|
Definition at line 269 of file colvartypes.h. |
|
Definition at line 34 of file colvartypes.h. |