GammaLib
2.0.0
|
Vector class implementation. More...
Go to the source code of this file.
Macros | |
#define | G_CONSTRUCTOR "GVector::GVector(int&)" |
#define | G_OP_ADD "GVector::operator+=(GVector&)" |
#define | G_OP_SUB "GVector::operator-=(GVector&)" |
#define | G_AT "GVector::at(int&)" |
#define | G_CROSS "cross(GVector&, GVector&)" |
#define | G_SCALAR "operator*(GVector&, GVector&)" |
#define | G_ANGLE "angle(GVector&, GVector&)" |
Functions | |
GVector | cross (const GVector &a, const GVector &b) |
Vector cross product. More... | |
double | operator* (const GVector &a, const GVector &b) |
Vector scalar product. More... | |
double | norm (const GVector &vector) |
Computes vector norm. More... | |
double | min (const GVector &vector) |
Computes minimum vector element. More... | |
double | max (const GVector &vector) |
Computes maximum vector element. More... | |
double | sum (const GVector &vector) |
Computes vector sum. More... | |
double | angle (const GVector &a, const GVector &b) |
Computes angle between vectors. More... | |
GVector | perm (const GVector &vector, const int *p) |
Computes vector permutation. More... | |
GVector | iperm (const GVector &vector, const int *p) |
Computes vector inverse permutation. More... | |
GVector | acos (const GVector &vector) |
Computes arccos of vector elements. More... | |
GVector | acosh (const GVector &vector) |
Computes acosh of vector elements. More... | |
GVector | asin (const GVector &vector) |
Computes arcsin of vector elements. More... | |
GVector | asinh (const GVector &vector) |
Computes asinh of vector elements. More... | |
GVector | atan (const GVector &vector) |
Computes arctan of vector elements. More... | |
GVector | atanh (const GVector &vector) |
Computes atanh of vector elements. More... | |
GVector | cos (const GVector &vector) |
Computes cosine of vector elements. More... | |
GVector | cosh (const GVector &vector) |
Computes cosh of vector elements. More... | |
GVector | exp (const GVector &vector) |
Computes exponential of vector elements. More... | |
GVector | abs (const GVector &vector) |
Computes absolute of vector elements. More... | |
GVector | log (const GVector &vector) |
Computes natural logarithm of vector elements. More... | |
GVector | log10 (const GVector &vector) |
Computes base10 logarithm of vector elements. More... | |
GVector | sin (const GVector &vector) |
Computes sine of vector elements. More... | |
GVector | sinh (const GVector &vector) |
Computes sinh of vector elements. More... | |
GVector | sqrt (const GVector &vector) |
Computes square root of vector elements. More... | |
GVector | tan (const GVector &vector) |
Computes tangens of vector elements. More... | |
GVector | tanh (const GVector &vector) |
Computes tanh of vector elements. More... | |
GVector | pow (const GVector &vector, const double &power) |
Computes tanh of vector elements. More... | |
Vector class implementation.
Definition in file GVector.cpp.
Definition at line 42 of file GVector.cpp.
Referenced by angle().
#define G_AT "GVector::at(int&)" |
Definition at line 39 of file GVector.cpp.
Referenced by GVector::at().
#define G_CONSTRUCTOR "GVector::GVector(int&)" |
Definition at line 36 of file GVector.cpp.
Referenced by GVector::GVector().
Definition at line 40 of file GVector.cpp.
Referenced by cross().
#define G_OP_ADD "GVector::operator+=(GVector&)" |
Definition at line 37 of file GVector.cpp.
Referenced by GVector::operator+=().
#define G_OP_SUB "GVector::operator-=(GVector&)" |
Definition at line 38 of file GVector.cpp.
Referenced by GVector::operator-=().
Definition at line 41 of file GVector.cpp.
Referenced by operator*().
Computes absolute of vector elements.
[in] | vector | Vector. |
Definition at line 1253 of file GVector.cpp.
References GVector::m_data, and GVector::m_num.
Referenced by GMatrixSymmetric::abs(), GMatrix::abs(), GMatrixSparse::abs(), abs(), GIntegral::adaptive_simpson(), GIntegral::adaptive_simpson_aux(), GFitsTable::alloc_column(), GCTAOnOffObservation::arf_rad_max(), GWcs::cel_set(), gammalib::compare(), GCOMDri::compute_dre(), GCTAPsf2D::containment_radius(), GSkyRegionRectangle::contains(), gammalib::cosd(), gammalib::erf(), gammalib::erfinv(), GOptimizerPar::error(), GCTAModelSkyCube::eval(), GCOMIaq::response_kernel::eval(), GCOMBvcs::find(), GIntegral::gauss_kronrod(), GObservations::likelihood::hessian(), GSPIResponse::irf_weight(), GOptimizerLM::iteration(), GWcs::lin_matinv(), GFitsTableCol::load_column_variable(), GSPIResponse::load_irf(), GModelSpectralBins::mc_update(), GModelSpectralFunc::mc_update(), GModelSpectralNodes::mc_update(), GDerivative::minuit2(), GSkyDir::moon(), GCOMInstChars::multi_scatter(), GCOMD1Response::operator()(), GCTACubeBackground::operator()(), GSkyMap::operator()(), operator==(), GOptimizerLM::optimize(), GSkyRegionRectangle::overlaps(), gammalib::plaw_energy_flux(), gammalib::plaw_integral(), gammalib::plaw_photon_flux(), GIntegrals::polint(), GIntegral::polint(), GOptimizerLM::print(), GWcsAZP::prj_s2x(), GWcsMOL::prj_s2x(), GWcsSIN::prj_s2x(), GWcsAZP::prj_set(), GWcsAZP::prj_x2s(), GWcsAIT::prj_x2s(), GWcsMOL::prj_x2s(), GCOMInstChars::read_selfveto(), GSkyMap::read_wcs(), GIntegral::rescale_error(), gammalib::resolution(), GDerivative::ridder(), GHealpix::ring_above(), GIntegral::romberg(), GIntegrals::romberg(), GFitsTableCol::save_column_variable(), GMatrixBase::scale_elements(), GCTACubePsf::set_delta_axis(), GSPIResponse::set_wcs(), GNodeArray::setup(), gammalib::sincosd(), gammalib::sind(), GWcs::sph_s2x(), GWcs::sph_x2s(), gammalib::str(), gammalib::tand(), GCOMBvcs::tdelta(), GTestSuite::test_value(), GFitsTableCol::tform_binary(), GFitsTable::update_header(), GModelSpectralTable::update_mc(), GModelSpectralBrokenPlaw::update_mc_cache(), GCOMD2Response::update_response_vector(), GDerivative::value(), and GPha::write().
Computes arccos of vector elements.
[in] | vector | Vector. |
Definition at line 1064 of file GVector.cpp.
References gammalib::acos(), GVector::m_data, and GVector::m_num.
Computes acosh of vector elements.
[in] | vector | Vector. |
Definition at line 1085 of file GVector.cpp.
References GVector::m_data, and GVector::m_num.
Referenced by acosh().
Computes angle between vectors.
[in] | a | Vector. |
[in] | b | Vector. |
a
and b
in radians.GException::invalid_argument | Mismatch between vector size. |
Returns the angle \(\alpha\) between vector a
and b
in radians. The computation is done using
\[ \alpha = \arccos{\frac{\vec{a} \cdot \vec{b}}{|\vec{a}||\vec{b}|}} \]
Definition at line 974 of file GVector.cpp.
References gammalib::acos(), G_ANGLE, GVector::m_num, norm(), and gammalib::str().
Referenced by GHealpix::max_pixrad().
Computes arcsin of vector elements.
[in] | vector | Vector. |
Definition at line 1106 of file GVector.cpp.
References GVector::m_data, and GVector::m_num.
Referenced by gammalib::acos(), asin(), gammalib::asind(), GHorizDir::celvector(), GSkyDir::celvector(), GSkyDir::euler(), GSkyDir::galvector(), GCTAPointing::instdir(), GHealpix::loc2dir(), GSkyDir::moon(), GWcsMOL::prj_x2s(), GCOMOads::read(), and GSkyDir::sun().
Computes asinh of vector elements.
[in] | vector | Vector. |
Definition at line 1127 of file GVector.cpp.
References GVector::m_data, and GVector::m_num.
Referenced by asinh().
Computes arctan of vector elements.
[in] | vector | Vector. |
Definition at line 1148 of file GVector.cpp.
References GVector::m_data, and GVector::m_num.
Referenced by atan(), gammalib::atand(), GCTABackground3D::solid_angle(), GCTABackground2D::solid_angle(), GWcs::solidangle(), GSkyMap::solidangle(), GModelSpatialRadialProfileDMEinasto::theta_max(), GModelSpatialRadialProfileDMZhao::theta_max(), and GModelSpatialRadialProfileDMBurkert::theta_max().
Computes atanh of vector elements.
[in] | vector | Vector. |
Definition at line 1169 of file GVector.cpp.
References GVector::m_data, and GVector::m_num.
Referenced by atanh().
Computes cosine of vector elements.
[in] | vector | Vector. |
Definition at line 1190 of file GVector.cpp.
References GVector::m_data, and GVector::m_num.
Referenced by GHorizDir::celvector(), GSkyDir::celvector(), gammalib::com_energy2(), GCOMDri::compute_drx(), GCOMDri::compute_geometry(), GSkyRegionCircle::compute_solid_angle(), cos(), GSkyDir::cos_dist(), gammalib::cosd(), cta_psf_radial_kerns_delta::cta_psf_radial_kerns_delta(), GHealpix::dir2pix(), GSkyRegionRectangle::dir_to_local(), GHorizDir::dist(), GSkyDir::euler(), GMatrix::eulerx(), GMatrix::eulery(), GMatrix::eulerz(), cta_psf_radial_kerns_delta::eval(), GModelSpatialEllipticalDisk::eval(), GModelSpatialEllipticalGauss::eval(), com_radial_kerns_rho::eval(), GModelSpatialEllipticalGeneralGauss::eval(), GModelSpatialRadialProfileDMBurkert::halo_kernel_los::eval(), GModelSpatialRadialProfileDMEinasto::halo_kernel_los::eval(), cta_psf_radial_kerns_phi::eval(), GModelSpatialRadialProfileDMZhao::halo_kernel_los::eval(), GCTAModelIrfBackground::npred_roi_kern_phi::eval(), com_radial_kerns_omega::eval(), GCTAModelAeffBackground::npred_roi_kern_phi::eval(), GCTAModelSpatial::npred_roi_kern_phi::eval(), com_elliptical_kerns_rho::eval(), cta_irf_radial_kern_rho::eval(), com_elliptical_kerns_omega::eval(), GResponse::irf_radial_kern_phi::eval(), cta_irf_radial_kern_omega::eval(), GResponse::irf_elliptical_kern_phi::eval(), cta_nroi_radial_kern_rho::eval(), cta_nroi_radial_kern_omega::eval(), cta_irf_elliptical_kern_rho::eval(), cta_irf_elliptical_kern_omega::eval(), cta_nroi_elliptical_kern_rho::eval(), cta_nroi_elliptical_kern_omega::eval(), cta_irf_diffuse_kern_theta::eval(), cta_irf_diffuse_kern_phi::eval(), cta_nroi_diffuse_kern_phi::eval(), cta_psf_radial_kern_rho::eval(), cta_psf_radial_kern_omega::eval(), cta_psf_radial_kern_delta::eval(), cta_psf_radial_kern_phi::eval(), cta_psf_elliptical_kern_rho::eval(), cta_psf_elliptical_kern_omega::eval(), cta_psf_diffuse_kern_delta::eval(), cta_psf_diffuse_kern_phi::eval(), GModelSpatialRadialShell::f1(), GModelSpatialRadialShell::f2(), GFft::factor7(), GModelSpatial::flux(), GSkyDir::galvector(), GTime::gast(), GCTAPointing::instdir(), GHealpix::interpolator(), GCTAResponseIrf::irf_radial(), GSPIResponse::irf_value(), GCOMIaq::klein_nishina_bin(), GCTABackgroundPerfTable::load(), GHealpix::loc2dir(), GCOMIaq::location_spread(), GCTABackgroundPerfTable::mc(), GCTAModelAeffBackground::mc(), GCTAModelRadialGauss::mc(), GModelSpatialRadialDisk::mc(), GCTAModelRadialPolynom::mc(), GCTAPsfTable::mc(), GCTAModelRadialProfile::mc(), GModelSpatialEllipticalDisk::mc(), GModelSpatialDiffuseMap::mc_cone(), GModelSpatialDiffuseCube::mc_cone(), GModelSpatialDiffuseConst::mc_norm(), GSkyDir::moon(), GCOMInstChars::multi_scatter(), GSkyDir::posang(), GSkyDir::precess(), GWcsMOL::prj_s2x(), GWcsSFL::prj_x2s(), gammalib::roi_arclength(), GSkyDir::rotate(), GHorizDir::rotate_deg(), GFftWavetable::set_members(), GSkyRegionMap::set_region_rectangle(), GHealpix::set_z_phi(), gammalib::sincosd(), GCTAPointing::skydir(), GWcs::solidangle(), GSkyDir::sun(), GModelSpatialEllipticalDisk::update(), GModelSpatialRadialDisk::update(), GModelSpatialEllipticalGauss::update(), GModelSpatialRadialRing::update(), and GModelSpatialEllipticalGeneralGauss::update().
Computes cosh of vector elements.
[in] | vector | Vector. |
Definition at line 1211 of file GVector.cpp.
References GVector::m_data, and GVector::m_num.
Referenced by cosh().
Vector cross product.
[in] | a | Vector. |
[in] | b | Vector. |
GException::invalid_argument | Mismatch between vector size or vector not of size 3. |
Computes the cross product between two 3-element vectors (note that the cross product is only defined for 3-element vectors).
Definition at line 793 of file GVector.cpp.
References G_CROSS, GVector::m_data, GVector::m_num, and gammalib::str().
Referenced by GHealpix::max_pixrad(), and GWcs::solidangle().
Computes exponential of vector elements.
[in] | vector | Vector. |
Definition at line 1232 of file GVector.cpp.
References GVector::m_data, and GVector::m_num.
Referenced by GCOMDri::compute_drx(), GSPIResponse::compute_irf(), GCTAPsf2D::containment_radius(), GSkyMap::convolution_kernel(), GModelSpatialDiffuseCube::cube_intensity(), gammalib::erf(), gammalib::erfinv(), GCTAModelSpatialGaussSpectrum::eval(), GModelSpectralExponential::eval(), GModelSpatialRadialGauss::eval(), GModelSpatialRadialGeneralGauss::eval(), GCTAModelRadialGauss::eval(), GModelSpatialEllipticalGauss::eval(), GModelSpatialEllipticalGeneralGauss::eval(), GCTAModelSkyCube::eval(), GModelSpectralGauss::eval(), GCTABackgroundPerfTable::integrand::eval(), GCTAModelRadialGauss::integrand::eval(), GCOMD2Response::kn_gauss_kernel::eval(), GModelSpectralExponential::flux_kern::eval(), GModelSpatialRadialProfileDMEinasto::halo_kernel_los::eval(), GModelSpectralGauss::eflux_kernel::eval(), GCOMD2Response::bkg_gauss_kernel::eval(), GModelSpectralExpPlaw::flux_kernel::eval(), GModelSpectralExpInvPlaw::flux_kernel::eval(), GModelSpectralSuperExpPlaw::flux_kernel::eval(), GCOMIaq::smearing_kernel::eval(), GModelSpectralExpPlaw::eflux_kernel::eval(), GModelSpectralExpInvPlaw::eflux_kernel::eval(), GModelSpectralSuperExpPlaw::eflux_kernel::eval(), GObservation::npred_spec_kern::eval(), GModelSky::flux_kern::eval(), GModelSky::eflux_kern::eval(), exp(), GModelSpatialDiffuseCube::flux(), GCTAEdisp2D::gaussian_array(), GSPIResponse::irf_weight(), GCTABackgroundPerfTable::mc(), GCTAModelRadialGauss::mc(), GModelSpectralBins::mc(), GModelSpectralTable::mc(), GModelSpatialDiffuseCube::mc(), GModelSpectralFunc::mc(), GModelSpectralPlaw::mc(), GModelSpectralExpPlaw::mc(), GModelSpectralLogParabola::mc(), GModelSpectralBrokenPlaw::mc(), GModelSpectralSuperExpPlaw::mc(), GModelSpectralExpInvPlaw::mc(), GModelSpectralPlawPhotonFlux::mc(), GModelSpectralPlawEnergyFlux::mc(), GModelSpectralNodes::mc(), GCOMInstChars::multi_scatter(), GCOMInstChars::ne213a_mfpath(), GCTABackgroundPerfTable::operator()(), GCOMD1Response::operator()(), GCTAAeffPerfTable::operator()(), GCOMD2Response::operator()(), GCTAPsfPerfTable::operator()(), GCTAPsfVector::operator()(), GCTAAeffArf::operator()(), GCTABackground2D::operator()(), GCTABackground3D::operator()(), GCTAPsf2D::operator()(), GCTACubeBackground::operator()(), GCTAEdispPerfTable::operator()(), GArf::operator()(), GRan::poisson(), GCOMInstChars::print(), GWcsMER::prj_x2s(), GCOMInstChars::prob_D1inter(), GCOMInstChars::prob_D2inter(), GCOMInstChars::prob_no_multihit(), GModelSpatialRadialProfileGauss::profile_value(), GCTABackgroundPerfTable::rate(), GCTABackgroundPerfTable::rate_ebin(), GLATMeanPsf::set_offsets(), GEnergies::set_pow(), GCOMInstChars::trans_D1(), GCOMInstChars::trans_D2(), GCOMInstChars::trans_V1(), GCOMInstChars::trans_V23(), GModelSpatialRadialGeneralGauss::update(), GModelSpatialEllipticalGeneralGauss::update(), GModelSpectralExpPlaw::update_eval_cache(), GModelSpectralExpInvPlaw::update_eval_cache(), GModelSpectralSuperExpPlaw::update_eval_cache(), and GCOMD2Response::update_response_vector().
Computes vector inverse permutation.
[in] | vector | Vector. |
[in] | p | Permutation array. |
Definition at line 1038 of file GVector.cpp.
References GVector::m_data, and GVector::m_num.
Referenced by GMatrixSparse::cholesky_solver().
Computes natural logarithm of vector elements.
[in] | vector | Vector. |
Definition at line 1274 of file GVector.cpp.
References GVector::m_data, and GVector::m_num.
Referenced by GRan::chisq2(), GCTAPsfPerfTable::containment_radius(), GCTAPsfVector::containment_radius(), GLog::copy_members(), GModelSpatialDiffuseCube::cube_intensity(), GModelSpectralPlawPhotonFlux::eflux(), GModelSpectralPlawEnergyFlux::eflux(), GModelSky::eflux(), gammalib::erfinv(), GModelSpectralBins::eval(), GCTAModelSkyCube::eval(), GModelSpectralExpPlaw::eval(), GModelSpectralSuperExpPlaw::eval(), GModelSpectralExpInvPlaw::eval(), GCOMD2Response::kn_gauss_kernel::eval(), GModelSpectralSmoothBrokenPlaw::eval(), GModelSpectralLogParabola::flux_kern::eval(), GRan::exp(), GModelSpatialRadialShell::f2(), GModelSpatialDiffuseCube::flux(), GModelSpectralPlawPhotonFlux::flux(), GModelSpectralPlawEnergyFlux::flux(), GModelSky::flux(), gammalib::gammln(), GEphemerides::geo2ssb(), GOptimizerLM::GOptimizerLM(), gammalib::iter_phi(), gammalib::iter_rho(), GCOMIaq::klein_nishina_integral(), GCOMInstChars::kn_cross_section(), GCTAOnOffObservation::likelihood_cstat(), GObservation::likelihood_poisson_binned(), GObservation::likelihood_poisson_unbinned(), GCTABackgroundPerfTable::load(), log(), GOptimizerLM::logger(), GModelSpectralBins::mc(), GModelSpatialDiffuseCube::mc(), GModelSpectralTable::mc(), GModelSpectralFunc::mc(), GModelSpectralPlaw::mc(), GModelSpectralExpPlaw::mc(), GModelSpectralLogParabola::mc(), GModelSpectralBrokenPlaw::mc(), GModelSpectralSuperExpPlaw::mc(), GModelSpectralExpInvPlaw::mc(), GModelSpectralPlawPhotonFlux::mc(), GModelSpectralPlawEnergyFlux::mc(), GModelSpectralNodes::mc(), GModelSpectralBins::mc_update(), GModelSpectralFunc::mc_update(), GModelSpectralNodes::mc_update(), GCOMInstChars::ne213a_mfpath(), GRan::normal(), GObservation::npred_spec(), GCTABackground2D::operator()(), GCTABackground3D::operator()(), GCTACubeBackground::operator()(), GArf::operator()(), operator<<(), gammalib::plaw_energy_flux(), gammalib::plaw_integral(), gammalib::plaw_photon_flux(), GRan::poisson(), GWcsMER::prj_s2x(), GCOMInstChars::prob_D1inter(), GCOMInstChars::prob_D2inter(), GCOMInstChars::prob_no_multihit(), GCOMInstChars::read_coeffs(), GModelSpectralFunc::set_cache(), GModelSpectralNodes::set_flux_cache(), GLATMeanPsf::set_offsets(), GEnergies::set_pow(), GCOMBvc::tdelta(), GCOMBvcs::tdelta(), GCOMInstChars::trans_D1(), GCOMInstChars::trans_D2(), GCOMInstChars::trans_V1(), GCOMInstChars::trans_V23(), GModelSpectralPlawPhotonFlux::update(), GModelSpectralPlawEnergyFlux::update(), GModelSpectralPlaw::update_eval_cache(), GModelSpectralLogParabola::update_eval_cache(), GModelSpectralBrokenPlaw::update_eval_cache(), GModelSpectralSmoothBrokenPlaw::update_eval_cache(), GModelSpectralTable::update_flux(), GModelSpectralTable::update_mc(), GModelSpectralPlaw::update_mc_cache(), GModelSpectralExpPlaw::update_mc_cache(), GModelSpectralLogParabola::update_mc_cache(), GModelSpectralBrokenPlaw::update_mc_cache(), GModelSpectralExpInvPlaw::update_mc_cache(), GModelSpectralSuperExpPlaw::update_mc_cache(), and GCTAOnOffObservation::wstat_value().
Computes base10 logarithm of vector elements.
[in] | vector | Vector. |
Definition at line 1295 of file GVector.cpp.
References GVector::m_data, and GVector::m_num.
Referenced by GModelSpectralFunc::append(), GCTAResponseTable::axis_log10(), GSPIResponse::compute_irf(), GModelSpectralFunc::insert(), GModelSpectralFunc::intensity(), GModelSpectralFunc::load_nodes(), log10(), GEnergy::log10erg(), GEnergy::log10MeV(), GLATResponseTable::read(), GCTAPsfVector::read(), GCTAEdisp2D::set_boundaries(), GLATEventCube::set_energies(), GModelSpectralTable::set_energy_nodes(), GModelSpectralNodes::set_eval_cache(), GEnergies::set_log(), and GModelSpectralNodes::update_eval_cache().
double max | ( | const GVector & | vector | ) |
Computes maximum vector element.
[in] | vector | Vector. |
Definition at line 915 of file GVector.cpp.
References GVector::m_data, and GVector::m_num.
Referenced by cta_irf_elliptical_kern_rho::eval(), cta_nroi_elliptical_kern_rho::eval(), cta_psf_elliptical_kern_rho::eval(), GEbounds::extend(), GObservations::likelihood::hessian(), GEbounds::insert_eng(), gammalib::limit_omega(), GModelSpectralTable::load_par(), GCOMInstChars::max_coeff(), GModelSpatialDiffuseCube::mc(), GDerivative::minuit2(), GModelSpectralTable::print(), GRmf::read(), and GModelSpatialComposite::write().
double min | ( | const GVector & | vector | ) |
Computes minimum vector element.
[in] | vector | Vector. |
Definition at line 886 of file GVector.cpp.
References GVector::m_data, and GVector::m_num.
Referenced by cta_irf_elliptical_kern_rho::eval(), cta_nroi_elliptical_kern_rho::eval(), cta_psf_elliptical_kern_rho::eval(), GEbounds::extend(), GObservations::likelihood::hessian(), GEbounds::insert_eng(), gammalib::limit_omega(), GModelSpectralTable::load_par(), GCOMInstChars::min_coeff(), GModelSpectralTable::print(), and GModelSpatialComposite::write().
double norm | ( | const GVector & | vector | ) |
Computes vector norm.
[in] | vector | Vector. |
Definition at line 864 of file GVector.cpp.
References GVector::m_data, GVector::m_num, and sqrt().
Referenced by angle(), GFft::backward(), GModelSpatialRadialProfile::cache_index(), GCOMObservation::compute_drb_bgdlixa(), GCOMObservation::compute_drb_bgdlixe(), GCOMObservation::compute_drb_phinor(), GCOMDri::compute_drg(), GSkyMap::convolution_kernel(), GModelSpectralPlawPhotonFlux::eflux(), GCTAModelIrfBackground::eval(), GModelSpatialDiffuseConst::eval(), cta_psf_radial_kerns_phi::eval(), GCTACubePsf::fill(), GCTACubeEdisp::fill(), GModelSpatialDiffuseConst::flux(), GModelSpectralPlawEnergyFlux::flux(), gammalib::gauss_integral(), GCTAOnOffObservation::GCTAOnOffObservation(), GEphemerides::geo2ssb(), GCTAResponseCube::irf_radial(), GHealpix::max_pixrad(), GCTAModelIrfBackground::mc(), GCTAModelAeffBackground::mc(), GModelSpectralExpPlaw::mc(), GModelSpectralExpInvPlaw::mc(), GModelSpectralSuperExpPlaw::mc(), GModelSky::mc(), GModelSpatialDiffuseConst::mc_norm(), GModelSpatialDiffuseMap::mc_norm(), GModelSpatialPointSource::mc_norm(), GModelSpatialElliptical::mc_norm(), GModelSpatialRadial::mc_norm(), GModelSpectralBins::mc_update(), GModelSpectralNodes::mc_update(), GCTAOnOffObservation::N_bgd(), GCOMInstChars::ne213a_mfpath(), GLATPsfV3::normalize_psf(), GLATPsfV1::psf(), GCOMModelDRM::read(), GModelSpectralConst::read(), GModelSpectralPlaw::read(), GModelSpectralExpPlaw::read(), GModelSpectralLogParabola::read(), GModelSpectralExpInvPlaw::read(), GModelSpectralSuperExpPlaw::read(), GCTAModelSkyCube::read_xml_spatial(), GCTAOnOffObservation::rmf_stacked(), GCOMBvc::tdelta(), GCOMBvcs::tdelta(), GCTAPsfKing::update(), GModelSpectralBrokenPlaw::update_mc_cache(), GCOMD2Response::update_response_vector(), GCOMModelDRM::write(), GModelSpectralPlaw::write(), GModelSpectralExpPlaw::write(), GModelSpectralLogParabola::write(), GModelSpectralBrokenPlaw::write(), GModelSpectralExpInvPlaw::write(), GModelSpectralSuperExpPlaw::write(), GModelSpectralSmoothBrokenPlaw::write(), and GCTAModelSkyCube::write_xml_spatial().
Vector scalar product.
[in] | a | Vector. |
[in] | b | Vector. |
a
and b
.GException::invalid_argument | Mismatch between vector size. |
Returns the scalar product between vector a
and b
.
Definition at line 836 of file GVector.cpp.
References G_SCALAR, GVector::m_data, GVector::m_num, and gammalib::str().
Computes vector permutation.
[in] | vector | Vector. |
[in] | p | Permutation array. |
Definition at line 1011 of file GVector.cpp.
References GVector::m_data, and GVector::m_num.
Referenced by GMatrixSparse::cholesky_solver().
Computes tanh of vector elements.
[in] | vector | Vector. |
[in] | power | Power. |
Definition at line 1422 of file GVector.cpp.
References GVector::m_data, and GVector::m_num.
Referenced by GLATPsfV1::base_fct(), GLATPsfV3::base_fct(), GLATPsfV1::base_int(), GLATPsfV3::base_int(), GCTAPsfKing::containment_radius(), GModelSpectralPlawEnergyFlux::eflux(), GModelSpectralPlawPhotonFlux::eflux(), gammalib::elogmean(), GModelSpatialRadialGeneralGauss::eval(), GModelSpectralBins::eval(), GModelSpatialEllipticalGeneralGauss::eval(), GCTAModelRadialProfile::eval(), GModelSpectralFunc::eval(), GModelSpectralNodes::eval(), GCOMD2Response::kn_gauss_kernel::eval(), GModelSpatialRadialProfileDMEinasto::halo_kernel_los::eval(), GModelSpectralSmoothBrokenPlaw::eval(), GModelSpatialRadialProfileDMZhao::halo_kernel_los::eval(), GCOMIaq::response_kernel::eval(), GModelSpectralExpPlaw::flux_kernel::eval(), GModelSpectralLogParabola::flux_kern::eval(), GModelSpectralExpInvPlaw::flux_kernel::eval(), GModelSpectralSuperExpPlaw::flux_kernel::eval(), GModelSpectralExpPlaw::eflux_kernel::eval(), GModelSpectralExpInvPlaw::eflux_kernel::eval(), GModelSpectralSmoothBrokenPlaw::flux_kern::eval(), GModelSpectralSuperExpPlaw::eflux_kernel::eval(), GModelSpectralPlawEnergyFlux::flux(), GModelSpectralPlawPhotonFlux::flux(), GCTABackgroundPerfTable::load(), GEnergy::log10MeV(), GCTAPsfKing::mc(), GModelSpectralLogParabola::mc(), GModelSpectralSuperExpPlaw::mc(), GModelSpectralPlawEnergyFlux::mc(), GModelSpectralPlawPhotonFlux::mc(), GModelSpectralBins::mc_update(), GModelSpectralFunc::mc_update(), GModelSpectralNodes::mc_update(), GCTAPsfKing::operator()(), gammalib::plaw_energy_flux(), gammalib::plaw_integral(), gammalib::plaw_photon_flux(), pow(), GModelSpatialDiffuseCube::print(), GCTAPsfVector::print(), GCTAPsfPerfTable::print(), GCTAEdispPerfTable::print(), GCOMInstChars::psd_correction(), GLATPsfV1::psf(), GCTAPsfKing::r_max(), GLATResponseTable::read(), GIntegral::rescale_error(), GLATPsfBase::scale_factor(), GModelSpectralFunc::set_cache(), GModelSpectralNodes::set_flux_cache(), GEnergies::set_log(), GEnergies::set_pow(), GCTAPsfKing::update(), GModelSpectralPlawEnergyFlux::update(), GModelSpectralPlawPhotonFlux::update(), GModelSpectralPlaw::update_eval_cache(), GModelSpectralExpPlaw::update_eval_cache(), GModelSpectralLogParabola::update_eval_cache(), GModelSpectralBrokenPlaw::update_eval_cache(), GModelSpectralSuperExpPlaw::update_eval_cache(), GModelSpectralExpInvPlaw::update_eval_cache(), GModelSpectralSmoothBrokenPlaw::update_eval_cache(), GModelSpectralTable::update_flux(), GModelSpectralTable::update_mc(), GModelSpectralPlaw::update_mc_cache(), GModelSpectralExpPlaw::update_mc_cache(), GModelSpectralLogParabola::update_mc_cache(), GModelSpectralBrokenPlaw::update_mc_cache(), GModelSpectralSuperExpPlaw::update_mc_cache(), GModelSpectralExpInvPlaw::update_mc_cache(), GModelSpectralSmoothBrokenPlaw::update_mc_cache(), and GModelSpatialDiffuseCube::write().
Computes sine of vector elements.
[in] | vector | Vector. |
Definition at line 1316 of file GVector.cpp.
References GVector::m_data, and GVector::m_num.
Referenced by GModelSpatialRadialProfile::cache_index(), GHorizDir::celvector(), GSkyDir::celvector(), GCOMDri::compute_geometry(), GCTAPsfTable::containment_radius(), GSkyDir::cos_dist(), cta_psf_radial_kerns_delta::cta_psf_radial_kerns_delta(), GSkyRegionRectangle::dir_to_local(), GHorizDir::dist(), GSkyDir::euler(), GMatrix::eulerx(), GMatrix::eulery(), GMatrix::eulerz(), cta_psf_radial_kerns_delta::eval(), GModelSpatialEllipticalDisk::eval(), GModelSpatialEllipticalGauss::eval(), com_radial_kerns_rho::eval(), GModelSpatialEllipticalGeneralGauss::eval(), GModelSpatialRadialShell::eval(), GLATPsfV1::base_integrand::eval(), GLATPsfV3::base_integrand::eval(), GCTABackgroundPerfTable::integrand::eval(), cta_npsf_kern_rad_azsym::eval(), GCTAModelRadialGauss::integrand::eval(), GCTAModelRadialPolynom::integrand::eval(), GCTAModelIrfBackground::npred_roi_kern_theta::eval(), GCTAModelRadialProfile::integrand::eval(), GCTAModelAeffBackground::npred_roi_kern_theta::eval(), cta_psf_radial_kerns_phi::eval(), GCTAModelRadialAcceptance::roi_kern::eval(), GCTAModelSpatial::npred_roi_kern_theta::eval(), GCTAModelIrfBackground::npred_roi_kern_phi::eval(), com_radial_kerns_omega::eval(), GCTAModelAeffBackground::npred_roi_kern_phi::eval(), GCTAModelSpatial::npred_roi_kern_phi::eval(), GModelSpatial::circle_int_kern_rho::eval(), com_elliptical_kerns_rho::eval(), cta_irf_radial_kern_rho::eval(), GResponse::irf_radial_kern_theta::eval(), com_elliptical_kerns_omega::eval(), GResponse::irf_radial_kern_phi::eval(), GResponse::irf_elliptical_kern_theta::eval(), GResponse::irf_elliptical_kern_phi::eval(), cta_nroi_radial_kern_rho::eval(), cta_nroi_radial_kern_omega::eval(), cta_irf_elliptical_kern_rho::eval(), cta_irf_elliptical_kern_omega::eval(), cta_nroi_elliptical_kern_rho::eval(), cta_nroi_elliptical_kern_omega::eval(), cta_irf_diffuse_kern_theta::eval(), cta_irf_diffuse_kern_phi::eval(), cta_nroi_diffuse_kern_theta::eval(), cta_nroi_diffuse_kern_phi::eval(), cta_psf_radial_kern_rho::eval(), cta_psf_radial_kern_delta::eval(), cta_psf_elliptical_kern_rho::eval(), cta_psf_elliptical_kern_omega::eval(), cta_psf_diffuse_kern_delta::eval(), cta_psf_diffuse_kern_phi::eval(), GFft::factor5(), GFft::factor7(), GModelSpatial::flux(), GSkyDir::galvector(), GTime::gast(), GCTAPointing::instdir(), GLATMeanPsf::integral(), GCOMResponse::irf_diffuse(), GCTAResponseIrf::irf_radial(), GSPIResponse::irf_value(), GHealpix::loc2dir(), GCOMIaq::location_spread(), GCTABackgroundPerfTable::mc(), GModelSpatialRadialGeneralGauss::mc(), GCTAModelRadialGauss::mc(), GCTAModelRadialPolynom::mc(), GCTAModelRadialProfile::mc(), GModelSpatialEllipticalGeneralGauss::mc(), GModelSpatialRadialShell::mc(), GCTAModelRadialPolynom::mc_max_value(), GCTAModelRadialProfile::mc_max_value(), GSkyDir::moon(), GCOMInstChars::multi_scatter(), GSkyDir::posang(), GSkyDir::precess(), GCTAPsfTable::precompute(), GWcsMOL::prj_s2x(), GCOMResponse::read(), gammalib::roi_arclength(), GSkyDir::rotate(), GHorizDir::rotate_deg(), GFftWavetable::set_members(), GSkyRegionMap::set_region_rectangle(), GHealpix::set_z_phi(), sin(), gammalib::sincosd(), gammalib::sind(), GCTAPointing::skydir(), GWcs::solidangle(), GSkyDir::sun(), GModelSpatialEllipticalGauss::update(), GModelSpatialEllipticalGeneralGauss::update(), GModelSpatialRadialShell::update(), and GCOMResponse::write().
Computes sinh of vector elements.
[in] | vector | Vector. |
Definition at line 1337 of file GVector.cpp.
References GVector::m_data, and GVector::m_num.
Referenced by sinh().
Computes square root of vector elements.
[in] | vector | Vector. |
Definition at line 1358 of file GVector.cpp.
References GVector::m_data, and GVector::m_num.
Referenced by GHealpix::ang2pix_z_phi_nest(), GHealpix::ang2pix_z_phi_ring(), GCTAResponseTable::axis_log10(), GWcs::cel_set(), GRan::chisq2(), GMatrixSymmetric::cholesky_decompose(), GSparseNumeric::cholesky_numeric_analysis(), GCOMDri::compute_geometry(), GCOMDri::compute_overlap(), GCOMDri::compute_surface(), GCOMDri::compute_tof_correction(), GCTAPsfPerfTable::containment_radius(), GCTAPsfVector::containment_radius(), GCTAPsfKing::containment_radius(), GSkyMap::convolution_kernel(), GSparseSymbolic::cs_amd(), GModelSky::eflux_error(), GEbounds::elogmean(), GCTAEventBin::emin(), gammalib::erfinv(), GLATEventBin::error(), GCOMEventBin::error(), GCTAEventBin::error(), GSPIEventBin::error(), GEventBin::error(), GOptimizerLM::errors(), GObservations::errors_hessian(), GCTAEdisp2D::etrue(), GModelSpatialEllipticalDisk::eval(), GModelSpatialEllipticalGauss::eval(), GModelSpatialEllipticalGeneralGauss::eval(), GModelSpatialRadialShell::eval(), GModelSpatialRadialProfileDMBurkert::halo_kernel_los::eval(), GModelSpatialRadialProfileDMEinasto::halo_kernel_los::eval(), cta_psf_radial_kerns_phi::eval(), GModelSpatialRadialProfileDMZhao::halo_kernel_los::eval(), GCOMIaq::response_kernel::eval(), cta_irf_elliptical_kern_rho::eval(), cta_irf_elliptical_kern_omega::eval(), cta_nroi_elliptical_kern_rho::eval(), cta_nroi_elliptical_kern_omega::eval(), cta_psf_elliptical_kern_rho::eval(), cta_psf_elliptical_kern_omega::eval(), GModelSpatialRadialShell::f1(), GFft::factor3(), GFft::factor5(), GFft::factor6(), GModelSky::flux_error(), GCTACubePsf::GCTACubePsf(), GCTAEdisp2D::get_mean_rms(), GHealpix::get_ring_info(), GObservations::likelihood::hessian(), GHealpix::isqrt(), GHealpix::loc2dir(), GSkyRegionRectangle::local_to_dir(), GCOMIaq::location_spread(), GModelSpatialRadialProfileDMBurkert::mass_density(), GModelSpatialRadialProfileDMEinasto::mass_density(), GModelSpatialRadialProfileDMZhao::mass_density(), GCTABackgroundPerfTable::mc(), GCTAModelRadialGauss::mc(), GCTAPsfKing::mc(), GModelSpatialEllipticalGauss::mc(), GModelTemporalLightCurve::mc(), GDerivative::minuit2(), GCOMInstChars::multi_scatter(), norm(), GRan::normal(), GCTAModelRadialGauss::omega(), GCTABackgroundPerfTable::operator()(), GCOMD2Response::operator()(), GCTABackground2D::operator()(), GRan::poisson(), GWcsAIT::prj_s2x(), GWcsAZP::prj_s2x(), GWcsAZP::prj_x2s(), GWcsARC::prj_x2s(), GWcsSTG::prj_x2s(), GWcsSIN::prj_x2s(), GWcsMOL::prj_x2s(), GWcsAIT::prj_x2s(), GWcsTAN::prj_x2s(), GCTAPsfKing::r_max(), GCTABackground2D::rate_ebin(), GCOMOads::read(), GHealpix::ring_above(), GLATPsfBase::scale_factor(), GModelSpectralBins::set_cache(), GModelSpectralFunc::set_cache(), GCTACubePsf::set_delta_axis(), GModelSpectralNodes::set_flux_cache(), GCTABackground3D::set_members(), GCTABackground2D::set_members(), GHealpix::set_z_phi(), GCTAPointing::skydir(), GCTABackground2D::solid_angle(), GCTABackground3D::solid_angle(), GWcs::solidangle(), GCTABackgroundPerfTable::solidangle(), GSkyMap::solidangle(), GWcs::sph_s2x(), GWcs::sph_x2s(), sqrt(), GCTAInstDir::theta(), GModelSpatialEllipticalDisk::update(), GCTACubePsf::update(), GModelSpectralTable::update_flux(), GPha::write(), and GCTAOnOffObservation::wstat_value().
double sum | ( | const GVector & | vector | ) |
Computes vector sum.
[in] | vector | Vector. |
Definition at line 944 of file GVector.cpp.
References GVector::m_data, and GVector::m_num.
Referenced by GCOMIaq::compton_kinematics(), GCTAOnOffObservation::compute_arf_cut(), GCTAPsfTable::containment_radius(), GSkyMap::convolution_kernel(), GSkyMap::counts(), GCTAEdisp2D::get_mean_rms(), GCTAEdisp2D::get_moments(), GResponse::irf_composite(), GCOMIaq::klein_nishina(), GModelSpatialComposite::mc(), GCTAPsf2D::mc(), GModelSpatialDiffuseMap::mc_cone(), GModelTemporalPhaseCurve::normalize_nodes(), GLATPsfV3::normalize_psf(), GCTAEdisp2D::normalize_table(), GCTAResponseIrf::nroi_composite(), GLATLtCubeMap::operator()(), GCTAPsfTable::precompute(), GModelSpatialDiffuseMap::prepare_map(), GCOMIaq::print(), GLATPsfV1::psf(), GCTAOnOffObservation::rmf_stacked(), GCOMIaq::set(), GLATMeanPsf::set_map_corrections(), GCTAEdispRmf::set_matrix(), GSkyMap::stack_maps(), GModelSpatialComposite::sum_of_scales(), GIntegral::trapzd(), and GModelSpectralComposite::update_mc_cache().
Computes tangens of vector elements.
[in] | vector | Vector. |
Definition at line 1379 of file GVector.cpp.
References GVector::m_data, and GVector::m_num.
Referenced by GCOMDri::compute_geometry(), cta_psf_radial_kerns_delta::cta_psf_radial_kerns_delta(), GSkyDir::moon(), GRan::poisson(), GSkyDir::posang(), GCTABackground3D::solid_angle(), GCTABackground2D::solid_angle(), GWcs::solidangle(), GSkyMap::solidangle(), tan(), and gammalib::tand().
Computes tanh of vector elements.
[in] | vector | Vector. |
Definition at line 1400 of file GVector.cpp.
References GVector::m_data, and GVector::m_num.
Referenced by tanh().