]> git.donarmstrong.com Git - mothur.git/blob - validcalculator.cpp
added odum, canberra, structchi2, structchord, structeuclidean, gower, hellinger...
[mothur.git] / validcalculator.cpp
1 /*
2  *  validcalculator.cpp
3  *  Dotur
4  *
5  *  Created by Sarah Westcott on 1/5/09.
6  *  Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved.
7  *
8  */
9
10 #include "validcalculator.h"
11
12 /********************************************************************/
13 ValidCalculators::ValidCalculators() {
14         try {
15                  m = MothurOut::getInstance();
16                 
17                  initialSingle();
18                  initialShared();
19                  initialRarefaction();
20                  initialSharedRarefact();
21                  initialSummary();
22                  initialSharedSummary();
23                  initialVennSingle();
24                  initialVennShared();
25                  initialTreeGroups();
26                  initialBoot();
27                  initialDistance();
28                  initialMatrix();
29                  initialHeat();
30         }
31         catch(exception& e) {
32                 m->errorOut(e, "ValidCalculator", "ValidCalculator");
33                 exit(1);
34         }
35 }
36
37 /********************************************************************/
38
39 ValidCalculators::~ValidCalculators() {}
40
41 /********************************************************************/
42
43 bool ValidCalculators::isValidCalculator(string parameter, string calculator) {
44         try {   
45                 //are you looking for a calculator for a single parameter
46                 if (parameter == "single") {
47                         //is it valid
48                         if ((single.find(calculator)) != (single.end())) {
49                                 return true;
50                         }else { 
51                                 m->mothurOut(calculator + " is not a valid estimator for the collect.single command and will be disregarded. Valid estimators are ");
52                                 for (it = single.begin(); it != single.end(); it++) {
53                                         m->mothurOut(it->first + ", ");
54                                 }
55                                 m->mothurOutEndLine();
56                                 return false; }
57                 //are you looking for a calculator for a shared parameter
58                 }else if (parameter == "shared") {
59                         //is it valid
60                         if ((shared.find(calculator)) != (shared.end())) {
61                                 return true;
62                         }else { 
63                                 m->mothurOut(calculator +  " is not a valid estimator for the collect.shared command and will be disregarded.  Valid estimators are ");
64                                 for (it = shared.begin(); it != shared.end(); it++) {
65                                         m->mothurOut(it->first + ", ");
66                                 }
67                                 m->mothurOutEndLine();
68                                 return false; }
69                 //are you looking for a calculator for a rarefaction parameter
70                 }else if (parameter == "rarefaction") {
71                         //is it valid
72                         if ((rarefaction.find(calculator)) != (rarefaction.end())) {
73                                 return true;
74                         }else { 
75                                 m->mothurOut(calculator + " is not a valid estimator for the rarefaction.single command and will be disregarded. Valid estimators are ");
76                                 for (it = rarefaction.begin(); it != rarefaction.end(); it++) {
77                                         m->mothurOut(it->first + ", ");
78                                 }
79                                 m->mothurOutEndLine();
80                                 return false; }
81                 //are you looking for a calculator for a summary parameter
82                 }else if (parameter == "summary") {
83                         //is it valid
84                         if ((summary.find(calculator)) != (summary.end())) {
85                                 return true;
86                         }else { 
87                                 m->mothurOut(calculator + " is not a valid estimator for the summary.shared command and will be disregarded. Valid estimators are ");
88                                 for (it = summary.begin(); it != summary.end(); it++) {
89                                         m->mothurOut(it->first + ", ");
90                                 }
91                                 m->mothurOutEndLine();
92                                 return false; }
93                 //are you looking for a calculator for a sharedsummary parameter
94                 }else if (parameter == "sharedsummary") {
95                         //is it valid
96                         if ((sharedsummary.find(calculator)) != (sharedsummary.end())) {
97                                 return true;
98                         }else { 
99                                 m->mothurOut(calculator +  " is not a valid estimator for the summary.shared command and will be disregarded. Valid estimators are ");
100                                 for (it = sharedsummary.begin(); it != sharedsummary.end(); it++) {
101                                         m->mothurOut(it->first + ", ");
102                                 }
103                                 m->mothurOutEndLine();
104                                 return false; }
105                 }else if (parameter == "sharedrarefaction") {
106                         //is it valid
107                         if ((sharedrarefaction.find(calculator)) != (sharedrarefaction.end())) {
108                                 return true;
109                         }else { 
110                                 m->mothurOut(calculator + " is not a valid estimator for the rarefaction.shared command and will be disregarded. Valid estimator is ");
111                                 for (it = sharedrarefaction.begin(); it != sharedrarefaction.end(); it++) {
112                                         m->mothurOut(it->first + ", ");
113                                 }
114                                 m->mothurOutEndLine();
115                                 return false; }
116                 }else if (parameter == "vennsingle") {
117                         //is it valid
118                         if ((vennsingle.find(calculator)) != (vennsingle.end())) {
119                                 return true;
120                         }else { 
121                                 m->mothurOut(calculator + " is not a valid estimator for the venn command in single mode and will be disregarded. Valid estimators are ");
122                                 for (it = vennsingle.begin(); it != vennsingle.end(); it++) {
123                                         m->mothurOut(it->first + ", ");
124                                 }
125                                 m->mothurOutEndLine();
126                                 return false; }
127                 }else if (parameter == "vennshared") {
128                         //is it valid
129                         if ((vennshared.find(calculator)) != (vennshared.end())) {
130                                 return true;
131                         }else { 
132                                 m->mothurOut(calculator + " is not a valid estimator for the venn command in shared mode and will be disregarded. Valid estimators are ");
133                                 for (it = vennshared.begin(); it != vennshared.end(); it++) {
134                                         m->mothurOut(it->first + ", ");
135                                 }
136                                 m->mothurOutEndLine();
137                                 return false; }
138                 }else if (parameter == "treegroup") {
139                         //is it valid
140                         if ((treegroup.find(calculator)) != (treegroup.end())) {
141                                 return true;
142                         }else { 
143                                 m->mothurOut(calculator + " is not a valid estimator for the tree.shared command and will be disregarded. Valid estimators are ");
144                                 for (it = treegroup.begin(); it != treegroup.end(); it++) {
145                                         m->mothurOut(it->first + ", ");
146                                 }
147                                 m->mothurOutEndLine();
148                                 return false; }
149                 }else if (parameter == "matrix") {
150                         //is it valid
151                         if ((matrix.find(calculator)) != (matrix.end())) {
152                                 return true;
153                         }else { 
154                                 m->mothurOut(calculator +  " is not a valid estimator for the matrix.output command and will be disregarded. Valid estimators are ");
155                                 for (it = matrix.begin(); it != matrix.end(); it++) {
156                                         m->mothurOut(it->first + ", ");
157                                 }
158                                 m->mothurOutEndLine();
159                                 return false; }
160                 }else if (parameter == "heat") {
161                         //is it valid
162                         if ((heat.find(calculator)) != (heat.end())) {
163                                 return true;
164                         }else { 
165                                 m->mothurOut(calculator + " is not a valid estimator for the heatmap.sim command and will be disregarded. Valid estimators are ");
166                                 for (it = heat.begin(); it != heat.end(); it++) {
167                                         m->mothurOut(it->first + ", ");
168                                 }
169                                 m->mothurOutEndLine();
170                                 return false; }
171                 }else if (parameter == "boot") {
172                         //is it valid
173                         if ((boot.find(calculator)) != (boot.end())) {
174                                 return true;
175                         }else { 
176                                 m->mothurOut(calculator + " is not a valid estimator for the bootstrap.shared command and will be disregarded. Valid estimators are ");
177                                 for (it = boot.begin(); it != boot.end(); it++) {
178                                         m->mothurOut(it->first + ", ");
179                                 }
180                                 m->mothurOutEndLine();
181                                 return false; }
182                 }else if (parameter == "distance") {
183                         //is it valid
184                         if ((distance.find(calculator)) != (distance.end())) {
185                                 return true;
186                         }else { 
187                                 m->mothurOut(calculator +  " is not a valid estimator for the distance command and will be disregarded. Valid calculators are ");
188                                 for (it = distance.begin(); it != distance.end(); it++) {
189                                         m->mothurOut(it->first + ", ");
190                                 }
191                                 m->mothurOutEndLine();
192                                 return false; }
193                 //not a valid parameter
194                 }else { return false; }
195                 
196         }
197         catch(exception& e) {
198                 m->errorOut(e, "ValidCalculator", "isValidCalculator");
199                 exit(1);
200         }
201 }
202
203 /********************************************************************/
204 void ValidCalculators::initialSingle() {
205         try {   
206                 single["sobs"]          = "sobs";
207                 single["chao"]              = "chao";
208                 single["ace"]               = "ace";
209                 single["jack"]              = "jack";
210                 single["shannon"]           = "shannon";
211                 single["npshannon"]     = "npshannon";
212                 single["shannoneven"]   = "shannoneven";
213                 single["smithwilson"]   = "smithwilson";
214                 single["heip"]                  = "heip";
215                 single["simpson"]           = "simpson";
216                 single["simpsoneven"]   = "simpsoneven";
217                 single["invsimpson"]    = "invsimpson";
218                 single["bergerparker"]  = "bergerparker";
219                 single["bootstrap"]     = "bootstrap";
220                 single["geometric"]     = "geometric";
221                 single["logseries"]             = "logseries";
222                 single["qstat"]         = "qstat";
223                 single["bstick"]        = "bstick";
224                 single["goodscoverage"] = "goodscoverage";
225                 single["nseqs"]                 = "nseqs";
226                 single["coverage"]              = "coverage";
227                 single["efron"]         = "efron";
228                 single["boneh"]         = "boneh";
229                 single["solow"]         = "solow";
230                 single["shen"]          = "shen";
231                 single["default"]           = "default";
232         }
233         catch(exception& e) {
234                 m->errorOut(e, "ValidCalculator", "initialSingle");
235                 exit(1);
236         }
237 }
238
239 /********************************************************************/
240 void ValidCalculators::initialShared() {
241         try {   
242                 shared["sharedsobs"]                    = "sharedsobs";
243                 shared["sharedchao"]                    = "sharedchao";
244                 shared["sharedace"]                             = "sharedace";
245                 shared["jabund"]                                = "jabund";
246                 shared["sorabund"]                              = "sorabund";
247                 shared["jclass"]                                = "jclass";
248                 shared["sorclass"]                              = "sorclass";
249                 shared["jest"]                                  = "jest";
250                 shared["sorest"]                                = "sorest";
251                 shared["thetayc"]                               = "thetayc";
252                 shared["thetan"]                                = "thetan";
253                 shared["kstest"]                                = "kstest";
254                 shared["whittaker"]                         = "whittaker";
255                 shared["sharednseqs"]                   = "sharednseqs";
256                 shared["ochiai"]                                = "ochiai";
257                 shared["anderberg"]                             = "anderberg";
258                 shared["kulczynski"]                    = "kulczynski";
259                 shared["kulczynskicody"]                = "kulczynskicody";
260                 shared["lennon"]                                = "lennon";
261                 shared["morisitahorn"]                  = "morisitahorn";
262                 shared["braycurtis"]                    = "braycurtis";
263                 shared["odum"]                                  = "odum";
264                 shared["canberra"]                              = "canberra";
265                 shared["structeuclidean"]               = "structeuclidean";
266                 shared["structchord"]                   = "structchord";
267                 shared["hellinger"]                             = "hellinger";
268                 shared["manhattan"]                             = "manhattan";
269                 shared["structpearson"]                 = "structpearson";
270                 shared["soergel"]                               = "soergel";
271                 shared["spearman"]                              = "spearman";
272                 shared["structkulczynski"]              = "structkulczynski";
273                 shared["structchi2"]                    = "structchi2";
274                 shared["speciesprofile"]                = "speciesprofile";
275                 shared["hamming"]                               = "hamming";
276                 shared["gower"]                                 = "gower";
277                 shared["memchi2"]                               = "memchi2";
278                 shared["memchord"]                              = "memchord";
279                 shared["memeuclidean"]                  = "memeuclidean";
280                 shared["mempearson"]                    = "mempearson";
281                 shared["default"]                   = "default";
282         }
283         catch(exception& e) {
284                 m->errorOut(e, "ValidCalculator", "initialShared");
285                 exit(1);
286         }
287 }
288
289 /********************************************************************/
290 void ValidCalculators::initialRarefaction() {
291         try {   
292                 rarefaction["sobs"]                     = "sobs";
293                 rarefaction["chao"]                     = "chao";
294                 rarefaction["ace"]                      = "ace";
295                 rarefaction["jack"]                     = "jack";
296                 rarefaction["shannon"]          = "shannon";
297                 rarefaction["smithwilson"]      = "smithwilson";
298                 rarefaction["heip"]                     = "heip";
299                 rarefaction["npshannon"]        = "npshannon";
300                 rarefaction["shannoneven"]      = "shannoneven";
301                 rarefaction["simpson"]          = "simpson";
302                 rarefaction["invsimpson"]       = "invsimpson";
303                 rarefaction["simpsoneven"]      = "simpsoneven";
304                 rarefaction["bootstrap"]        = "bootstrap";
305                 rarefaction["nseqs"]            = "nseqs";
306                 rarefaction["coverage"]         = "coverage";
307                 rarefaction["default"]      = "default";
308         }
309         catch(exception& e) {
310                 m->errorOut(e, "ValidCalculator", "initialRarefaction");
311                 exit(1);
312         }
313 }
314
315 /********************************************************************/
316
317 void ValidCalculators::initialSummary() {
318         try {   
319                 summary["sobs"]                 = "sobs";
320                 summary["chao"]                 = "chao";
321                 summary["ace"]                  = "ace";
322                 summary["jack"]                 = "jack";
323                 summary["shannon"]              = "shannon";
324                 summary["heip"]                 = "heip";
325                 summary["shannoneven"]  = "shannoneven";
326                 summary["smithwilson"]  = "smithwilson";
327                 summary["invsimpson"]   = "invsimpson";
328                 summary["npshannon"]    = "npshannon";
329                 summary["simpson"]              = "simpson";
330                 summary["simpsoneven"]  = "simpsoneven";
331                 summary["bergerparker"] = "bergerparker";
332                 summary["geometric"]    = "geometric";
333                 summary["bootstrap"]    = "bootstrap";
334                 summary["logseries"]    = "logseries";
335                 summary["qstat"]        = "qstat";
336                 summary["bstick"]       = "bstick";
337                 summary["nseqs"]                = "nseqs";
338                 summary["goodscoverage"]= "goodscoverage";
339                 summary["coverage"]             = "coverage";
340                 summary["efron"]        = "efron";
341                 summary["boneh"]        = "boneh";
342                 summary["solow"]        = "solow";
343                 summary["shen"]         = "shen";
344                 summary["default"]          = "default";
345         }
346         catch(exception& e) {
347                 m->errorOut(e, "ValidCalculator", "initialSummary");
348                 exit(1);
349         }
350 }
351
352 /********************************************************************/
353 void ValidCalculators::initialSharedSummary() {
354         try {   
355                 sharedsummary["sharedsobs"]                             = "sharedsobs";
356                 sharedsummary["sharedchao"]                             = "sharedchao";
357                 sharedsummary["sharedace"]                              = "sharedace";
358                 sharedsummary["jabund"]                                 = "jabund";
359                 sharedsummary["sorabund"]                               = "sorabund";
360                 sharedsummary["jclass"]                                 = "jclass";
361                 sharedsummary["sorclass"]                               = "sorclass";
362                 sharedsummary["jest"]                                   = "jest";
363                 sharedsummary["sorest"]                                 = "sorest";
364                 sharedsummary["thetayc"]                                = "thetayc";
365                 sharedsummary["thetan"]                                 = "thetan";
366                 sharedsummary["kstest"]                                 = "kstest";
367                 sharedsummary["whittaker"]                              = "whittaker";
368                 sharedsummary["sharednseqs"]                    = "sharednseqs";
369                 sharedsummary["ochiai"]                                 = "ochiai";
370                 sharedsummary["anderberg"]                              = "anderberg";
371                 sharedsummary["kulczynski"]                             = "kulczynski";
372                 sharedsummary["kulczynskicody"]                 = "kulczynskicody";
373                 sharedsummary["lennon"]                                 = "lennon";
374                 sharedsummary["morisitahorn"]                   = "morisitahorn";
375                 sharedsummary["braycurtis"]                             = "braycurtis";
376                 sharedsummary["odum"]                                   = "odum";
377                 sharedsummary["canberra"]                               = "canberra";
378                 sharedsummary["structeuclidean"]                = "structeuclidean";
379                 sharedsummary["structchord"]                    = "structchord";
380                 sharedsummary["hellinger"]                              = "hellinger";
381                 sharedsummary["manhattan"]                              = "manhattan";
382                 sharedsummary["structpearson"]                  = "structpearson";
383                 sharedsummary["structkulczynski"]               = "structkulczynski";
384                 sharedsummary["structchi2"]                             = "structchi2";
385                 sharedsummary["soergel"]                                = "soergel";
386                 sharedsummary["spearman"]                               = "spearman";
387                 sharedsummary["speciesprofile"]                 = "speciesprofile";
388                 sharedsummary["hamming"]                                = "hamming";
389                 sharedsummary["gower"]                                  = "gower";
390                 sharedsummary["memchi2"]                                = "memchi2";
391                 sharedsummary["memchord"]                               = "memchord";
392                 sharedsummary["memeuclidean"]                   = "memeuclidean";
393                 sharedsummary["mempearson"]                             = "mempearson";
394                 sharedsummary["default"]                                = "default";
395         }
396         catch(exception& e) {
397                 m->errorOut(e, "ValidCalculator", "initialSharedSummary");
398                 exit(1);
399         }
400 }
401
402
403 /********************************************************************/
404
405 void ValidCalculators::initialSharedRarefact() {
406         try {   
407                 sharedrarefaction["sharedobserved"]     = "sharedobserved";
408                 sharedrarefaction["sharednseqs"]        = "sharednseqs";
409                 sharedrarefaction["default"]        = "default";
410         }
411         catch(exception& e) {
412                 m->errorOut(e, "ValidCalculator", "initialSharedRarefact");
413                 exit(1);
414         }
415 }
416
417
418 /********************************************************************/
419 void ValidCalculators::initialVennSingle() {
420         try {
421                 vennsingle["sobs"]              = "sobs";
422                 vennsingle["chao"]                  = "chao";
423                 vennsingle["ace"]                       = "ace";
424                 vennsingle["jack"]                  = "jack";
425                 vennsingle["default"]           = "default";
426         }
427         catch(exception& e) {
428                 m->errorOut(e, "ValidCalculator", "initialVennSingle");
429                 exit(1);
430         }
431 }
432
433 /********************************************************************/
434 void ValidCalculators::initialVennShared() {
435         try {
436                 vennshared["sharedsobs"]        = "sharedsobs";
437                 vennshared["sharedchao"]        = "sharedchao";
438                 vennshared["sharedace"]         = "sharedace";
439                 vennshared["default"]           = "default";
440         }
441         catch(exception& e) {
442                 m->errorOut(e, "ValidCalculator", "initialVennShared");
443                 exit(1);
444         }
445 }
446
447 /********************************************************************/
448 void ValidCalculators::initialTreeGroups() {
449         try {   
450                 treegroup["jabund"]                                     = "jabund";
451                 treegroup["sorabund"]                           = "sorabund";
452                 treegroup["jclass"]                                     = "jclass";
453                 treegroup["sorclass"]                           = "sorclass";
454                 treegroup["jest"]                                       = "jest";
455                 treegroup["sorest"]                                     = "sorest";
456                 treegroup["thetayc"]                            = "thetayc";
457                 treegroup["thetan"]                                     = "thetan";
458                 treegroup["morisitahorn"]                       = "morisitahorn";
459                 treegroup["braycurtis"]                         = "braycurtis";
460         }
461         catch(exception& e) {
462                 m->errorOut(e, "ValidCalculator", "initialTreeGroups");
463                 exit(1);
464         }
465 }
466 /********************************************************************/
467 void ValidCalculators::initialHeat() {
468         try {   
469                 heat["jabund"]                          = "jabund";
470                 heat["sorabund"]                        = "sorabund";
471                 heat["jclass"]                          = "jclass";
472                 heat["sorclass"]                        = "sorclass";
473                 heat["jest"]                            = "jest";
474                 heat["sorest"]                          = "sorest";
475                 heat["thetayc"]                         = "thetayc";
476                 heat["thetan"]                          = "thetan";
477                 heat["morisitahorn"]            = "morisitahorn";
478                 heat["braycurtis"]                      = "braycurtis";
479         }
480         catch(exception& e) {
481                 m->errorOut(e, "ValidCalculator", "initialHeat");
482                 exit(1);
483         }
484 }
485
486 /********************************************************************/
487 void ValidCalculators::initialMatrix() {
488         try {   
489                 matrix["jabund"]                                = "jabund";
490                 matrix["sorabund"]                              = "sorabund";
491                 matrix["jclass"]                                = "jclass";
492                 matrix["sorclass"]                              = "sorclass";
493                 matrix["jest"]                                  = "jest";
494                 matrix["sorest"]                                = "sorest";
495                 matrix["thetayc"]                               = "thetayc";
496                 matrix["thetan"]                                = "thetan";
497                 matrix["morisitahorn"]                  = "morisitahorn";
498                 matrix["braycurtis"]                    = "braycurtis";
499         }
500         catch(exception& e) {
501                 m->errorOut(e, "ValidCalculator", "initialMatrix");
502                 exit(1);
503         }
504 }
505
506 /********************************************************************/
507 void ValidCalculators::initialBoot() {
508         try {   
509                 boot["jabund"]                          = "jabund";
510                 boot["sorabund"]                        = "sorabund";
511                 boot["jclass"]                          = "jclass";
512                 boot["sorclass"]                        = "orclass";
513                 boot["jest"]                            = "jest";
514                 boot["sorest"]                          = "sorest";
515                 boot["thetayc"]                         = "thetayc";
516                 boot["thetan"]                          = "thetan";
517                 boot["morisitahorn"]            = "morisitahorn";
518                 boot["braycurtis"]                      = "braycurtis";
519         }
520         catch(exception& e) {
521                 m->errorOut(e, "ValidCalculator", "initialBoot");
522                 exit(1);
523         }
524 }
525 /********************************************************************/
526 void ValidCalculators::initialDistance() {
527         try {   
528                 distance["nogaps"]              = "nogaps";
529                 distance["eachgap"]             = "eachgap";
530                 distance["onegap"]              = "onegap";
531         }
532         catch(exception& e) {
533                 m->errorOut(e, "ValidCalculator", "initialDistance");
534                 exit(1);
535         }
536 }
537
538 /********************************************************************/
539 void ValidCalculators::printCalc(string parameter, ostream& out) {
540         try{
541                 out << "The available estimators for calc are ";
542                 //are you looking for a calculator for a single parameter
543                 if (parameter == "single") {
544                         for (it = single.begin(); it != single.end(); it++) {
545                                 out << it->first << ", ";
546                         }
547                 //are you looking for a calculator for a shared parameter
548                 }else if (parameter == "shared") {
549                         for (it = shared.begin(); it != shared.end(); it++) {
550                                 out << it->first << ", ";
551                         }
552                 //are you looking for a calculator for a rarefaction parameter
553                 }else if (parameter == "rarefaction") {
554                         for (it = rarefaction.begin(); it != rarefaction.end(); it++) {
555                                 out << it->first << ", ";
556                         }
557                 //are you looking for a calculator for a summary parameter
558                 }else if (parameter == "summary") {
559                         for (it = summary.begin(); it != summary.end(); it++) {
560                                 out << it->first << ", ";
561                         }
562                 //are you looking for a calculator for a sharedsummary parameter
563                 }else if (parameter == "sharedsummary") {
564                         for (it = sharedsummary.begin(); it != sharedsummary.end(); it++) {
565                                 out << it->first << ", ";
566                         }
567                 }else if (parameter == "sharedrarefaction") {
568                         for (it = sharedrarefaction.begin(); it != sharedrarefaction.end(); it++) {
569                                 out << it->first << ", ";
570                         }
571                 }else if (parameter == "vennsingle") {
572                         for (it = vennsingle.begin(); it != vennsingle.end(); it++) {
573                                 out << it->first << ", ";
574                         }
575                 }else if (parameter == "vennshared") {
576                         for (it = vennshared.begin(); it != vennshared.end(); it++) {
577                                 out << it->first << ", ";
578                         }
579                 }else if (parameter == "treegroup") {
580                         for (it = treegroup.begin(); it != treegroup.end(); it++) {
581                                 out << it->first << ", ";
582                         }
583                 }else if (parameter == "matrix") {
584                         for (it = matrix.begin(); it != matrix.end(); it++) {
585                                 out << it->first << ", ";
586                         }
587                 }else if (parameter == "heat") {
588                         for (it = heat.begin(); it != heat.end(); it++) {
589                                 out << it->first << ", ";
590                         }
591                 }else if (parameter == "boot") {
592                         for (it = boot.begin(); it != boot.end(); it++) {
593                                 out << it->first << ", ";
594                         }
595                 }else if (parameter == "distance") {
596                         for (it = distance.begin(); it != distance.end(); it++) {
597                                 out << it->first << ", ";
598                         }
599                 }
600
601                 out << endl;
602         }
603         catch(exception& e) {
604                 m->errorOut(e, "ValidCalculator", "printCalc");
605                 exit(1);
606         }
607 }
608 /********************************************************************/
609