Skip to content
Snippets Groups Projects
Commit c358a8e5 authored by Elias Pipping's avatar Elias Pipping Committed by Elias Pipping
Browse files

Remove obsolete intermediate variable

parent 5d9d8951
No related branches found
No related tags found
No related merge requests found
...@@ -40,8 +40,7 @@ class SampleFunctional : public SmallFunctional<dimension> { ...@@ -40,8 +40,7 @@ class SampleFunctional : public SmallFunctional<dimension> {
// extending the interface here // extending the interface here
double directionalDerivative(const SmallVector x, double directionalDerivative(const SmallVector x,
const SmallVector dir) const { const SmallVector dir) const {
SmallVector grad = d(x); return d(x) * dir;
return grad * dir;
} }
SmallVector minimise(const SmallVector x, int iterations) const { SmallVector minimise(const SmallVector x, int iterations) const {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment