Class BumpModel

Inheritance Relationships

Base Type

Class Documentation

class BumpModel : public otyca::Model<1>

A model that applies bumps to an underlying core model.

Public Functions

inline BumpModel(std::shared_ptr<Model<1>> core)

Constructs a BumpModel with a core model.

Parameters:

core – The core model to which bumps will be applied.

virtual std::vector<double> evaluate(const std::vector<std::array<double, 1>> &x) const

Evaluates the model at the given points.

Parameters:

x – Input values.

Returns:

A vector of evaluated values.

double core_evaluate(double x) const

Evaluates the core model at a given point.

Parameters:

x – The input value.

Returns:

The evaluated result from the core model.

virtual void set_transformed_calibration_parameters(const std::vector<double> &transformed_parameters)

Sets the transformed parameters.

Parameters:

transformed_parameters – The new transformed parameters.

void add_bump(double t, double bump)

Adds a bump to the model.

Parameters:
  • t – The time at which the bump is applied.

  • bump – The magnitude of the bump.

virtual void calibrate(const Model<1>::CalibrationInput &input)

Calibrates the model using the given input.

Parameters:

input – The calibration input.

double bump(double t_min, double t_max)

Retrieves the sum of all bump values within a given time range.

Parameters:
  • t_min – The minimum time bound.

  • t_max – The maximum time bound.

Returns:

The sum of all bump values.

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

Retrieves the transformed parameters.

Returns:

A vector of transformed parameters.

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

Retrieves the model parameters.

Returns:

A vector of model parameters.

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::string name() const

Retrieves the name of the model.

Returns:

The model name as a string.

inline void set_core_model(std::shared_ptr<Model<1>> core)

Sets the core model.

Parameters:

core – The new core model.

inline std::shared_ptr<Model<1>> get_core_model()

Retrieves the core model.

Returns:

A shared pointer to the core model.

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

Prints the model details to an output stream.

Parameters:

out – The output stream.

Returns:

The modified output stream.

const Scatter<double> &get_bumps() const

Retrieves the bumps applied to the core model.

Returns:

A reference to the Scatter object containing bumps.