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. | |
| ~mwIniProbes () | |
| The destructor. | |
| tCubeFix< dim, coord > | get () |
| Returns the next available probe or throws an error message if all the probes have already been taken. | |
| bool | available () const |
| Returns true iff there is at least one more probe available. | |
Private Member Functions | |
| mwIniProbes (const mwIniProbes< dim, coord > &) | |
| The copy constructor is not allowed. | |
| mwIniProbes< dim, coord > & | operator= (const mwIniProbes< dim, coord > &) |
| The assignment operator is not allowed. | |
Private Attributes | |
| coord | left [dim] |
| The coordinates of the leftmost corner of the iterated area. | |
| coord | right [dim] |
| The coordinates of the rightmost corner of the iterated area. | |
| tRectangle< coord > | rect |
| The actual probe iterator. | |
| const coord * | next |
| The next coordinates to return or 0 if none. | |
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 236 of file mwsubdiv.h.
| chomp::multiwork::mwIniProbes< dim, coord >::mwIniProbes | ( | int | level = 2 |
) | [inline] |
The only constructor allowed.
Definition at line 276 of file mwsubdiv.h.
References chomp::multiwork::mwIniProbes< dim, coord >::left, chomp::multiwork::mwIniProbes< dim, coord >::next, chomp::multiwork::mwIniProbes< dim, coord >::rect, and chomp::multiwork::mwIniProbes< dim, coord >::right.
{
if (level < 2)
throw "Too low initial level. Should be at least 2.";
for (int i = 0; i < dim; ++ i)
{
this -> left [i] = 1;
this -> right [i] = 1 << level;
}
this -> rect = tRectangle<coord> (this -> left, this -> right, dim);
this -> next = this -> rect. get ();
return;
} /* mwIniProbes::mwIniProbes */
| chomp::multiwork::mwIniProbes< dim, coord >::~mwIniProbes | ( | ) | [inline] |
The destructor.
Definition at line 304 of file mwsubdiv.h.
{
return;
} /* mwIniProbes::~mwIniProbes */
| chomp::multiwork::mwIniProbes< dim, coord >::mwIniProbes | ( | const mwIniProbes< dim, coord > & | ) | [inline, private] |
The copy constructor is not allowed.
Definition at line 291 of file mwsubdiv.h.
{
return;
} /* mwIniProbes::mwIniProbes */
| bool chomp::multiwork::mwIniProbes< dim, coord >::available | ( | ) | const [inline] |
Returns true iff there is at least one more probe available.
Definition at line 318 of file mwsubdiv.h.
References chomp::multiwork::mwIniProbes< dim, coord >::next.
{
return !!(this -> next);
} /* mwIniProbes::available */
| 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 310 of file mwsubdiv.h.
References chomp::multiwork::mwIniProbes< dim, coord >::next, and chomp::multiwork::mwIniProbes< dim, coord >::rect.
| mwIniProbes< dim, coord > & chomp::multiwork::mwIniProbes< dim, coord >::operator= | ( | const mwIniProbes< dim, coord > & | ) | [inline, private] |
The assignment operator is not allowed.
Definition at line 298 of file mwsubdiv.h.
{
return *this;
} /* mwIniProbes::operator = */
coord chomp::multiwork::mwIniProbes< dim, coord >::left[dim] [private] |
The coordinates of the leftmost corner of the iterated area.
Definition at line 260 of file mwsubdiv.h.
Referenced by chomp::multiwork::mwIniProbes< dim, coord >::mwIniProbes().
const coord* chomp::multiwork::mwIniProbes< dim, coord >::next [private] |
The next coordinates to return or 0 if none.
Definition at line 269 of file mwsubdiv.h.
Referenced by chomp::multiwork::mwIniProbes< dim, coord >::available(), chomp::multiwork::mwIniProbes< dim, coord >::get(), and chomp::multiwork::mwIniProbes< dim, coord >::mwIniProbes().
tRectangle<coord> chomp::multiwork::mwIniProbes< dim, coord >::rect [private] |
The actual probe iterator.
Definition at line 266 of file mwsubdiv.h.
Referenced by chomp::multiwork::mwIniProbes< dim, coord >::get(), and chomp::multiwork::mwIniProbes< dim, coord >::mwIniProbes().
coord chomp::multiwork::mwIniProbes< dim, coord >::right[dim] [private] |
The coordinates of the rightmost corner of the iterated area.
Definition at line 263 of file mwsubdiv.h.
Referenced by chomp::multiwork::mwIniProbes< dim, coord >::mwIniProbes().
1.7.1