19 #ifndef IPMEANSQUAREFUNCTIONAL_HH_DZ18EO5C
20 #define IPMEANSQUAREFUNCTIONAL_HH_DZ18EO5C
22 #include "pism/inverse/functional/IPFunctional.hh"
Abstract base class for IPFunctionals arising from an inner product.
virtual void normalize(double scale)
Implicitly set the normalization constant for the functional.
virtual ~IPMeanSquareFunctional2S()
virtual void dot(array::Scalar &a, array::Scalar &b, double *OUTPUT)
Computes the inner product .
IPMeanSquareFunctional2S(std::shared_ptr< const Grid > grid, array::Scalar *weights=NULL)
array::Scalar * m_weights
virtual void valueAt(array::Scalar &x, double *OUTPUT)
Computes the value of the functional at the vector x.
virtual void gradientAt(array::Scalar &x, array::Scalar &gradient)
Computes the gradient of the functional at the vector x.
IPMeanSquareFunctional2S & operator=(IPMeanSquareFunctional2S const &)
IPMeanSquareFunctional2S(IPMeanSquareFunctional2S const &)
Implements a functional corresponding to a (possibly weighted) sum of squares of components of an arr...
virtual void gradientAt(array::Vector &x, array::Vector &gradient)
Computes the gradient of the functional at the vector x.
virtual void dot(array::Vector &a, array::Vector &b, double *OUTPUT)
Computes the inner product .
IPMeanSquareFunctional2V & operator=(IPMeanSquareFunctional2V const &)
virtual void valueAt(array::Vector &x, double *OUTPUT)
Computes the value of the functional at the vector x.
virtual ~IPMeanSquareFunctional2V()
IPMeanSquareFunctional2V(IPMeanSquareFunctional2V const &)
virtual void normalize(double scale)
Implicitly set the normalization constant for the functional.
IPMeanSquareFunctional2V(std::shared_ptr< const Grid > grid, array::Scalar *weights=NULL)
array::Scalar * m_weights
Implements a functional corresponding to a (possibly weighted) sum of squares of components of an arr...