Template Class CompositeModel

Inheritance Relationships

Base Type

Class Documentation

template<std::size_t N>
class CompositeModel : public virtual otyca::Model<N>

Public Functions

inline void add_component(std::shared_ptr<Model<N>> component)
inline std::vector<std::shared_ptr<Model<N>>> get_components() const
inline virtual std::vector<double> evaluate(const std::vector<std::array<double, N>> &x) const
inline virtual void set_transformed_calibration_parameters(const std::vector<double> &params)

set the transformed parameters for calibration.

Parameters:

transformed_calibration_parameters – the transformed calibration parameters

inline virtual void set_parameters(const std::vector<double> &parameters)

Set the model’s raw parameters.

Parameters:

parameters – A vector of new parameter values.

inline virtual std::vector<double> get_transformed_calibration_parameters() const

get the transformed parameters for calibration.

Returns:

the transformed parameters for calibration

inline virtual std::vector<double> get_parameters() const

Get the model’s raw parameters.

Returns:

A vector containing the model’s parameters.

inline virtual std::vector<std::string> get_parameter_names() const

Get the names of the model parameters.

Default implementation assigns names as “p1”, “p2”, etc.

Returns:

A vector of parameter names.

inline virtual std::vector<double> get_transformed_calibration_parameter_variances() const
inline virtual std::string name() const

Get the model’s name.

Returns:

A string representing the name of the model.

inline virtual std::ostream &print(std::ostream &out) const

Print model parameters and names to an output stream.

Prints parameter names followed by values, comma-separated.

Parameters:

out – The output stream to write to.

Returns:

The modified output stream.

Protected Functions

template<class T>
inline std::vector<T> _get_values(std::function<std::vector<T>(const Model<N>&)> f) const