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

Constness and references

parent 467ed8d4
No related branches found
No related tags found
No related merge requests found
......@@ -22,9 +22,9 @@ template <int dimension> class SampleFunctional {
typedef MyNonlinearity<dimension> NonlinearityType;
SampleFunctional(SmallMatrix _A, SmallVector _b,
MyNonlinearity<dimension> _phi)
: A(_A), b(_b), phi(_phi) {}
SampleFunctional(SmallMatrix const &A, SmallVector const &b,
MyNonlinearity<dimension> const &phi)
: A(A), b(b), phi(phi) {}
double operator()(const SmallVector v) const {
SmallVector y;
......@@ -81,9 +81,9 @@ template <int dimension> class SampleFunctional {
ret *= -1;
}
SmallMatrix A;
SmallVector b;
NonlinearityType phi;
SmallMatrix const &A;
SmallVector const &b;
NonlinearityType const &phi;
private:
// Gradient of the smooth part
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment