OpenMD
3.2
Molecular Dynamics in the Open
Toggle main menu visibility
Loading...
Searching...
No Matches
Problem.cpp
1
#include "
optimization/Problem.hpp
"
2
3
#include <config.h>
4
5
namespace
QuantLib {
6
RealType Problem::DotProduct(DynamicVector<RealType>& v1,
7
DynamicVector<RealType>& v2) {
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
Problem.hpp
Abstract optimization problem class.
OpenMD::DynamicVector::lengthSquare
Real lengthSquare()
Returns the squared length of this vector.
Definition
DynamicVector.hpp:327
OpenMD::dot
Real dot(const DynamicVector< Real > &v1, const DynamicVector< Real > &v2)
Returns the dot product of two DynamicVectors.
Definition
DynamicVector.hpp:452
optimization
Problem.cpp
Generated on
for OpenMD by
1.17.0