OpenMD 3.1
Molecular Dynamics in the Open
Loading...
Searching...
No Matches
Problem.cpp
2
3#include <config.h>
4
5namespace QuantLib {
6 RealType Problem::DotProduct(DynamicVector<RealType>& v1,
8 RealType dp = dot(v1, v2);
9 return dp;
10 }
11
12 RealType Problem::computeGradientNormValue(DynamicVector<RealType>& grad_f) {
13 RealType dot = grad_f.lengthSquare();
14 return dot;
15 }
16} // namespace QuantLib
Abstract optimization problem class.
Dynamically-sized vector class.
Real lengthSquare()
Returns the squared length of this vector.
Real dot(const DynamicVector< Real > &v1, const DynamicVector< Real > &v2)
Returns the dot product of two DynamicVectors.