25#ifndef LSST_GAUSS2D_GAUSSIAN_H
26#define LSST_GAUSS2D_GAUSSIAN_H
54 virtual std::string repr(
bool name_keywords =
false, std::string_view namespace_separator
79 double get_value()
const override {
return *_value; }
80 void set_value(
double value)
override { *_value = value; }
160 template <
typename T>
193 typename Data::iterator
begin() noexcept;
206 std::
string repr(
bool name_keywords = false,
208 std::
string str() const override;
213 size_t assign(
const Data&
data,
size_t i = 0);
264 typename Data::iterator
begin() noexcept;
277 std::
string repr(
bool name_keywords = false,
279 std::
string str() const override;
287 size_t assign(
const Data&
data,
size_t i = 0);
A 2D coordinate representing the center of a plane figure.
A convolution of a Gaussian source and kernel.
bool operator!=(const ConvolvedGaussian &other) const
bool operator==(const ConvolvedGaussian &other) const
const Gaussian & get_source() const
std::unique_ptr< Gaussian > make_convolution() const
std::string repr(bool name_keywords=false, 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.
ConvolvedGaussian(std::shared_ptr< const Gaussian > source=nullptr, std::shared_ptr< const Gaussian > kernel=nullptr)
const Gaussian & get_kernel() const
A collection of ConvolvedGaussian objects.
std::vector< std::shared_ptr< ConvolvedGaussian > > Data
ConvolvedGaussian & at(size_t i) const
Data::iterator begin() noexcept
ConvolvedGaussians(std::optional< const Data > data)
Data::const_iterator cbegin() const noexcept
typename Data::const_iterator const_iterator
std::shared_ptr< ConvolvedGaussian > at_ptr(size_t i) const
std::string repr(bool name_keywords=false, std::string_view namespace_separator=Object::CC_NAMESPACE_SEPARATOR) const override
Return a full, callable string representation of this.
Data::iterator end() noexcept
Data::const_iterator cend() const noexcept
const ConvolvedGaussian & at_const(size_t i) const
typename Data::iterator iterator
An Ellipse with sigma_x, sigma_y, and rho values.
A 2D Gaussian with a Centroid, Ellipse, and integral.
Gaussian(std::shared_ptr< Centroid > centroid=nullptr, std::shared_ptr< Ellipse > ellipse=nullptr, std::shared_ptr< GaussianIntegral > integral=nullptr)
Construct a new Gaussian object.
Ellipse & get_ellipse()
Get the ellipse object.
void set_const_normal(double const_normal)
std::string repr(bool name_keywords=false, std::string_view namespace_separator=Object::CC_NAMESPACE_SEPARATOR) const override
Return a full, callable string representation of this.
GaussianIntegral & get_integral()
Get the integral object.
bool operator!=(const Gaussian &other) const
double get_integral_value() const
Get the integral value.
void set_integral_value(double integral)
bool operator==(const Gaussian &other) const
const Centroid & get_centroid_const() const
std::shared_ptr< Centroid > get_centroid_ptr()
std::shared_ptr< Ellipse > get_ellipse_ptr()
std::shared_ptr< GaussianIntegral > get_integral_ptr()
void set_centroid_ptr(std::shared_ptr< Centroid > centroid)
void set_ellipse_ptr(std::shared_ptr< Ellipse > ellipse)
const GaussianIntegral & get_integral_const() const
double get_const_normal() const
Get the multiplicative factor for Gaussian function evaluations: integral/(2*area)
Centroid & get_centroid()
Get the centroid object.
std::string str() const override
Return a brief, human-readable string representation of this.
const Ellipse & get_ellipse_const() const
void set_integral_ptr(std::shared_ptr< GaussianIntegral > integral)
Interface for the normalization (total integrated value) of a 2D Gaussian.
virtual bool operator!=(const GaussianIntegral &other) const
virtual double get_value() const =0
virtual void set_value(double value)=0
virtual bool operator==(const GaussianIntegral &other) const
virtual std::string str() const override=0
Return a brief, human-readable string representation of this.
virtual ~GaussianIntegral()=default
virtual std::string repr(bool name_keywords=false, std::string_view namespace_separator=Object::CC_NAMESPACE_SEPARATOR) const override=0
Return a full, callable string representation of this.
A GaussianIntegral storing a float value.
GaussianIntegralValue(double value=1.)
double get_value() const override
void set_value(double value) override
std::string str() const override
Return a brief, human-readable string representation of this.
std::string repr(bool name_keywords=false, std::string_view namespace_separator=Object::CC_NAMESPACE_SEPARATOR) const override
Return a full, callable string representation of this.
An array of Gaussian objects.
Gaussian & at(size_t i) const
Data::iterator begin() noexcept
std::shared_ptr< Gaussian > at_ptr(size_t i) const
Gaussian & operator[](size_t i)
const Gaussian & at_const(size_t i) const
Data::const_iterator cbegin() const noexcept
Gaussians(std::optional< const Data > data)
typename Data::iterator iterator
std::string repr(bool name_keywords=false, std::string_view namespace_separator=Object::CC_NAMESPACE_SEPARATOR) const override
Return a full, callable string representation of this.
std::vector< std::shared_ptr< Gaussian > > Data
Data::const_iterator end() const noexcept
typename Data::const_iterator const_iterator
Data::const_iterator cend() const noexcept
A generic object from the gauss2d library.
static constexpr std::string_view CC_NAMESPACE_SEPARATOR
The C++ namespace separator.