LSST Applications g0265f82a02+d6b5cd48b5,g02d81e74bb+a41d3748ce,g1470d8bcf6+6be6c9203b,g2079a07aa2+14824f138e,g212a7c68fe+a4f2ea4efa,g2305ad1205+72971fe858,g295015adf3+ab2c85acae,g2bbee38e9b+d6b5cd48b5,g337abbeb29+d6b5cd48b5,g3ddfee87b4+31b3a28dff,g487adcacf7+082e807817,g50ff169b8f+5929b3527e,g52b1c1532d+a6fc98d2e7,g591dd9f2cf+b2918d57ae,g5a732f18d5+66d966b544,g64a986408d+a41d3748ce,g858d7b2824+a41d3748ce,g8a8a8dda67+a6fc98d2e7,g99cad8db69+7fe4acdf18,g9ddcbc5298+d4bad12328,ga1e77700b3+246acaaf9c,ga8c6da7877+84af8b3ff8,gb0e22166c9+3863383f4c,gb6a65358fc+d6b5cd48b5,gba4ed39666+9664299f35,gbb8dafda3b+d8d527deb2,gc07e1c2157+b2dbe6b631,gc120e1dc64+61440b2abb,gc28159a63d+d6b5cd48b5,gcf0d15dbbd+31b3a28dff,gdaeeff99f8+a38ce5ea23,ge6526c86ff+39927bb362,ge79ae78c31+d6b5cd48b5,gee10cc3b42+a6fc98d2e7,gf1cff7945b+a41d3748ce,v24.1.5.rc1
LSST Data Management Base Package
Loading...
Searching...
No Matches
Public Member Functions | List of all members
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) {}
table::Key< int > b

◆ 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 }
table::Key< int > a

◆ 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 endl(T... args)
T push_back(T... args)
T size(T... args)
T sort(T... args)

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