Loading [MathJax]/extensions/tex2jax.js
LSST Applications g0fba68d861+05816baf74,g1ec0fe41b4+f536777771,g1fd858c14a+a9301854fb,g35bb328faa+fcb1d3bbc8,g4af146b050+a5c07d5b1d,g4d2262a081+6e5fcc2a4e,g53246c7159+fcb1d3bbc8,g56a49b3a55+9c12191793,g5a012ec0e7+3632fc3ff3,g60b5630c4e+ded28b650d,g67b6fd64d1+ed4b5058f4,g78460c75b0+2f9a1b4bcd,g786e29fd12+cf7ec2a62a,g8352419a5c+fcb1d3bbc8,g87b7deb4dc+7b42cf88bf,g8852436030+e5453db6e6,g89139ef638+ed4b5058f4,g8e3bb8577d+d38d73bdbd,g9125e01d80+fcb1d3bbc8,g94187f82dc+ded28b650d,g989de1cb63+ed4b5058f4,g9d31334357+ded28b650d,g9f33ca652e+50a8019d8c,gabe3b4be73+1e0a283bba,gabf8522325+fa80ff7197,gb1101e3267+d9fb1f8026,gb58c049af0+f03b321e39,gb665e3612d+2a0c9e9e84,gb89ab40317+ed4b5058f4,gcf25f946ba+e5453db6e6,gd6cbbdb0b4+bb83cc51f8,gdd1046aedd+ded28b650d,gde0f65d7ad+941d412827,ge278dab8ac+d65b3c2b70,ge410e46f29+ed4b5058f4,gf23fb2af72+b7cae620c0,gf5e32f922b+fcb1d3bbc8,gf67bdafdda+ed4b5058f4,w.2025.16
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: