SourceXtractorPlusPlus  0.11
Please provide a description of the project.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
ModelFitting::ScaledModelComponent Class Reference

#include <ScaledModelComponent.h>

Inheritance diagram for ModelFitting::ScaledModelComponent:
[legend]
Collaboration diagram for ModelFitting::ScaledModelComponent:
[legend]

Public Member Functions

 ScaledModelComponent (std::unique_ptr< ModelComponent > component, std::shared_ptr< BasicParameter > x_scale, std::shared_ptr< BasicParameter > y_scale)
 
 ScaledModelComponent (ScaledModelComponent &&other)
 
virtual ~ScaledModelComponent ()
 
double getValue (double x, double y) override
 
void updateRasterizationInfo (double scale, double r_max) override
 
std::vector< ModelSamplegetSharpSampling () override
 
bool insideSharpRegion (double x, double y) override
 
- Public Member Functions inherited from ModelFitting::ModelComponent
virtual ~ModelComponent ()=default
 

Private Attributes

std::unique_ptr< ModelComponentm_component
 
std::shared_ptr< BasicParameterm_x_scale
 
std::shared_ptr< BasicParameterm_y_scale
 

Additional Inherited Members

- Public Types inherited from ModelFitting::ModelComponent
using ModelSample = std::tuple< double, double, double >
 

Detailed Description

Decorates a model component, scaling the axes by the given parameters.

For instance, for a model scaled by 2 in each axes, a call to getValue(1,1) is equivalent to a getValue(0.5, 0.5) to the underlying function.

Note
The integral value is not kept, but rather increased approximately by (x_scale * y_scale)

Definition at line 41 of file ScaledModelComponent.h.

Constructor & Destructor Documentation

ModelFitting::ScaledModelComponent::ScaledModelComponent ( std::unique_ptr< ModelComponent component,
std::shared_ptr< BasicParameter x_scale,
std::shared_ptr< BasicParameter y_scale 
)

Constructor

Parameters
componentThe component to be decorated. The ownership is acquired by the new object.
x_scaleScale for the X axis
y_scaleScale for the Y axis

Definition at line 28 of file ScaledModelComponent.cpp.

References std::move().

Here is the call graph for this function:

ModelFitting::ScaledModelComponent::ScaledModelComponent ( ScaledModelComponent &&  other)

Definition at line 34 of file ScaledModelComponent.cpp.

References std::move().

Here is the call graph for this function:

ModelFitting::ScaledModelComponent::~ScaledModelComponent ( )
virtualdefault

Member Function Documentation

auto ModelFitting::ScaledModelComponent::getSharpSampling ( )
overridevirtual

Returns the samples computed only for the sharp area, if any.

The returned value is the integrated value of the function for the area corresponding to the sample, not the value of the function. A pixel may be computed adding up the samples that fall within.

Implements ModelFitting::ModelComponent.

Definition at line 51 of file ScaledModelComponent.cpp.

References ModelFitting::m_x_scale(), and ModelFitting::m_y_scale().

Here is the call graph for this function:

double ModelFitting::ScaledModelComponent::getValue ( double  x,
double  y 
)
overridevirtual

Returns the value of the point value of the model at the given coordinates.

Implements ModelFitting::ModelComponent.

Definition at line 41 of file ScaledModelComponent.cpp.

References m_component, m_x_scale, and m_y_scale.

bool ModelFitting::ScaledModelComponent::insideSharpRegion ( double  x,
double  y 
)
overridevirtual

Returns true if the coordinates fall inside the sharp region

Implements ModelFitting::ModelComponent.

Definition at line 62 of file ScaledModelComponent.cpp.

References m_component, m_x_scale, and m_y_scale.

void ModelFitting::ScaledModelComponent::updateRasterizationInfo ( double  scale,
double  r_max 
)
overridevirtual
Parameters
scale
r_max

Implements ModelFitting::ModelComponent.

Definition at line 45 of file ScaledModelComponent.cpp.

References m_component, m_x_scale, m_y_scale, and std::min().

Here is the call graph for this function:

Member Data Documentation

std::unique_ptr<ModelComponent> ModelFitting::ScaledModelComponent::m_component
private

Definition at line 71 of file ScaledModelComponent.h.

Referenced by getValue(), insideSharpRegion(), and updateRasterizationInfo().

std::shared_ptr<BasicParameter> ModelFitting::ScaledModelComponent::m_x_scale
private

Definition at line 73 of file ScaledModelComponent.h.

Referenced by getValue(), insideSharpRegion(), and updateRasterizationInfo().

std::shared_ptr<BasicParameter> ModelFitting::ScaledModelComponent::m_y_scale
private

Definition at line 74 of file ScaledModelComponent.h.

Referenced by getValue(), insideSharpRegion(), and updateRasterizationInfo().


The documentation for this class was generated from the following files: