- int i;
- for (i=0; i<globaldata->Estimators.size(); i++) {
- if (validCalculator->isValidCalculator("matrix", globaldata->Estimators[i]) == true) {
- if (globaldata->Estimators[i] == "jabund") {
- matrixCalculators.push_back(new JAbund());
- }else if (globaldata->Estimators[i] == "sorabund") {
- matrixCalculators.push_back(new SorAbund());
- }else if (globaldata->Estimators[i] == "jclass") {
- matrixCalculators.push_back(new Jclass());
- }else if (globaldata->Estimators[i] == "sorclass") {
- matrixCalculators.push_back(new SorClass());
- }else if (globaldata->Estimators[i] == "jest") {
- matrixCalculators.push_back(new Jest());
- }else if (globaldata->Estimators[i] == "sorest") {
- matrixCalculators.push_back(new SorEst());
- }else if (globaldata->Estimators[i] == "thetayc") {
- matrixCalculators.push_back(new ThetaYC());
- }else if (globaldata->Estimators[i] == "thetan") {
- matrixCalculators.push_back(new ThetaN());
- }else if (globaldata->Estimators[i] == "morisitahorn") {
- matrixCalculators.push_back(new MorHorn());
- }else if (globaldata->Estimators[i] == "braycurtis") {
- matrixCalculators.push_back(new BrayCurtis());
+ ValidCalculators validCalculator;
+
+ int i;
+ for (i=0; i<Estimators.size(); i++) {
+ if (validCalculator.isValidCalculator("matrix", Estimators[i]) == true) {
+ if (Estimators[i] == "sharedsobs") {
+ matrixCalculators.push_back(new SharedSobsCS());
+ }else if (Estimators[i] == "sharedchao") {
+ matrixCalculators.push_back(new SharedChao1());
+ }else if (Estimators[i] == "sharedace") {
+ matrixCalculators.push_back(new SharedAce());
+ }else if (Estimators[i] == "jabund") {
+ matrixCalculators.push_back(new JAbund());
+ }else if (Estimators[i] == "sorabund") {
+ matrixCalculators.push_back(new SorAbund());
+ }else if (Estimators[i] == "jclass") {
+ matrixCalculators.push_back(new Jclass());
+ }else if (Estimators[i] == "sorclass") {
+ matrixCalculators.push_back(new SorClass());
+ }else if (Estimators[i] == "jest") {
+ matrixCalculators.push_back(new Jest());
+ }else if (Estimators[i] == "sorest") {
+ matrixCalculators.push_back(new SorEst());
+ }else if (Estimators[i] == "thetayc") {
+ matrixCalculators.push_back(new ThetaYC());
+ }else if (Estimators[i] == "thetan") {
+ matrixCalculators.push_back(new ThetaN());
+ }else if (Estimators[i] == "kstest") {
+ matrixCalculators.push_back(new KSTest());
+ }else if (Estimators[i] == "sharednseqs") {
+ matrixCalculators.push_back(new SharedNSeqs());
+ }else if (Estimators[i] == "ochiai") {
+ matrixCalculators.push_back(new Ochiai());
+ }else if (Estimators[i] == "anderberg") {
+ matrixCalculators.push_back(new Anderberg());
+ }else if (Estimators[i] == "kulczynski") {
+ matrixCalculators.push_back(new Kulczynski());
+ }else if (Estimators[i] == "kulczynskicody") {
+ matrixCalculators.push_back(new KulczynskiCody());
+ }else if (Estimators[i] == "lennon") {
+ matrixCalculators.push_back(new Lennon());
+ }else if (Estimators[i] == "morisitahorn") {
+ matrixCalculators.push_back(new MorHorn());
+ }else if (Estimators[i] == "braycurtis") {
+ matrixCalculators.push_back(new BrayCurtis());
+ }else if (Estimators[i] == "whittaker") {
+ matrixCalculators.push_back(new Whittaker());
+ }else if (Estimators[i] == "odum") {
+ matrixCalculators.push_back(new Odum());
+ }else if (Estimators[i] == "canberra") {
+ matrixCalculators.push_back(new Canberra());
+ }else if (Estimators[i] == "structeuclidean") {
+ matrixCalculators.push_back(new StructEuclidean());
+ }else if (Estimators[i] == "structchord") {
+ matrixCalculators.push_back(new StructChord());
+ }else if (Estimators[i] == "hellinger") {
+ matrixCalculators.push_back(new Hellinger());
+ }else if (Estimators[i] == "manhattan") {
+ matrixCalculators.push_back(new Manhattan());
+ }else if (Estimators[i] == "structpearson") {
+ matrixCalculators.push_back(new StructPearson());
+ }else if (Estimators[i] == "soergel") {
+ matrixCalculators.push_back(new Soergel());
+ }else if (Estimators[i] == "spearman") {
+ matrixCalculators.push_back(new Spearman());
+ }else if (Estimators[i] == "structkulczynski") {
+ matrixCalculators.push_back(new StructKulczynski());
+ }else if (Estimators[i] == "speciesprofile") {
+ matrixCalculators.push_back(new SpeciesProfile());
+ }else if (Estimators[i] == "hamming") {
+ matrixCalculators.push_back(new Hamming());
+ }else if (Estimators[i] == "structchi2") {
+ matrixCalculators.push_back(new StructChi2());
+ }else if (Estimators[i] == "gower") {
+ matrixCalculators.push_back(new Gower());
+ }else if (Estimators[i] == "memchi2") {
+ matrixCalculators.push_back(new MemChi2());
+ }else if (Estimators[i] == "memchord") {
+ matrixCalculators.push_back(new MemChord());
+ }else if (Estimators[i] == "memeuclidean") {
+ matrixCalculators.push_back(new MemEuclidean());
+ }else if (Estimators[i] == "mempearson") {
+ matrixCalculators.push_back(new MemPearson());
+ }
+ }