26 template <
int D,
typename T =
double>
88 template <
int D,
typename T>
91 for (
int i = 0; i < D; ++i) {
107 template <
int D,
typename T>
110 for (
int i = 0; i < D; ++i) {
111 out.setf(std::ios::scientific);
121 #define PSCF_REALVEC_EPSILON 1.0E-8
123 template <
int D,
typename T>
124 bool operator==(
const RealVec<D, T>& v1,
const RealVec<D, T>& v2)
126 for (
int i = 0; i < D; ++i) {
127 if ( fabs(v1[i] - v2[i]) > PSCF_REALVEC_EPSILON) {
133 #undef PSCF_REALVEC_EPSILON
135 template <
int D,
typename T>
137 {
return !(v1 == v2); }
A RealVec<D, T> is D-component vector with elements of floating type T.
static const int Width
Width of field per Cartesian coordinate in stream IO.
static const int Precision
Precision in stream IO of RealVec<D, T> coordinates.
A Vec<D, T><D,T> is a D-component vector with elements of type T.
File containing preprocessor macros for error handling.
C++ namespace for polymer self-consistent field theory (PSCF).
bool operator==(Polynomial< T > const &a, Polynomial< T > const &b)
Equality operator for polynomials.
std::istream & operator>>(std::istream &in, Pair< Data > &pair)
Input a Pair from an istream.
std::ostream & operator<<(std::ostream &out, const Pair< Data > &pair)
Output a Pair to an ostream, without line breaks.
bool operator!=(Polynomial< T > const &a, Polynomial< T > const &b)
Inequality operator for polynomials.