GQCP
|
#include <Field.hpp>
Public Types | |
using | T = T_ |
Public Member Functions | |
Field (const std::vector< T > &values) | |
Field< T > & | operator+= (const Field< T > &rhs) |
Field< T > | operator- () const |
Field< T > & | operator-= (const Field< T > &rhs) |
size_t | size () const |
void | map (const std::function< T(const T &)> &function) |
Field< T > | mapped (const std::function< T(const T &)> &function) const |
const T & | value (const size_t index) const |
T & | value (const size_t index) |
const std::vector< T > & | values () const |
Static Public Member Functions | |
template<typename Z = T> | |
static enable_if_t< std::is_same< Z, double >::value, Field< double > > | ReadCubeFile (const std::string &filename) |
template<int N> | |
static Field< Vector< double, N > > | ReadGridFile (const std::string &filename) |
Friends | |
Field< T > | operator+ (Field< T > lhs, const Field< T > &rhs) |
Field< T > | operator- (Field< T > lhs, const Field< T > &rhs) |
A set of function values corresponding to points in space.
T_ | The type of the evaluated function values. |
using GQCP::Field< T_ >::T = T_ |
|
inline |
The memberwise constructor.
values | The evaluated function values, in the order of the grid's loop. |
|
inline |
Apply a given function on each of this field's values, in-place.
function | The function to be used on each of the values. |
|
inline |
Apply a given function on each of this field's values.
function | The function to be used on each of the values. |
|
inline |
Add a field to this one by a point-wise addition.
rhs | The right-hand side of the addition. |
this
.
|
inline |
Negate the values of this field.
|
inline |
Subtract another field from this field by point-wise subtraction.
rhs | The right-hand side of the subtraction. |
this
.
|
inlinestatic |
Parse a GAUSSIAN Cube file (http://paulbourke.net/dataformats/cube/) for scalar field values. The grid-associated information is discarded.
filename | The name of the cubefile. |
|
inlinestatic |
Parse an .igrid
- or .rgrid
-file and create the field that is contained in it. The values for the grid are discarded.
filename | The name of the .igrid -file. |
.igrid
) file is a headerless file and contains the following data:.rgrid
) file is a headerless file and contains the following data:
|
inline |
|
inline |
Access one of the field's values.
index | The index of the function value. |
|
inline |
Access one of the field's values.
index | The index of the function value. |
|
inline |
Add two fields by a point-wise addition.
lhs | The left-hand side of the addition. |
rhs | The right-hand side of the addition. |
Subtract one field from another by point-wise subtraction.
lhs | The left-hand side of the subtraction. |
rhs | The right-hand side of the subtraction. |