30 using namespace pwiz::util;
31 using namespace pwiz::chemistry;
56 for (
int i=1; i<=10; i++)
69 const double p1 = 1 - p0;
93 double abundance = pow(p0, n);
96 for (
int k=0;
k<=n;
k++)
99 abundance *= p1/p0*(n-
k)/(
k+1);
110 for (
int k=0;
k<=n;
k++)
123 for (
unsigned int i=0; i<test.size(); i++)
133 const double p0 = .9;
134 const double p1 = .09;
135 const double p2 = 1 - (p0 + p1);
137 const double m0 = 10;
138 const double m1 = 11;
139 const double m2 = 12.33;
175 const double p0 = .9;
176 const double p1 = .09;
177 const double p2 = .009;
178 const double p3 = 1 - (p0 + p1 + p2);
180 const double m0 = 10;
181 const double m1 = 11;
182 const double m2 = 12.33;
183 const double m3 = 13.13;
191 cout <<
"test4 distribution:\n" << md << endl;
199 cout <<
"2 atoms:\n" << test4_2 << endl;
207 cout << table << endl;
210 cout <<
"distribution: " << dist10 << endl;
214 int main(
int argc,
char* argv[])
220 if (argc>1 && !strcmp(argv[1],
"-v"))
os_ = &cout;
221 if (
os_) *
os_ <<
"IsotopeTableTest\n" << setprecision(12);