LSST Applications g00d0e8bbd7+edbf708997,g03191d30f7+6b31559d11,g118115db7c+ac820e85d2,g199a45376c+5137f08352,g1fd858c14a+90100aa1a7,g262e1987ae+64df5f6984,g29ae962dfc+1eb4aece83,g2cef7863aa+73c82f25e4,g3541666cd7+1e37cdad5c,g35bb328faa+edbf708997,g3fd5ace14f+fb4e2866cc,g47891489e3+19fcc35de2,g53246c7159+edbf708997,g5b326b94bb+d622351b67,g64539dfbff+dfe1dff262,g67b6fd64d1+19fcc35de2,g74acd417e5+cfdc02aca8,g786e29fd12+af89c03590,g7aefaa3e3d+dc1a598170,g87389fa792+a4172ec7da,g88cb488625+60ba2c3075,g89139ef638+19fcc35de2,g8d4809ba88+dfe1dff262,g8d7436a09f+db94b797be,g8ea07a8fe4+79658f16ab,g90f42f885a+6577634e1f,g9722cb1a7f+d8f85438e7,g98df359435+7fdd888faa,ga2180abaac+edbf708997,ga9e74d7ce9+128cc68277,gbf99507273+edbf708997,gca7fc764a6+19fcc35de2,gd7ef33dd92+19fcc35de2,gdab6d2f7ff+cfdc02aca8,gdbb4c4dda9+dfe1dff262,ge410e46f29+19fcc35de2,ge41e95a9f2+dfe1dff262,geaed405ab2+062dfc8cdc,w.2025.46
LSST Data Management Base Package
Loading...
Searching...
No Matches
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: