11#ifndef COLVARMODULE_UTILS_H
12#define COLVARMODULE_UTILS_H
32template <
typename T,
int flag,
bool get_index>
34 int *minmax_index = NULL)
42 typename T::const_iterator xi = v.begin();
45 if (get_index) *minmax_index = -1;
47 for ( ; xi != v.end(); xi++, i++) {
48 cvm::real const norm2 = get_force_norm2<typename T::value_type>(*xi);
55 if (get_index) *minmax_index = i;
61 if (get_index) *minmax_index = i;
66 size_t const n = v.size();
double real
Defining an abstract real number allows to switch precision.
Definition: colvarmodule.h:141
static real sqrt(real const &x)
Reimplemented to work around MS compiler issues.
Definition: colvarmodule.h:179
Collective variables main module.