|
n2p2 - A neural network potential package
|
Vector in 3 dimensional real space. More...
#include <Vec3D.h>

Public Member Functions | |
| Vec3D () | |
| Constructor, initializes to zero. | |
| Vec3D (double x, double y, double z) | |
| Constructor, with initialization of coordinates. | |
| Vec3D (Vec3D const &source) | |
| Copy constructor. | |
| Vec3D (Vec3D &&source) | |
| Move constructor. | |
| Vec3D & | operator= (Vec3D const &rhs) |
| Overload = operator. | |
| Vec3D & | operator+= (Vec3D const &v) |
| Overload += operator to implement in-place vector addition. | |
| Vec3D & | operator-= (Vec3D const &v) |
| Overload -= operator to implement in-place vector subtraction. | |
| Vec3D & | operator*= (double const a) |
| Overload *= operator to implement multiplication with scalar. | |
| Vec3D & | operator/= (double const a) |
| Overload /= operator to implement division by scalar. | |
| double | operator* (Vec3D const &v) const |
| Overload * operator to implement scalar product. | |
| Vec3D & | operator*= (Vec3D const (&A)[3]) |
| Overload * operator to implement (left) multiplication with a matrix defined as Vec3D A[3]. | |
| double & | operator[] (std::size_t const index) |
| Overload [] operator to return coordinate by index. | |
| double const & | operator[] (std::size_t const index) const |
| Overload [] operator to return coordinate by index (const version). | |
| bool | operator== (Vec3D const &rhs) const |
| Compare if vectors are equal. | |
| bool | operator!= (Vec3D const &rhs) const |
| Compare if vectors are not equal. | |
| double | norm () const |
| Calculate norm of vector. | |
| double | norm2 () const |
| Calculate square of norm of vector. | |
| double | l1norm () const |
| Calculate l1 norm of vector (taxicab metric). | |
| Vec3D & | normalize () |
| Normalize vector, norm equals 1.0 afterwards. | |
| Vec3D | cross (Vec3D const &v) const |
| Cross product, argument vector is second in product. | |
Public Attributes | |
| double | r [3] |
| cartesian coordinates. | |
|
inline |
Constructor, initializes to zero.
Definition at line 168 of file Vec3D.h.
References r.
Referenced by cross(), normalize(), operator!=(), operator*(), operator*=(), operator*=(), operator+=(), operator-=(), operator/=(), operator=(), operator==(), Vec3D(), and Vec3D().

|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Overload * operator to implement (left) multiplication with a matrix defined as Vec3D A[3].
By convention A[i][j] gives the element of j-th row and i-th column.
Definition at line 232 of file Vec3D.h.

|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Calculate square of norm of vector.
Definition at line 299 of file Vec3D.h.
References r.
Referenced by nnp::SymFncCompAngn::calculate(), nnp::SymFncCompAngnWeighted::calculate(), nnp::SymFncExpAngn::calculate(), nnp::SymFncExpAngnWeighted::calculate(), nnp::Structure::calculateNeighborList(), and nnp::KspaceGrid::setup().

|
inline |
|
inline |
Cross product, argument vector is second in product.
Definition at line 319 of file Vec3D.h.
Referenced by nnp::KspaceGrid::setup().


| double nnp::Vec3D::r[3] |
cartesian coordinates.
Definition at line 32 of file Vec3D.h.
Referenced by nnp::SymGrpCompAngn::calculate(), nnp::SymGrpCompAngnWeighted::calculate(), nnp::SymGrpCompAngw::calculate(), nnp::SymGrpCompAngwWeighted::calculate(), nnp::SymGrpCompRad::calculate(), nnp::SymGrpCompRadWeighted::calculate(), nnp::SymGrpExpAngn::calculate(), nnp::SymGrpExpAngnWeighted::calculate(), nnp::SymGrpExpAngw::calculate(), nnp::SymGrpExpRad::calculate(), nnp::SymGrpExpRadWeighted::calculate(), cross(), l1norm(), norm(), norm2(), normalize(), operator*(), operator*=(), operator*=(), operator+=(), operator-=(), operator=(), operator==(), operator[](), operator[](), nnp::Dataset::recvStructure(), nnp::Dataset::sendStructure(), Vec3D(), Vec3D(), Vec3D(), and Vec3D().