GammaLib  2.1.0.dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GModelSpatialDiffuse Class Referenceabstract

Abstract diffuse spatial model base class. More...

#include <GModelSpatialDiffuse.hpp>

Inheritance diagram for GModelSpatialDiffuse:
GModelSpatial GBase GModelSpatialDiffuseConst GModelSpatialDiffuseCube GModelSpatialDiffuseMap

Public Member Functions

 GModelSpatialDiffuse (void)
 Void constructor. More...
 
 GModelSpatialDiffuse (const GModelSpatialDiffuse &model)
 Copy constructor. More...
 
virtual ~GModelSpatialDiffuse (void)
 Destructor. More...
 
virtual GModelSpatialDiffuseoperator= (const GModelSpatialDiffuse &model)
 Assignment operator. More...
 
virtual void clear (void)=0
 Clear object. More...
 
virtual GModelSpatialDiffuseclone (void) const =0
 Clones object. More...
 
virtual std::string classname (void) const =0
 Return class name. More...
 
virtual double eval (const GPhoton &photon, const bool &gradients=false) const =0
 
virtual GSkyDir mc (const GEnergy &energy, const GTime &time, GRan &ran) const =0
 
virtual double mc_norm (const GSkyDir &dir, const double &radius) const =0
 
virtual bool contains (const GSkyDir &dir, const double &margin=0.0) const =0
 
virtual void read (const GXmlElement &xml)=0
 
virtual void write (GXmlElement &xml) const =0
 
virtual std::string print (const GChatter &chatter=NORMAL) const =0
 Print content of object. More...
 
virtual GClassCode code (void) const
 Return class code. More...
 
- Public Member Functions inherited from GModelSpatial
 GModelSpatial (void)
 Void constructor. More...
 
 GModelSpatial (const GModelSpatial &model)
 Copy constructor. More...
 
virtual ~GModelSpatial (void)
 Destructor. More...
 
virtual GModelSpatialoperator= (const GModelSpatial &model)
 Assignment operator. More...
 
virtual GModelParoperator[] (const int &index)
 Returns model parameter. More...
 
virtual const GModelParoperator[] (const int &index) const
 Returns model parameter (const version) More...
 
virtual GModelParoperator[] (const std::string &name)
 Returns model parameter. More...
 
virtual const GModelParoperator[] (const std::string &name) const
 Returns model parameter (const version) More...
 
virtual double flux (const GSkyRegion &region, const GEnergy &srcEng=GEnergy(), const GTime &srcTime=GTime()) const
 Returns model flux within sky region. More...
 
std::string type (void) const
 Return model type. More...
 
void type (const std::string &type)
 Set model type. More...
 
GModelParat (const int &index)
 Returns model parameter. More...
 
const GModelParat (const int &index) const
 Returns model parameter (const version) More...
 
bool has_par (const std::string &name) const
 Checks if parameter name exists. More...
 
bool has_free_pars (void) const
 Checks if the spatial model has free parameters. More...
 
int size (void) const
 Return number of parameters. More...
 
void autoscale (void)
 Autoscale parameters. More...
 
const GSkyRegionregion (void) const
 Return boundary sky region. More...
 
- Public Member Functions inherited from GBase
virtual ~GBase (void)
 Destructor. More...
 

Protected Member Functions

void init_members (void)
 Initialise class members. More...
 
void copy_members (const GModelSpatialDiffuse &model)
 Copy class members. More...
 
void free_members (void)
 Delete class members. More...
 
virtual void set_region (void) const =0
 
- Protected Member Functions inherited from GModelSpatial
void init_members (void)
 Initialise class members. More...
 
void copy_members (const GModelSpatial &model)
 Copy class members. More...
 
void free_members (void)
 Delete class members. More...
 

Additional Inherited Members

- Protected Attributes inherited from GModelSpatial
std::string m_type
 Spatial model type. More...
 
GSkyRegionCircle m_region
 Bounding circle. More...
 
std::vector< GModelPar * > m_pars
 Parameter pointers. More...
 

Detailed Description

Abstract diffuse spatial model base class.

This class defines the interface for a diffuse model as spatial component of the factorized source model.

Definition at line 52 of file GModelSpatialDiffuse.hpp.

Constructor & Destructor Documentation

GModelSpatialDiffuse::GModelSpatialDiffuse ( void  )

Void constructor.

Definition at line 52 of file GModelSpatialDiffuse.cpp.

References init_members().

GModelSpatialDiffuse::GModelSpatialDiffuse ( const GModelSpatialDiffuse model)

Copy constructor.

Parameters
[in]modelDiffuse spatial model.

Definition at line 67 of file GModelSpatialDiffuse.cpp.

References copy_members(), and init_members().

GModelSpatialDiffuse::~GModelSpatialDiffuse ( void  )
virtual

Destructor.

Definition at line 84 of file GModelSpatialDiffuse.cpp.

References free_members().

Member Function Documentation

virtual std::string GModelSpatialDiffuse::classname ( void  ) const
pure virtual

Return class name.

Returns
String containing the class name.

Returns the class name for non-abstract classes in a human readable way.

Implements GModelSpatial.

Implemented in GModelSpatialDiffuseCube, GModelSpatialDiffuseMap, and GModelSpatialDiffuseConst.

virtual void GModelSpatialDiffuse::clear ( void  )
pure virtual

Clear object.

Sets the object to a clean initial state. After calling the method the object will be in the same state as it were if an empty instance of the object would have been created.

Implements GModelSpatial.

Implemented in GModelSpatialDiffuseCube, GModelSpatialDiffuseMap, and GModelSpatialDiffuseConst.

virtual GModelSpatialDiffuse* GModelSpatialDiffuse::clone ( void  ) const
pure virtual

Clones object.

Returns
Pointer to deep copy of object.

Creates a deep copy of the object and returns a pointer to the object.

Implements GModelSpatial.

Implemented in GModelSpatialDiffuseCube, GModelSpatialDiffuseMap, and GModelSpatialDiffuseConst.

GClassCode GModelSpatialDiffuse::code ( void  ) const
inlinevirtual

Return class code.

Returns
GModelSpatialDiffuse.

Returns the code GModelSpatialDiffuse of the class.

Implements GModelSpatial.

Definition at line 99 of file GModelSpatialDiffuse.hpp.

References GMODEL_SPATIAL_DIFFUSE.

virtual bool GModelSpatialDiffuse::contains ( const GSkyDir dir,
const double &  margin = 0.0 
) const
pure virtual
void GModelSpatialDiffuse::copy_members ( const GModelSpatialDiffuse model)
protected

Copy class members.

Parameters
[in]modelDiffuse spatial model.

Definition at line 158 of file GModelSpatialDiffuse.cpp.

Referenced by GModelSpatialDiffuse(), and operator=().

virtual double GModelSpatialDiffuse::eval ( const GPhoton photon,
const bool &  gradients = false 
) const
pure virtual
void GModelSpatialDiffuse::free_members ( void  )
protected
void GModelSpatialDiffuse::init_members ( void  )
protected
virtual GSkyDir GModelSpatialDiffuse::mc ( const GEnergy energy,
const GTime time,
GRan ran 
) const
pure virtual
virtual double GModelSpatialDiffuse::mc_norm ( const GSkyDir dir,
const double &  radius 
) const
pure virtual
GModelSpatialDiffuse & GModelSpatialDiffuse::operator= ( const GModelSpatialDiffuse model)
virtual

Assignment operator.

Parameters
[in]modelDiffuse spatial model.
Returns
Diffuse spatial model.

Definition at line 106 of file GModelSpatialDiffuse.cpp.

References copy_members(), free_members(), init_members(), and GModelSpatial::operator=().

Referenced by GModelSpatialDiffuseConst::operator=(), GModelSpatialDiffuseMap::operator=(), and GModelSpatialDiffuseCube::operator=().

virtual std::string GModelSpatialDiffuse::print ( const GChatter chatter = NORMAL) const
pure virtual

Print content of object.

Parameters
[in]chatterChattiness (defaults to NORMAL).
Returns
String containing the content of the object.

Formats the content in a standard way and puts this content in a C++ string that is returned.

Implements GModelSpatial.

Implemented in GModelSpatialDiffuseCube, GModelSpatialDiffuseMap, and GModelSpatialDiffuseConst.

virtual void GModelSpatialDiffuse::read ( const GXmlElement xml)
pure virtual
virtual void GModelSpatialDiffuse::set_region ( void  ) const
protectedpure virtual
virtual void GModelSpatialDiffuse::write ( GXmlElement xml) const
pure virtual

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