simple_dist Class Reference

A simple nuclear distribution given a range in A and Z. More...

#include <nuclear_dist.h>

Inheritance diagram for simple_dist:

nuclear_dist

Detailed Description

A simple nuclear distribution given a range in A and Z.

The iterator for this distribution begins with the nucleus with the lowest Z and A, and increases A before incrementing Z and beginning again with the lowest A for that value of Z. In other words, it proceeds through all the isotopes of an element first, and then proceeds to the next element.

For example, to create a collection of isotopes of Carbon, Nitrogen and Oxygen using the most recent (2003) Atomic Mass Evaluation, and then output the nuclei in the collection

      ame_mass ame;
      simple_dist fd(6,8,2,30,&ame);
      for(nuclear_dist::iterator ndi=fd.begin();ndi!=fd.end();ndi++) {
        cout << ndi->Z << " " << ndi->A << " " << ndi->m << endl;
      }

Idea for future:
Make the vector constructor into a template so it accepts any type. Do the same for set_dist().

Definition at line 164 of file nuclear_dist.h.


Public Member Functions

 simple_dist ()
 Create an empty distribution.
 simple_dist (int minZ, int maxZ, int minA[], int maxA[], nuclear_mass &nm)
 Create a distribution from ranges in A specified for each Z.
 simple_dist (int minZ, int maxZ, int minA, int maxA, nuclear_mass &nm)
 Create a square distribution in A and Z.
virtual iterator begin ()
 The beginning of the distribution.
virtual iterator end ()
 The end of the distribution.
virtual size_t size ()
 The number of nuclei in the distribution.
int set_dist (int minZ, int maxZ, int minA[], int maxA[], nuclear_mass &nm)
 Set the distribution from ranges in A specified for each Z.
int set_dist (int minZ, int maxZ, int minA, int maxA, nuclear_mass &nm)
 Set a square distribution in A and Z.

Constructor & Destructor Documentation

simple_dist ( int  minZ,
int  maxZ,
int  minA[],
int  maxA[],
nuclear_mass nm 
)

Create a distribution from ranges in A specified for each Z.

The length of the arrays minA and maxA should be exactly $\mathrm{maxZ}-\mathrm{minZ}+1$.


Member Function Documentation

int set_dist ( int  minZ,
int  maxZ,
int  minA[],
int  maxA[],
nuclear_mass nm 
)

Set the distribution from ranges in A specified for each Z.

The length of the arrays minA and maxA should be exactly $\mathrm{maxZ}-\mathrm{minZ}+1$.


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