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::afw::math::IntRegion< T > Struct Template Referencefinal

#include <Integrate.h>

Public Member Functions

 IntRegion (T const a, T const b, std::ostream *dbgout=nullptr)
 
 IntRegion (IntRegion const &)=default
 
 IntRegion (IntRegion &&)=default
 
IntRegionoperator= (IntRegion const &)=default
 
IntRegionoperator= (IntRegion &&)=default
 
 ~IntRegion ()=default
 
bool operator< (IntRegion< T > const &r2) const
 
bool operator> (IntRegion< T > const &r2) const
 
void SubDivide (std::vector< IntRegion< T > > *children)
 
void Bisect ()
 
void AddSplit (const T x)
 
size_t NSplit () const
 
T const & Left () const
 
T const & Right () const
 
T const & Err () const
 
T const & Area () const
 
void SetArea (const T &a, const T &e)
 
std::ostreamgetDbgout ()
 

Detailed Description

template<class T>
struct lsst::afw::math::IntRegion< T >

Definition at line 175 of file Integrate.h.

Constructor & Destructor Documentation

◆ IntRegion() [1/3]

template<class T>
lsst::afw::math::IntRegion< T >::IntRegion ( T const a,
T const b,
std::ostream * dbgout = nullptr )
inline

Definition at line 177 of file Integrate.h.

178 : _a(a), _b(b), _error(0.0), _area(0), _dbgout(dbgout) {}

◆ IntRegion() [2/3]

template<class T>
lsst::afw::math::IntRegion< T >::IntRegion ( IntRegion< T > const & )
default

◆ IntRegion() [3/3]

template<class T>
lsst::afw::math::IntRegion< T >::IntRegion ( IntRegion< T > && )
default

◆ ~IntRegion()

template<class T>
lsst::afw::math::IntRegion< T >::~IntRegion ( )
default

Member Function Documentation

◆ AddSplit()

template<class T>
void lsst::afw::math::IntRegion< T >::AddSplit ( const T x)
inline

Definition at line 218 of file Integrate.h.

218{ _splitpoints.push_back(x); }

◆ Area()

template<class T>
T const & lsst::afw::math::IntRegion< T >::Area ( ) const
inline

Definition at line 224 of file Integrate.h.

224{ return _area; }

◆ Bisect()

template<class T>
void lsst::afw::math::IntRegion< T >::Bisect ( )
inline

Definition at line 217 of file Integrate.h.

217{ _splitpoints.push_back((_a + _b) / 2.0); }

◆ Err()

template<class T>
T const & lsst::afw::math::IntRegion< T >::Err ( ) const
inline

Definition at line 223 of file Integrate.h.

223{ return _error; }

◆ getDbgout()

template<class T>
std::ostream * lsst::afw::math::IntRegion< T >::getDbgout ( )
inline

Definition at line 230 of file Integrate.h.

230{ return _dbgout; }

◆ Left()

template<class T>
T const & lsst::afw::math::IntRegion< T >::Left ( ) const
inline

Definition at line 221 of file Integrate.h.

221{ return _a; }

◆ NSplit()

template<class T>
size_t lsst::afw::math::IntRegion< T >::NSplit ( ) const
inline

Definition at line 219 of file Integrate.h.

219{ return _splitpoints.size(); }

◆ operator<()

template<class T>
bool lsst::afw::math::IntRegion< T >::operator< ( IntRegion< T > const & r2) const
inline

Definition at line 186 of file Integrate.h.

186{ return _error < r2._error; }

◆ operator=() [1/2]

template<class T>
IntRegion & lsst::afw::math::IntRegion< T >::operator= ( IntRegion< T > && )
default

◆ operator=() [2/2]

template<class T>
IntRegion & lsst::afw::math::IntRegion< T >::operator= ( IntRegion< T > const & )
default

◆ operator>()

template<class T>
bool lsst::afw::math::IntRegion< T >::operator> ( IntRegion< T > const & r2) const
inline

Definition at line 187 of file Integrate.h.

187{ return _error > r2._error; }

◆ Right()

template<class T>
T const & lsst::afw::math::IntRegion< T >::Right ( ) const
inline

Definition at line 222 of file Integrate.h.

222{ return _b; }

◆ SetArea()

template<class T>
void lsst::afw::math::IntRegion< T >::SetArea ( const T & a,
const T & e )
inline

Definition at line 225 of file Integrate.h.

225 {
226 _area = a;
227 _error = e;
228 }

◆ SubDivide()

template<class T>
void lsst::afw::math::IntRegion< T >::SubDivide ( std::vector< IntRegion< T > > * children)
inline

Definition at line 189 of file Integrate.h.

189 {
190 assert(children->size() == 0);
191 if (_splitpoints.size() == 0) {
192 Bisect();
193 }
194 if (_splitpoints.size() > 1) {
195 std::sort(_splitpoints.begin(), _splitpoints.end());
196 }
197
198#if 0
199 if (_a > _splitpoints[0] || _b < _splitpoints.back()) {
200 std::cerr << "a, b = " << _a << ', ' << _b << std::endl;
201 std::cerr << "_splitpoints = ";
202 for (size_t i = 0; i<_splitpoints.size(); i++) {
203 std::cerr << _splitpoints[i] << " ";
204 }
206 }
207#endif
208 assert(_splitpoints[0] >= _a);
209 assert(_splitpoints.back() <= _b);
210 children->push_back(IntRegion<T>(_a, _splitpoints[0], _dbgout));
211 for (size_t i = 1; i < _splitpoints.size(); i++) {
212 children->push_back(IntRegion<T>(_splitpoints[i - 1], _splitpoints[i], _dbgout));
213 }
214 children->push_back(IntRegion<T>(_splitpoints.back(), _b, _dbgout));
215 }
T sort(T... args)
IntRegion(T const a, T const b, std::ostream *dbgout=nullptr)
Definition Integrate.h:177

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