The Original CHomP Software
Public Member Functions | Private Member Functions | Private Attributes | List of all members
chomp::multiwork::mwIniProbes< dim, coord > Class Template Reference

This is a helper class for producing an initial set of probes to test the interior of the requested area of parameters. More...

#include <mwsubdiv.h>

Public Member Functions

 mwIniProbes (int level=2)
 The only constructor allowed. More...
 
 ~mwIniProbes ()
 The destructor. More...
 
tCubeFix< dim, coord > get ()
 Returns the next available probe or throws an error message if all the probes have already been taken. More...
 
bool available () const
 Returns true iff there is at least one more probe available. More...
 

Private Member Functions

 mwIniProbes (const mwIniProbes< dim, coord > &)
 The copy constructor is not allowed. More...
 
mwIniProbes< dim, coord > & operator= (const mwIniProbes< dim, coord > &)
 The assignment operator is not allowed. More...
 

Private Attributes

coord left [dim]
 The coordinates of the leftmost corner of the iterated area. More...
 
coord right [dim]
 The coordinates of the rightmost corner of the iterated area. More...
 
tRectangle< coord > rect
 The actual probe iterator. More...
 
const coord * next
 The next coordinates to return or 0 if none. More...
 

Detailed Description

template<int dim, class coord>
class chomp::multiwork::mwIniProbes< dim, coord >

This is a helper class for producing an initial set of probes to test the interior of the requested area of parameters.

Definition at line 235 of file mwsubdiv.h.

Constructor & Destructor Documentation

◆ mwIniProbes() [1/2]

template<int dim, class coord >
chomp::multiwork::mwIniProbes< dim, coord >::mwIniProbes ( int  level = 2)
inline

The only constructor allowed.

Definition at line 275 of file mwsubdiv.h.

276{
277 if (level < 2)
278 throw "Too low initial level. Should be at least 2.";
279 for (int i = 0; i < dim; ++ i)
280 {
281 this -> left [i] = 1;
282 this -> right [i] = 1 << level;
283 }
284 this -> rect = tRectangle<coord> (this -> left, this -> right, dim);
285 this -> next = this -> rect. get ();
286 return;
287} /* mwIniProbes::mwIniProbes */
const coord * next
The next coordinates to return or 0 if none.
Definition: mwsubdiv.h:268
coord right[dim]
The coordinates of the rightmost corner of the iterated area.
Definition: mwsubdiv.h:262
tRectangle< coord > rect
The actual probe iterator.
Definition: mwsubdiv.h:265
tCubeFix< dim, coord > get()
Returns the next available probe or throws an error message if all the probes have already been taken...
Definition: mwsubdiv.h:309
coord left[dim]
The coordinates of the leftmost corner of the iterated area.
Definition: mwsubdiv.h:259

◆ ~mwIniProbes()

template<int dim, class coord >
chomp::multiwork::mwIniProbes< dim, coord >::~mwIniProbes
inline

The destructor.

Definition at line 303 of file mwsubdiv.h.

304{
305 return;
306} /* mwIniProbes::~mwIniProbes */

◆ mwIniProbes() [2/2]

template<int dim, class coord >
chomp::multiwork::mwIniProbes< dim, coord >::mwIniProbes ( const mwIniProbes< dim, coord > &  )
inlineprivate

The copy constructor is not allowed.

Definition at line 290 of file mwsubdiv.h.

291{
292 return;
293} /* mwIniProbes::mwIniProbes */

Member Function Documentation

◆ available()

template<int dim, class coord >
bool chomp::multiwork::mwIniProbes< dim, coord >::available
inline

Returns true iff there is at least one more probe available.

Definition at line 317 of file mwsubdiv.h.

318{
319 return !!(this -> next);
320} /* mwIniProbes::available */

◆ get()

template<int dim, class coord >
tCubeFix< dim, coord > chomp::multiwork::mwIniProbes< dim, coord >::get
inline

Returns the next available probe or throws an error message if all the probes have already been taken.

Definition at line 309 of file mwsubdiv.h.

310{
311 tCubeFix<dim,coord> q (this -> next, dim);
312 this -> next = this -> rect. get ();
313 return q;
314} /* mwIniProbes::get */

◆ operator=()

template<int dim, class coord >
mwIniProbes< dim, coord > & chomp::multiwork::mwIniProbes< dim, coord >::operator= ( const mwIniProbes< dim, coord > &  )
inlineprivate

The assignment operator is not allowed.

Definition at line 296 of file mwsubdiv.h.

298{
299 return *this;
300} /* mwIniProbes::operator = */

Member Data Documentation

◆ left

template<int dim, class coord >
coord chomp::multiwork::mwIniProbes< dim, coord >::left[dim]
private

The coordinates of the leftmost corner of the iterated area.

Definition at line 259 of file mwsubdiv.h.

◆ next

template<int dim, class coord >
const coord* chomp::multiwork::mwIniProbes< dim, coord >::next
private

The next coordinates to return or 0 if none.

Definition at line 268 of file mwsubdiv.h.

◆ rect

template<int dim, class coord >
tRectangle<coord> chomp::multiwork::mwIniProbes< dim, coord >::rect
private

The actual probe iterator.

Definition at line 265 of file mwsubdiv.h.

◆ right

template<int dim, class coord >
coord chomp::multiwork::mwIniProbes< dim, coord >::right[dim]
private

The coordinates of the rightmost corner of the iterated area.

Definition at line 262 of file mwsubdiv.h.


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