nuclear_dist::iterator Class Reference

#include <nuclear_dist.h>


Detailed Description

An iterator for the nuclear distribution.

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 70 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.
nucleusoperator-> () const
 Dereference the iterator.

Protected Attributes

nucleusnp
nuclear_distndp
 A pointer to the distribution.

Friends

int operator== (const nuclear_dist::iterator &i1, const nuclear_dist::iterator &i2)
 Compare two nuclei.
int operator!= (const nuclear_dist::iterator &i1, const nuclear_dist::iterator &i2)
 Compare two nuclei.

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

Documentation generated with Doxygen and provided under the GNU Free Documentation License. See License Information for details.

Project hosting provided by SourceForge.net Logo, O2scl Sourceforge Project Page