20 #ifndef IPO_FUNCTION_CONCRETE_LINEARCOMBINATION_HPP
21 #define IPO_FUNCTION_CONCRETE_LINEARCOMBINATION_HPP
23 #include<ccgsl/blas.hpp>
24 #include"../Function.hpp"
25 #include"../DerivativesEstimates.hpp"
26 #include"../../ipo/IPOException.hpp"
82 virtual double operator()( gsl::vector
const& vector );
89 virtual gsl::vector
gradient( gsl::vector
const& vector );
96 virtual gsl::matrix
hessian( gsl::vector
const& vector );
101 virtual void setVector( gsl::vector
const& vector );
void setCoefficient(size_t const index, double const value)
Set the value of a coefficient.
gsl::vector coefficients
The vector of coefficients;.
virtual gsl::matrix hessian() const
virtual gsl::vector gradient() const
virtual double value() const
This class provides function objects representing linear combinations of the elements of their vector...
Base class for derivative estimates with Hessian.
virtual void setVector(gsl::vector const &vector)
Set a vector and compute function value, gradient and Hessian efficiently.
virtual double operator()(gsl::vector const &vector)
The function operator: computes the sum of the vector entries.
Namespace for functions that can be used by ipo::Objective and ipo::Constraint.
double getCoefficient(size_t const index) const
Get the value of a coefficient.
This class computes a function at a vector.
void setCoefficients(gsl::vector const &vector)
Set coefficients from a vector.
void resize(size_t const size)
Resize the vector of coefficients.
LinearCombination(size_t const size=0)
The constructor sets up function as a linear combination of size entries.
size_t const size
Size of vector arguments to supply to subclass functions.
gsl::vector const & getCoefficients() const
Get the coefficients as a vector by reference.