Loading [MathJax]/extensions/tex2jax.js
LSST Applications g04a91732dc+cc8870d3f5,g07dc498a13+5aa0b8792f,g0fba68d861+80045be308,g1409bbee79+5aa0b8792f,g1a7e361dbc+5aa0b8792f,g1fd858c14a+f64bc332a9,g208c678f98+1ae86710ed,g35bb328faa+fcb1d3bbc8,g4d2262a081+47ad8a29a8,g4d39ba7253+9633a327c1,g4e0f332c67+5d362be553,g53246c7159+fcb1d3bbc8,g60b5630c4e+9633a327c1,g668ecb457e+25d63fd678,g78460c75b0+2f9a1b4bcd,g786e29fd12+cf7ec2a62a,g7b71ed6315+fcb1d3bbc8,g8852436030+8b64ca622a,g89139ef638+5aa0b8792f,g89e1512fd8+04325574d3,g8d6b6b353c+9633a327c1,g9125e01d80+fcb1d3bbc8,g989de1cb63+5aa0b8792f,g9f33ca652e+b196626af7,ga9baa6287d+9633a327c1,gaaedd4e678+5aa0b8792f,gabe3b4be73+1e0a283bba,gb1101e3267+71e32094df,gb58c049af0+f03b321e39,gb90eeb9370+2807b1ad02,gcf25f946ba+8b64ca622a,gd315a588df+a39986a76f,gd6cbbdb0b4+c8606af20c,gd9a9a58781+fcb1d3bbc8,gde0f65d7ad+4e42d81ab7,ge278dab8ac+932305ba37,ge82c20c137+76d20ab76d,gfe73954cf8+a1301e4c20,w.2025.11
LSST Data Management Base Package
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
lsst::gauss2d::fit::IntegralParameterD Struct Reference

#include <parameters.h>

Inheritance diagram for lsst::gauss2d::fit::IntegralParameterD:
lsst::modelfit::parameters::Parameter< double, T > lsst::modelfit::parameters::ParameterBase< double > std::enable_shared_from_this lsst::modelfit::parameters::Object

Public Member Functions

std::string get_desc () const override
 Get a string description for this parameter class.
 
std::string get_desc () const override
 Get a string description for this parameter class.
 
double get_default () const override
 Get the default value.
 
double get_default () const override
 Get the default value.
 
bool get_fixed () const override
 Return whether the parameter is fixed (not free).
 
bool get_fixed () const override
 Return whether the parameter is fixed (not free).
 
bool get_free () const override
 Return whether the parameter is free (not fixed).
 
bool get_free () const override
 Return whether the parameter is free (not fixed).
 
std::string get_label () const override
 Return a string label for this parameter instance.
 
std::string get_label () const override
 Return a string label for this parameter instance.
 
const Limits< double > & get_limits_maximal () const override
 Return limits representing the maximum/minimum untransformed value.
 
const Limits< double > & get_limits_maximal () const override
 Return limits representing the maximum/minimum untransformed value.
 
const Limits< double > & get_limits () const override
 Return the limits for the untransformed value.
 
const Limits< double > & get_limits () const override
 Return the limits for the untransformed value.
 
bool get_linear () const override
 Return whether the parameter is linear.
 
bool get_linear () const override
 Return whether the parameter is linear.
 
double get_min () const override
 Return the minimum value for this parameter instance.
 
double get_min () const override
 Return the minimum value for this parameter instance.
 
double get_max () const override
 Return the maximum value for this parameter instance.
 
double get_max () const override
 Return the maximum value for this parameter instance.
 
std::string get_name () const override
 Get a string name for this parameter class.
 
std::string get_name () const override
 Get a string name for this parameter class.
 
const Transform< double > & get_transform () const override
 Return the transforming function for this parameter instance.
 
const Transform< double > & get_transform () const override
 Return the transforming function for this parameter instance.
 
std::shared_ptr< const Transform< double > > get_transform_ptr () const override
 Return the transform pointer for this parameter instance.
 
std::shared_ptr< const Transform< double > > get_transform_ptr () const override
 Return the transform pointer for this parameter instance.
 
double get_transform_derivative () const override
 Return the derivative of the transform for this parameter instance.
 
double get_transform_derivative () const override
 Return the derivative of the transform for this parameter instance.
 
const Unit & get_unit () const override
 Return the unit of this parameter instance.
 
const Unit & get_unit () const override
 Return the unit of this parameter instance.
 
double get_value () const override
 Return the untransformed value of this parameter instance.
 
double get_value () const override
 Return the untransformed value of this parameter instance.
 
double get_value_transformed () const override
 Return the transformed value of this parameter instance.
 
double get_value_transformed () const override
 Return the transformed value of this parameter instance.
 
std::shared_ptr< T > ptr ()
 Return a shared pointer to this.
 
std::shared_ptr< T > ptr ()
 Return a shared pointer to this.
 
void set_fixed (bool fixed) override
 Set the parameter to be fixed (or not).
 
void set_fixed (bool fixed) override
 Set the parameter to be fixed (or not).
 
void set_free (bool free) override
 Set the parameter to be free (or not).
 
void set_free (bool free) override
 Set the parameter to be free (or not).
 
void set_label (std::string label) override
 Set the string label for this parameter instance.
 
void set_label (std::string label) override
 Set the string label for this parameter instance.
 
void set_limits (std::shared_ptr< const Limits< double > > limits) override
 Set the limits for this parameter instance.
 
void set_limits (std::shared_ptr< const Limits< double > > limits) override
 Set the limits for this parameter instance.
 
void set_transform (const std::shared_ptr< const Transform< double > > transform) override
 Set the transforming function for this parameter instance.
 
void set_transform (const std::shared_ptr< const Transform< double > > transform) override
 Set the transforming function for this parameter instance.
 
void set_value (double value) override
 Set the untransformed value for this parameter instance.
 
void set_value (double value) override
 Set the untransformed value for this parameter instance.
 
void set_value_transformed (double value_transformed) override
 Set the transformed value for this parameter instance.
 
void set_value_transformed (double value_transformed) override
 Set the transformed value for this parameter instance.
 
void set_unit (std::shared_ptr< const Unit > unit=nullptr) override
 Set the unit for this parameter instance.
 
void set_unit (std::shared_ptr< const Unit > unit=nullptr) override
 Set the unit for this parameter instance.
 
std::string repr (bool name_keywords=false, const std::string_view &namespace_separator=Object::CC_NAMESPACE_SEPARATOR) const override
 Return a full, callable string representation of this.
 
std::string repr (bool name_keywords=false, const std::string_view &namespace_separator=Object::CC_NAMESPACE_SEPARATOR) const override
 Return a full, callable string representation of this.
 
std::string str () const override
 Return a brief, human-readable string representation of this.
 
std::string str () const override
 Return a brief, human-readable string representation of this.
 
shared_from_this (T... args)
 

Static Public Member Functions

static constexpr double _get_default ()
 Get the default value for the derived type of this.
 
static constexpr double _get_default ()
 Get the default value for the derived type of this.
 
static const std::string get_type_name (bool strip_namespace_separator=false, const std::string_view &namespace_separator=detail::NAMESPACE_SEPARATOR)
 Get the name of the derived type of this.
 
static const std::string get_type_name (bool strip_namespace_separator=false, const std::string_view &namespace_separator=detail::NAMESPACE_SEPARATOR)
 Get the name of the derived type of this.
 
static const UnitTransform< double > & transform_none ()
 
static const UnitTransform< double > & transform_none ()
 

Static Public Attributes

static const bool _linear = true
 
static constexpr double _min = 0.
 
static const std::string _desc = "Gaussian integral (total integrated weight/flux)"
 
static const std::string _name = "integral"
 
static constexpr std::string_view CC_NAMESPACE_SEPARATOR = "::"
 The C++ namespace separator.
 

Static Protected Member Functions

static const std::string _get_desc ()
 
static const std::string _get_desc ()
 
static constexpr bool _get_linear ()
 
static constexpr bool _get_linear ()
 
static constexpr double _get_min ()
 
static constexpr double _get_min ()
 
static constexpr double _get_max ()
 
static constexpr double _get_max ()
 
static const std::string _get_name ()
 
static const std::string _get_name ()
 

Protected Attributes

double _value
 The untransformed value.
 
double _value
 The untransformed value.
 
double _value_transformed
 The cached, transformed value.
 
double _value_transformed
 The cached, transformed value.
 

Detailed Description

Definition at line 58 of file parameters.h.

Member Function Documentation

◆ _get_default() [1/2]

static constexpr double lsst::modelfit::parameters::Parameter< double, T >::_get_default ( )
inlinestaticconstexprinherited

Get the default value for the derived type of this.

Definition at line 212 of file parameter.h.

212{ return C::_default; }
A parameter with values and metadata.
Definition parameter.h:150

◆ _get_default() [2/2]

static constexpr double lsst::modelfit::parameters::Parameter< double, T >::_get_default ( )
inlinestaticconstexprinherited

Get the default value for the derived type of this.

Definition at line 212 of file parameter.h.

212{ return C::_default; }

◆ _get_desc() [1/2]

static const std::string lsst::modelfit::parameters::Parameter< double, T >::_get_desc ( )
inlinestaticprotectedinherited

Definition at line 204 of file parameter.h.

204{ return C::_desc; }

◆ _get_desc() [2/2]

static const std::string lsst::modelfit::parameters::Parameter< double, T >::_get_desc ( )
inlinestaticprotectedinherited

Definition at line 204 of file parameter.h.

204{ return C::_desc; }

◆ _get_linear() [1/2]

static constexpr bool lsst::modelfit::parameters::Parameter< double, T >::_get_linear ( )
inlinestaticconstexprprotectedinherited

Definition at line 205 of file parameter.h.

205{ return C::_linear; }

◆ _get_linear() [2/2]

static constexpr bool lsst::modelfit::parameters::Parameter< double, T >::_get_linear ( )
inlinestaticconstexprprotectedinherited

Definition at line 205 of file parameter.h.

205{ return C::_linear; }

◆ _get_max() [1/2]

static constexpr double lsst::modelfit::parameters::Parameter< double, T >::_get_max ( )
inlinestaticconstexprprotectedinherited

Definition at line 207 of file parameter.h.

207{ return C::_max; }

◆ _get_max() [2/2]

static constexpr double lsst::modelfit::parameters::Parameter< double, T >::_get_max ( )
inlinestaticconstexprprotectedinherited

Definition at line 207 of file parameter.h.

207{ return C::_max; }

◆ _get_min() [1/2]

static constexpr double lsst::modelfit::parameters::Parameter< double, T >::_get_min ( )
inlinestaticconstexprprotectedinherited

Definition at line 206 of file parameter.h.

206{ return C::_min; }

◆ _get_min() [2/2]

static constexpr double lsst::modelfit::parameters::Parameter< double, T >::_get_min ( )
inlinestaticconstexprprotectedinherited

Definition at line 206 of file parameter.h.

206{ return C::_min; }

◆ _get_name() [1/2]

static const std::string lsst::modelfit::parameters::Parameter< double, T >::_get_name ( )
inlinestaticprotectedinherited

Definition at line 208 of file parameter.h.

208{ return C::_name; }

◆ _get_name() [2/2]

static const std::string lsst::modelfit::parameters::Parameter< double, T >::_get_name ( )
inlinestaticprotectedinherited

Definition at line 208 of file parameter.h.

208{ return C::_name; }

◆ get_default() [1/2]

double lsst::modelfit::parameters::Parameter< double, T >::get_default ( ) const
inlineoverridevirtualinherited

Get the default value.

Implements lsst::modelfit::parameters::ParameterBase< double >.

Definition at line 216 of file parameter.h.

216{ return _get_default(); }

◆ get_default() [2/2]

double lsst::modelfit::parameters::Parameter< double, T >::get_default ( ) const
inlineoverridevirtualinherited

Get the default value.

Implements lsst::modelfit::parameters::ParameterBase< double >.

Definition at line 216 of file parameter.h.

216{ return _get_default(); }

◆ get_desc() [1/2]

std::string lsst::modelfit::parameters::Parameter< double, T >::get_desc ( ) const
inlineoverridevirtualinherited

Get a string description for this parameter class.

Implements lsst::modelfit::parameters::ParameterBase< double >.

Definition at line 214 of file parameter.h.

214{ return _get_desc(); }

◆ get_desc() [2/2]

std::string lsst::modelfit::parameters::Parameter< double, T >::get_desc ( ) const
inlineoverridevirtualinherited

Get a string description for this parameter class.

Implements lsst::modelfit::parameters::ParameterBase< double >.

Definition at line 214 of file parameter.h.

214{ return _get_desc(); }

◆ get_fixed() [1/2]

bool lsst::modelfit::parameters::Parameter< double, T >::get_fixed ( ) const
inlineoverridevirtualinherited

Return whether the parameter is fixed (not free).

Implements lsst::modelfit::parameters::ParameterBase< double >.

Definition at line 218 of file parameter.h.

218{ return !_free; }

◆ get_fixed() [2/2]

bool lsst::modelfit::parameters::Parameter< double, T >::get_fixed ( ) const
inlineoverridevirtualinherited

Return whether the parameter is fixed (not free).

Implements lsst::modelfit::parameters::ParameterBase< double >.

Definition at line 218 of file parameter.h.

218{ return !_free; }

◆ get_free() [1/2]

bool lsst::modelfit::parameters::Parameter< double, T >::get_free ( ) const
inlineoverridevirtualinherited

Return whether the parameter is free (not fixed).

Implements lsst::modelfit::parameters::ParameterBase< double >.

Definition at line 220 of file parameter.h.

220{ return _free; }

◆ get_free() [2/2]

bool lsst::modelfit::parameters::Parameter< double, T >::get_free ( ) const
inlineoverridevirtualinherited

Return whether the parameter is free (not fixed).

Implements lsst::modelfit::parameters::ParameterBase< double >.

Definition at line 220 of file parameter.h.

220{ return _free; }

◆ get_label() [1/2]

std::string lsst::modelfit::parameters::Parameter< double, T >::get_label ( ) const
inlineoverridevirtualinherited

Return a string label for this parameter instance.

Implements lsst::modelfit::parameters::ParameterBase< double >.

Definition at line 222 of file parameter.h.

222{ return _label; }

◆ get_label() [2/2]

std::string lsst::modelfit::parameters::Parameter< double, T >::get_label ( ) const
inlineoverridevirtualinherited

Return a string label for this parameter instance.

Implements lsst::modelfit::parameters::ParameterBase< double >.

Definition at line 222 of file parameter.h.

222{ return _label; }

◆ get_limits() [1/2]

const Limits< double > & lsst::modelfit::parameters::Parameter< double, T >::get_limits ( ) const
inlineoverridevirtualinherited

Return the limits for the untransformed value.

Implements lsst::modelfit::parameters::ParameterBase< double >.

Definition at line 230 of file parameter.h.

230{ return _limiter->limits; }

◆ get_limits() [2/2]

const Limits< double > & lsst::modelfit::parameters::Parameter< double, T >::get_limits ( ) const
inlineoverridevirtualinherited

Return the limits for the untransformed value.

Implements lsst::modelfit::parameters::ParameterBase< double >.

Definition at line 230 of file parameter.h.

230{ return _limiter->limits; }

◆ get_limits_maximal() [1/2]

const Limits< double > & lsst::modelfit::parameters::Parameter< double, T >::get_limits_maximal ( ) const
inlineoverridevirtualinherited

Return limits representing the maximum/minimum untransformed value.

Implements lsst::modelfit::parameters::ParameterBase< double >.

Definition at line 224 of file parameter.h.

224 {
225 static const Limits<T> limits_maximal
226 = Limits<T>(_get_min(), _get_max(), std::string(type_name<C>()) + ".limits_maximal");
227 return limits_maximal;
228 }

◆ get_limits_maximal() [2/2]

const Limits< double > & lsst::modelfit::parameters::Parameter< double, T >::get_limits_maximal ( ) const
inlineoverridevirtualinherited

Return limits representing the maximum/minimum untransformed value.

Implements lsst::modelfit::parameters::ParameterBase< double >.

Definition at line 224 of file parameter.h.

224 {
225 static const Limits<T> limits_maximal
226 = Limits<T>(_get_min(), _get_max(), std::string(type_name<C>()) + ".limits_maximal");
227 return limits_maximal;
228 }

◆ get_linear() [1/2]

bool lsst::modelfit::parameters::Parameter< double, T >::get_linear ( ) const
inlineoverridevirtualinherited

Return whether the parameter is linear.

Implements lsst::modelfit::parameters::ParameterBase< double >.

Definition at line 232 of file parameter.h.

232{ return _get_linear(); }

◆ get_linear() [2/2]

bool lsst::modelfit::parameters::Parameter< double, T >::get_linear ( ) const
inlineoverridevirtualinherited

Return whether the parameter is linear.

Implements lsst::modelfit::parameters::ParameterBase< double >.

Definition at line 232 of file parameter.h.

232{ return _get_linear(); }

◆ get_max() [1/2]

double lsst::modelfit::parameters::Parameter< double, T >::get_max ( ) const
inlineoverridevirtualinherited

Return the maximum value for this parameter instance.

Implements lsst::modelfit::parameters::ParameterBase< double >.

Definition at line 236 of file parameter.h.

236{ return _get_max(); }

◆ get_max() [2/2]

double lsst::modelfit::parameters::Parameter< double, T >::get_max ( ) const
inlineoverridevirtualinherited

Return the maximum value for this parameter instance.

Implements lsst::modelfit::parameters::ParameterBase< double >.

Definition at line 236 of file parameter.h.

236{ return _get_max(); }

◆ get_min() [1/2]

double lsst::modelfit::parameters::Parameter< double, T >::get_min ( ) const
inlineoverridevirtualinherited

Return the minimum value for this parameter instance.

Implements lsst::modelfit::parameters::ParameterBase< double >.

Definition at line 234 of file parameter.h.

234{ return _get_min(); }

◆ get_min() [2/2]

double lsst::modelfit::parameters::Parameter< double, T >::get_min ( ) const
inlineoverridevirtualinherited

Return the minimum value for this parameter instance.

Implements lsst::modelfit::parameters::ParameterBase< double >.

Definition at line 234 of file parameter.h.

234{ return _get_min(); }

◆ get_name() [1/2]

std::string lsst::modelfit::parameters::Parameter< double, T >::get_name ( ) const
inlineoverridevirtualinherited

Get a string name for this parameter class.

Implements lsst::modelfit::parameters::ParameterBase< double >.

Definition at line 238 of file parameter.h.

238{ return _get_name(); }

◆ get_name() [2/2]

std::string lsst::modelfit::parameters::Parameter< double, T >::get_name ( ) const
inlineoverridevirtualinherited

Get a string name for this parameter class.

Implements lsst::modelfit::parameters::ParameterBase< double >.

Definition at line 238 of file parameter.h.

238{ return _get_name(); }

◆ get_transform() [1/2]

const Transform< double > & lsst::modelfit::parameters::Parameter< double, T >::get_transform ( ) const
inlineoverridevirtualinherited

Return the transforming function for this parameter instance.

Implements lsst::modelfit::parameters::ParameterBase< double >.

Definition at line 240 of file parameter.h.

240{ return _transformer->transform; }

◆ get_transform() [2/2]

const Transform< double > & lsst::modelfit::parameters::Parameter< double, T >::get_transform ( ) const
inlineoverridevirtualinherited

Return the transforming function for this parameter instance.

Implements lsst::modelfit::parameters::ParameterBase< double >.

Definition at line 240 of file parameter.h.

240{ return _transformer->transform; }

◆ get_transform_derivative() [1/2]

double lsst::modelfit::parameters::Parameter< double, T >::get_transform_derivative ( ) const
inlineoverridevirtualinherited

Return the derivative of the transform for this parameter instance.

Implements lsst::modelfit::parameters::ParameterBase< double >.

Definition at line 244 of file parameter.h.

244 {
245 return this->get_transform().derivative(this->get_value());
246 }
const Transform< double > & get_transform() const override
Definition parameter.h:240
virtual T derivative(T x) const =0
Return the derivative of this tranform at the value x.

◆ get_transform_derivative() [2/2]

double lsst::modelfit::parameters::Parameter< double, T >::get_transform_derivative ( ) const
inlineoverridevirtualinherited

Return the derivative of the transform for this parameter instance.

Implements lsst::modelfit::parameters::ParameterBase< double >.

Definition at line 244 of file parameter.h.

244 {
245 return this->get_transform().derivative(this->get_value());
246 }

◆ get_transform_ptr() [1/2]

std::shared_ptr< const Transform< double > > lsst::modelfit::parameters::Parameter< double, T >::get_transform_ptr ( ) const
inlineoverridevirtualinherited

Return the transform pointer for this parameter instance.

Implements lsst::modelfit::parameters::ParameterBase< double >.

Definition at line 242 of file parameter.h.

242{ return _transform_ptr; }

◆ get_transform_ptr() [2/2]

std::shared_ptr< const Transform< double > > lsst::modelfit::parameters::Parameter< double, T >::get_transform_ptr ( ) const
inlineoverridevirtualinherited

Return the transform pointer for this parameter instance.

Implements lsst::modelfit::parameters::ParameterBase< double >.

Definition at line 242 of file parameter.h.

242{ return _transform_ptr; }

◆ get_type_name() [1/2]

static const std::string lsst::modelfit::parameters::Parameter< double, T >::get_type_name ( bool strip_namespace_separator = false,
const std::string_view & namespace_separator = detail::NAMESPACE_SEPARATOR )
inlinestaticinherited

Get the name of the derived type of this.

Definition at line 248 of file parameter.h.

250 {
252 }
std::string type_name_str(bool strip_namespace=false, const std::string_view &namespace_str=detail::NAMESPACE_SEPARATOR)
Get a string representation of an arbitrary C++ type, potentially modifying its namespace prefix.
Definition type_name.h:101

◆ get_type_name() [2/2]

static const std::string lsst::modelfit::parameters::Parameter< double, T >::get_type_name ( bool strip_namespace_separator = false,
const std::string_view & namespace_separator = detail::NAMESPACE_SEPARATOR )
inlinestaticinherited

Get the name of the derived type of this.

Definition at line 248 of file parameter.h.

◆ get_unit() [1/2]

const Unit & lsst::modelfit::parameters::Parameter< double, T >::get_unit ( ) const
inlineoverridevirtualinherited

Return the unit of this parameter instance.

Implements lsst::modelfit::parameters::ParameterBase< double >.

Definition at line 254 of file parameter.h.

254{ return *_unit_ptr; }

◆ get_unit() [2/2]

const Unit & lsst::modelfit::parameters::Parameter< double, T >::get_unit ( ) const
inlineoverridevirtualinherited

Return the unit of this parameter instance.

Implements lsst::modelfit::parameters::ParameterBase< double >.

Definition at line 254 of file parameter.h.

254{ return *_unit_ptr; }

◆ get_value() [1/2]

double lsst::modelfit::parameters::Parameter< double, T >::get_value ( ) const
inlineoverridevirtualinherited

Return the untransformed value of this parameter instance.

Implements lsst::modelfit::parameters::ParameterBase< double >.

Definition at line 256 of file parameter.h.

256{ return _value; }

◆ get_value() [2/2]

double lsst::modelfit::parameters::Parameter< double, T >::get_value ( ) const
inlineoverridevirtualinherited

Return the untransformed value of this parameter instance.

Implements lsst::modelfit::parameters::ParameterBase< double >.

Definition at line 256 of file parameter.h.

256{ return _value; }

◆ get_value_transformed() [1/2]

double lsst::modelfit::parameters::Parameter< double, T >::get_value_transformed ( ) const
inlineoverridevirtualinherited

Return the transformed value of this parameter instance.

Implements lsst::modelfit::parameters::ParameterBase< double >.

Definition at line 258 of file parameter.h.

258{ return _value_transformed; }

◆ get_value_transformed() [2/2]

double lsst::modelfit::parameters::Parameter< double, T >::get_value_transformed ( ) const
inlineoverridevirtualinherited

Return the transformed value of this parameter instance.

Implements lsst::modelfit::parameters::ParameterBase< double >.

Definition at line 258 of file parameter.h.

258{ return _value_transformed; }

◆ ptr() [1/2]

std::shared_ptr< T > lsst::modelfit::parameters::Parameter< double, T >::ptr ( )
inlineinherited

Return a shared pointer to this.

Definition at line 261 of file parameter.h.

261{ return this->shared_from_this(); }

◆ ptr() [2/2]

std::shared_ptr< T > lsst::modelfit::parameters::Parameter< double, T >::ptr ( )
inlineinherited

Return a shared pointer to this.

Definition at line 261 of file parameter.h.

261{ return this->shared_from_this(); }

◆ repr() [1/2]

std::string lsst::modelfit::parameters::Parameter< double, T >::repr ( bool name_keywords = false,
const std::string_view & namespace_separator = Object::CC_NAMESPACE_SEPARATOR ) const
inlineoverridevirtualinherited

Return a full, callable string representation of this.

Parameters
name_keywordsWhether to prefix arguments with "{name}=", where name is the arg name in the header (as with keyword arguments in Python).
namespace_separatorThe string to use to delimit namespaces, i.e. :: in C++ and . in Python.
Returns
A callable string representation of this, which should return an an identical object to this.
Note
The representation with name_keywords=false must be callable in C++. The representation with name_keywords=true should be callable in Python, if there are any bindings.

Implements lsst::modelfit::parameters::Object.

Definition at line 312 of file parameter.h.

313 {
314 return get_type_name(false, namespace_separator) + "(" + (name_keywords ? "value=" : "")
315 + std::to_string(_value) + ", " + (name_keywords ? "limits=" : "") + get_limits().repr() + ", "
316 + (name_keywords ? "transform=" : "") + get_transform().repr() + ", "
317 + (name_keywords ? "fixed=" : "") + std::to_string(0 + get_fixed()) + ", "
318 + (name_keywords ? "label='" : "'") + _label + "')";
319 }
std::string repr(bool name_keywords=false, const std::string_view &namespace_separator=CC_NAMESPACE_SEPARATOR) const override
Return a full, callable string representation of this.
Definition limits.h:95
virtual std::string repr(bool name_keywords=false, const std::string_view &namespace_separator=CC_NAMESPACE_SEPARATOR) const =0
Return a full, callable string representation of this.
static const std::string get_type_name(bool strip_namespace_separator=false, const std::string_view &namespace_separator=detail::NAMESPACE_SEPARATOR)
Definition parameter.h:248
const Limits< double > & get_limits() const override
Definition parameter.h:230

◆ repr() [2/2]

std::string lsst::modelfit::parameters::Parameter< double, T >::repr ( bool name_keywords = false,
const std::string_view & namespace_separator = Object::CC_NAMESPACE_SEPARATOR ) const
inlineoverridevirtualinherited

Return a full, callable string representation of this.

Parameters
name_keywordsWhether to prefix arguments with "{name}=", where name is the arg name in the header (as with keyword arguments in Python).
namespace_separatorThe string to use to delimit namespaces, i.e. :: in C++ and . in Python.
Returns
A callable string representation of this, which should return an an identical object to this.
Note
The representation with name_keywords=false must be callable in C++. The representation with name_keywords=true should be callable in Python, if there are any bindings.

Implements lsst::modelfit::parameters::Object.

Definition at line 312 of file parameter.h.

313 {
314 return get_type_name(false, namespace_separator) + "(" + (name_keywords ? "value=" : "")
315 + std::to_string(_value) + ", " + (name_keywords ? "limits=" : "") + get_limits().repr() + ", "
316 + (name_keywords ? "transform=" : "") + get_transform().repr() + ", "
317 + (name_keywords ? "fixed=" : "") + std::to_string(0 + get_fixed()) + ", "
318 + (name_keywords ? "label='" : "'") + _label + "')";
319 }

◆ set_fixed() [1/2]

void lsst::modelfit::parameters::Parameter< double, T >::set_fixed ( bool fixed)
inlineoverridevirtualinherited

Set the parameter to be fixed (or not).

Implements lsst::modelfit::parameters::ParameterBase< double >.

Definition at line 263 of file parameter.h.

◆ set_fixed() [2/2]

void lsst::modelfit::parameters::Parameter< double, T >::set_fixed ( bool fixed)
inlineoverridevirtualinherited

Set the parameter to be fixed (or not).

Implements lsst::modelfit::parameters::ParameterBase< double >.

Definition at line 263 of file parameter.h.

263{ set_free(!fixed); }

◆ set_free() [1/2]

void lsst::modelfit::parameters::Parameter< double, T >::set_free ( bool free)
inlineoverridevirtualinherited

Set the parameter to be free (or not).

Implements lsst::modelfit::parameters::ParameterBase< double >.

Definition at line 264 of file parameter.h.

264{ _free = free; }

◆ set_free() [2/2]

void lsst::modelfit::parameters::Parameter< double, T >::set_free ( bool free)
inlineoverridevirtualinherited

Set the parameter to be free (or not).

Implements lsst::modelfit::parameters::ParameterBase< double >.

Definition at line 264 of file parameter.h.

264{ _free = free; }

◆ set_label() [1/2]

void lsst::modelfit::parameters::Parameter< double, T >::set_label ( std::string label)
inlineoverridevirtualinherited

Set the string label for this parameter instance.

Implements lsst::modelfit::parameters::ParameterBase< double >.

Definition at line 265 of file parameter.h.

265{ _label = std::move(label); }
T move(T... args)

◆ set_label() [2/2]

void lsst::modelfit::parameters::Parameter< double, T >::set_label ( std::string label)
inlineoverridevirtualinherited

Set the string label for this parameter instance.

Implements lsst::modelfit::parameters::ParameterBase< double >.

Definition at line 265 of file parameter.h.

265{ _label = std::move(label); }

◆ set_limits() [1/2]

void lsst::modelfit::parameters::Parameter< double, T >::set_limits ( std::shared_ptr< const Limits< double > > limits)
inlineoverridevirtualinherited

Set the limits for this parameter instance.

Implements lsst::modelfit::parameters::ParameterBase< double >.

Definition at line 266 of file parameter.h.

266 {
267 // TODO: Fix bad_alloc when calling this without &
268 // Disable copy constructor explicitly maybe?
269 const auto& limits_maximal = this->get_limits_maximal();
270 if (limits == nullptr) {
272 } else {
273 if (!((limits->get_min() >= this->get_min()) && (limits->get_max() <= this->get_max()))) {
274 std::string error = get_type_name() + ".set_limits(" + limits->str()
275 + ") sets limits that are less restrictive than the minimum="
278 }
281 }
282 }
const Limits< double > & get_limits_maximal() const override
Definition parameter.h:224
T get_max() const override
Return the maximum value for this parameter instance.
Definition parameter.h:236
std::string str() const override
Return a brief, human-readable string representation of this.
Definition parameter.h:321
T get_min() const override
Return the minimum value for this parameter instance.
Definition parameter.h:234

◆ set_limits() [2/2]

void lsst::modelfit::parameters::Parameter< double, T >::set_limits ( std::shared_ptr< const Limits< double > > limits)
inlineoverridevirtualinherited

Set the limits for this parameter instance.

Implements lsst::modelfit::parameters::ParameterBase< double >.

Definition at line 266 of file parameter.h.

266 {
267 // TODO: Fix bad_alloc when calling this without &
268 // Disable copy constructor explicitly maybe?
269 const auto& limits_maximal = this->get_limits_maximal();
270 if (limits == nullptr) {
272 } else {
273 if (!((limits->get_min() >= this->get_min()) && (limits->get_max() <= this->get_max()))) {
274 std::string error = get_type_name() + ".set_limits(" + limits->str()
275 + ") sets limits that are less restrictive than the minimum="
278 }
281 }
282 }

◆ set_transform() [1/2]

void lsst::modelfit::parameters::Parameter< double, T >::set_transform ( const std::shared_ptr< const Transform< double > > transform)
inlineoverridevirtualinherited

Set the transforming function for this parameter instance.

Implements lsst::modelfit::parameters::ParameterBase< double >.

Definition at line 283 of file parameter.h.

283 {
284 if (transform == nullptr) {
285 // TODO: determine why passing transform_none as arg here returns:
286 // error: modification of '<temporary>' is not a constant expression
287 // whereas get_transform_unit<T>() results in a segfault
288 // (iff Transform has a virtual destructor)
290 } else {
293 }
294 _value_transformed = _transformer->transform.forward(_value);
295 }
static const UnitTransform< double > & transform_none()
Definition parameter.h:111

◆ set_transform() [2/2]

void lsst::modelfit::parameters::Parameter< double, T >::set_transform ( const std::shared_ptr< const Transform< double > > transform)
inlineoverridevirtualinherited

Set the transforming function for this parameter instance.

Implements lsst::modelfit::parameters::ParameterBase< double >.

Definition at line 283 of file parameter.h.

283 {
284 if (transform == nullptr) {
285 // TODO: determine why passing transform_none as arg here returns:
286 // error: modification of '<temporary>' is not a constant expression
287 // whereas get_transform_unit<T>() results in a segfault
288 // (iff Transform has a virtual destructor)
290 } else {
293 }
294 _value_transformed = _transformer->transform.forward(_value);
295 }

◆ set_unit() [1/2]

void lsst::modelfit::parameters::Parameter< double, T >::set_unit ( std::shared_ptr< const Unit > unit = nullptr)
inlineoverridevirtualinherited

Set the unit for this parameter instance.

Implements lsst::modelfit::parameters::ParameterBase< double >.

Definition at line 308 of file parameter.h.

308 {
309 _unit_ptr = unit == nullptr ? nullptr : std::move(unit);
310 }

◆ set_unit() [2/2]

void lsst::modelfit::parameters::Parameter< double, T >::set_unit ( std::shared_ptr< const Unit > unit = nullptr)
inlineoverridevirtualinherited

Set the unit for this parameter instance.

Implements lsst::modelfit::parameters::ParameterBase< double >.

Definition at line 308 of file parameter.h.

308 {
309 _unit_ptr = unit == nullptr ? nullptr : std::move(unit);
310 }

◆ set_value() [1/2]

void lsst::modelfit::parameters::Parameter< double, T >::set_value ( double value)
inlineoverridevirtualinherited

Set the untransformed value for this parameter instance.

Implements lsst::modelfit::parameters::ParameterBase< double >.

Definition at line 297 of file parameter.h.

297 {
299 double value_new = this->get_value();
300 _value_transformed = _transformer->transform.forward(value_new);
301 };

◆ set_value() [2/2]

void lsst::modelfit::parameters::Parameter< double, T >::set_value ( double value)
inlineoverridevirtualinherited

Set the untransformed value for this parameter instance.

Implements lsst::modelfit::parameters::ParameterBase< double >.

Definition at line 297 of file parameter.h.

297 {
299 double value_new = this->get_value();
300 _value_transformed = _transformer->transform.forward(value_new);
301 };

◆ set_value_transformed() [1/2]

void lsst::modelfit::parameters::Parameter< double, T >::set_value_transformed ( double value_transformed)
inlineoverridevirtualinherited

Set the transformed value for this parameter instance.

Implements lsst::modelfit::parameters::ParameterBase< double >.

Definition at line 303 of file parameter.h.

303 {
304 _set_value(_transformer->transform.reverse(value_transformed));
305 _value_transformed = _transformer->transform.forward(this->get_value());
306 }

◆ set_value_transformed() [2/2]

void lsst::modelfit::parameters::Parameter< double, T >::set_value_transformed ( double value_transformed)
inlineoverridevirtualinherited

Set the transformed value for this parameter instance.

Implements lsst::modelfit::parameters::ParameterBase< double >.

Definition at line 303 of file parameter.h.

303 {
304 _set_value(_transformer->transform.reverse(value_transformed));
305 _value_transformed = _transformer->transform.forward(this->get_value());
306 }

◆ str() [1/2]

std::string lsst::modelfit::parameters::Parameter< double, T >::str ( ) const
inlineoverridevirtualinherited

Return a brief, human-readable string representation of this.

Implements lsst::modelfit::parameters::Object.

Definition at line 321 of file parameter.h.

321 {
322 return get_type_name(true) + "(value=" + std::to_string(_value)
323 + ", "
324 // TODO: Implement equality operators for limits/transforms
325 + ((&get_limits() == &get_limits_maximal()) ? "" : ("limits=" + get_limits().repr() + ", "))
326 + ((&get_transform() == &(this->transform_none()))
327 ? ""
328 : ("transform=" + get_transform().repr() + ", "))
329 + (!get_fixed() ? "" : (std::string("fixed=") + std::to_string(0 + get_fixed()) + ", "))
330 + ((get_label() == "") ? "" : ("label='" + get_label() + "'")) + ")";
331 }
std::string repr(bool name_keywords=false, const std::string_view &namespace_separator=Object::CC_NAMESPACE_SEPARATOR) const override
Definition parameter.h:312
T to_string(T... args)

◆ str() [2/2]

std::string lsst::modelfit::parameters::Parameter< double, T >::str ( ) const
inlineoverridevirtualinherited

Return a brief, human-readable string representation of this.

Implements lsst::modelfit::parameters::Object.

Definition at line 321 of file parameter.h.

321 {
322 return get_type_name(true) + "(value=" + std::to_string(_value)
323 + ", "
324 // TODO: Implement equality operators for limits/transforms
325 + ((&get_limits() == &get_limits_maximal()) ? "" : ("limits=" + get_limits().repr() + ", "))
326 + ((&get_transform() == &(this->transform_none()))
327 ? ""
328 : ("transform=" + get_transform().repr() + ", "))
329 + (!get_fixed() ? "" : (std::string("fixed=") + std::to_string(0 + get_fixed()) + ", "))
330 + ((get_label() == "") ? "" : ("label='" + get_label() + "'")) + ")";
331 }

◆ transform_none() [1/2]

static const UnitTransform< double > & lsst::modelfit::parameters::ParameterBase< double >::transform_none ( )
inlinestaticinherited

Definition at line 111 of file parameter.h.

111{ return UnitTransform<T>::get(); };
static const UnitTransform< T > & get()
Definition transform.h:64

◆ transform_none() [2/2]

static const UnitTransform< double > & lsst::modelfit::parameters::ParameterBase< double >::transform_none ( )
inlinestaticinherited

Definition at line 111 of file parameter.h.

111{ return UnitTransform<T>::get(); };

Member Data Documentation

◆ _desc

const std::string lsst::gauss2d::fit::IntegralParameterD::_desc = "Gaussian integral (total integrated weight/flux)"
inlinestatic

Definition at line 62 of file parameters.h.

◆ _linear

const bool lsst::gauss2d::fit::IntegralParameterD::_linear = true
inlinestatic

Definition at line 60 of file parameters.h.

◆ _min

double lsst::gauss2d::fit::IntegralParameterD::_min = 0.
inlinestaticconstexpr

Definition at line 61 of file parameters.h.

◆ _name

const std::string lsst::gauss2d::fit::IntegralParameterD::_name = "integral"
inlinestatic

Definition at line 63 of file parameters.h.

◆ _value [1/2]

double lsst::modelfit::parameters::Parameter< double, T >::_value
protectedinherited

The untransformed value.

Definition at line 200 of file parameter.h.

◆ _value [2/2]

double lsst::modelfit::parameters::Parameter< double, T >::_value
protectedinherited

The untransformed value.

Definition at line 200 of file parameter.h.

◆ _value_transformed [1/2]

double lsst::modelfit::parameters::Parameter< double, T >::_value_transformed
protectedinherited

The cached, transformed value.

Definition at line 202 of file parameter.h.

◆ _value_transformed [2/2]

double lsst::modelfit::parameters::Parameter< double, T >::_value_transformed
protectedinherited

The cached, transformed value.

Definition at line 202 of file parameter.h.

◆ CC_NAMESPACE_SEPARATOR

std::string_view lsst::modelfit::parameters::Object::CC_NAMESPACE_SEPARATOR = "::"
staticconstexprinherited

The C++ namespace separator.

Definition at line 42 of file object.h.


The documentation for this struct was generated from the following file: