8template <
typename F =
double,
int D = 3>
14 for (
int d(0); d < D; ++d) {
coordinate[d] = 0; }
38 for (
int d(0); d < D; ++d) {
coordinate[d] *= r; }
43 for (
int d(0); d < D; ++d) {
coordinate[d] /= r; }
49 for (
int d(0); d < D; ++d) {
57 for (
int d(0); d < D; ++d) {
89 for (
int d(0); d < D; ++d) {
99 return std::real(u.
dot(u)) < epsilon;
106 return std::real(u.
dot(u));
111 return std::sqrt(std::real(u.
dot(u)));
128 const double epsilon(1e-10);
129 for (
int d(0); d < D; ++d) {
141template <
typename F =
double,
int D = 3>
146template <
typename F =
double,
int D = 3>
152template <
typename F =
double,
int D = 3>
155 for (
int d(0); d < D - 1; ++d) { stream << v.
coordinate[d] <<
","; }
std::ostream & operator<<(std::ostream &s, const FcidumpReader::FcidumpHeader &h)
Definition FcidumpWriter.cxx:25
double length() const
Definition Vector.hpp:109
Vector< F, D > operator/(const F r) const
Definition Vector.hpp:63
F & operator[](int d)
Definition Vector.hpp:116
bool operator<(Vector< F, D > const &v) const
Definition Vector.hpp:127
Vector< F, D > & operator/=(const F r)
Definition Vector.hpp:42
Vector< F, D > operator+(Vector< F, D > const &v) const
Definition Vector.hpp:47
F coordinate[D]
Definition Vector.hpp:138
Vector< F, D > operator*(const F r) const
Definition Vector.hpp:69
static bool sortByLength(Vector< F, D > const &n, Vector< F, D > const &m)
Definition Vector.hpp:123
F FieldType
Definition Vector.hpp:11
Vector()
Definition Vector.hpp:13
F at(int d) const
Definition Vector.hpp:118
F operator[](int d) const
Definition Vector.hpp:114
int approximately(Vector< F, D > const &v, const double epsilon=1e-10) const
Definition Vector.hpp:96
F dot(Vector< F, D > const &v) const
Definition Vector.hpp:87
Vector< F, D > operator-(Vector< F, D > const &v) const
Definition Vector.hpp:55
Vector< F, D > & operator*=(const F r)
Definition Vector.hpp:37
double distance(Vector< F, D > const &v) const
Definition Vector.hpp:103
F & at(int d)
Definition Vector.hpp:120
Vector< F, 3 > cross(Vector< F, 3 > const &v)
Definition Vector.hpp:76
Vector(Vector< F, D > const &v)
Definition Vector.hpp:16
Vector< F, D > & operator-=(Vector< F, D > const &v)
Definition Vector.hpp:32
Vector< F, D > & operator+=(Vector< F, D > const &v)
Definition Vector.hpp:27
Vector< F, D > & operator=(Vector< F, D > const &v)
Definition Vector.hpp:22
Definition Algorithm.hpp:10
std::string operator*(const std::string &s, const sisi4s::Permutation< N > &pi)
Definition CcsdPerturbativeTriples.cxx:24
F dot(F const x, F const y)
Definition MathFunctions.hpp:45