![]() |
Particles and Nuclei Sub-Library: Version 0.910
|
An iterator for the nuclear distribution. More...
#include <nuclear_dist.h>
The standard usage of this iterator is something of the form:
mnmsk_mass mth; simple_dist sd(5,6,10,12,&mth); for(nuclear_dist::iterator ndi=sd.begin();ndi!=sd.end();ndi++) { // do something here for each nucleus }
which would create a list consisting of three isotopes (A=10, 11, and 12) of boron and three isotopes carbon for a total of six nuclei.
Definition at line 69 of file nuclear_dist.h.
Public Member Functions | |
iterator (nuclear_dist *ndpp, nucleus *npp) | |
Create an iterator from the given distribution using the nucleus specified in npp . | |
iterator | operator++ () |
Proceed to the next nucleus. | |
iterator | operator++ (int unused) |
Proceed to the next nucleus. | |
nucleus * | operator-> () const |
Pointing at operator. | |
nucleus & | operator* () const |
Dereference the iterator. | |
Protected Attributes | |
nucleus * | np |
A pointer to the current nucleus. | |
nuclear_dist * | ndp |
A pointer to the distribution. | |
Friends | |
bool | operator== (const nuclear_dist::iterator &i1, const nuclear_dist::iterator &i2) |
Give access to the == operator. | |
bool | operator!= (const nuclear_dist::iterator &i1, const nuclear_dist::iterator &i2) |
Give access to the != operator. |
Documentation generated with Doxygen. Provided under the GNU Free Documentation License (see License Information).