- double numPos(vector<double>); //This returns the number of positive values in the vector.
- double findMaxDiff(vector<double>, vector<double>); //This returns the absolute value of the maximum difference between the two vectors.
- double findDStat(vector<double>, vector<double>, double); //This returns the D-Statistic of the two vectors with the given total number of species.
- vector<int> findQuartiles(vector<double>); //This returns a vector with the first element being the index of the lower quartile of the vector and the second element being the index of the upper quartile of the vector.
- vector<double> add(vector<double>, double); //This adds the given number to every element in the given vector and returns the new vector.
- vector<double> multiply(vector<double>, double); //This multiplies every element in the given vector by the given number and returns the new vector.
- vector<double> power(vector<double>, double); //This raises every element in the given vector to the given number and returns the new vector.
- vector<double> addVecs(vector<double>,vector<double>); //The given vectors must be the same size. This adds the ith element of the first given vector to the ith element of the second given vector and returns the new vector.
- vector<double> multVecs(vector<double>,vector<double>); //The given vectors must be the same size. This multiplies the ith element of the first given vector to the ith element of the second given vector and returns the new vector.
- vector<double> remDup(vector<double>); //This returns a vector that contains 1 of each unique element in the given vector. The order of the elements is not changed.
- vector<double> genCVec(vector<double>); //This returns a cumilative vector of the given vector. The ith element of the returned vector is the sum of all the elements in the given vector up to i.
- vector<double> genRelVec(vector<double>); //This finds the sum of all the elements in the given vector and then divides the ith element in the given vector by that sum and then puts the result into a new vector, which is returned after all of the elements in the given vector have been used.
- vector<double> genDiffVec(vector<double>, vector<double>);//This subtracts the ith element of the second given vector from the ith element of the first given vector and returns the new vector.
- vector<double> genCSVec(vector<double>);//This calculates the number of species that have the same number of individuals as the ith element of the given vector and then returns a cumulative vector.
- vector<double> genTotVec(vector<vector<double> >); //This adds up the ith element of all the columns and puts that value into a new vector. It those this for all the rows and then returns the new vector.
- vector<double> quicksort(vector<double>); //This sorts the given vector from highest to lowest and returns the sorted vector.
- vector<vector<double> > gen2DVec(vector<double>, int, int); //(vector, #rows/columns, 0 if the second parameter was rows, 1 if the second parameter was columns) Transforms a single vector that was formatted like a table into a 2D vector.
- vector<string> getSData(char[]);//This takes a file name as a parameter and reads all of the data in the file into a <string> vector.
-};
-
-/**************************************************************************************************/
-/*This Class contains methods that return the B Diverstiy of two sets
-of data. The four methods are the Whittaker's measure, the Marczewski-Stainhaus distance,
-the Sorensen quantitative index, and the Morisita-Horn index.
-The main method takes a number of columns of data and performs all 4 methods on each
-combination of columns. It prints a table for every method that shows the B Diverstiy for
-each combination. It also calculates the overall diversity for Whittaker's measure and
-the Marczewski-Steinhaus distance.*/
-
-
-class BDiversity
-{
- public:
- void doBD(vector<double>, double);//Main method
- double getWhitt(vector<double>,vector<double>);//Whittacker's measure
- double getMS(vector<double>, vector<double>);//Marczewski-Stainhaus distance
- double getSor(vector<double>, vector<double>);//Sorensen quantitative index
- double getMor(vector<double>, vector<double>);//Morisita-Horn index
- void printD(vector<vector<double> >, int);//This prints a table that represents the given 2D vector, the second paramter specifies which method is to be used (1 for Whitt, 2 for MS, 3 for Sor, and 4 for Mor)
+ //double numPos(vector<double>); //This returns the number of positive values in the vector.
+ //double findMaxDiff(vector<double>, vector<double>); //This returns the absolute value of the maximum difference between the two vectors.
+ //double findDStat(vector<double>, vector<double>, double); //This returns the D-Statistic of the two vectors with the given total number of species.
+ //vector<int> findQuartiles(vector<double>); //This returns a vector with the first element being the index of the lower quartile of the vector and the second element being the index of the upper quartile of the vector.
+ //vector<double> add(vector<double>, double); //This adds the given number to every element in the given vector and returns the new vector.
+ //vector<double> multiply(vector<double>, double); //This multiplies every element in the given vector by the given number and returns the new vector.
+ //vector<double> power(vector<double>, double); //This raises every element in the given vector to the given number and returns the new vector.
+ //vector<double> addVecs(vector<double>,vector<double>); //The given vectors must be the same size. This adds the ith element of the first given vector to the ith element of the second given vector and returns the new vector.
+ //vector<double> multVecs(vector<double>,vector<double>); //The given vectors must be the same size. This multiplies the ith element of the first given vector to the ith element of the second given vector and returns the new vector.
+ //vector<double> remDup(vector<double>); //This returns a vector that contains 1 of each unique element in the given vector. The order of the elements is not changed.
+ //vector<double> genCVec(vector<double>); //This returns a cumilative vector of the given vector. The ith element of the returned vector is the sum of all the elements in the given vector up to i.
+ //vector<double> genRelVec(vector<double>); //This finds the sum of all the elements in the given vector and then divides the ith element in the given vector by that sum and then puts the result into a new vector, which is returned after all of the elements in the given vector have been used.
+ ///vector<double> genDiffVec(vector<double>, vector<double>);//This subtracts the ith element of the second given vector from the ith element of the first given vector and returns the new vector.
+ //vector<double> genCSVec(vector<double>);//This calculates the number of species that have the same number of individuals as the ith element of the given vector and then returns a cumulative vector.
+ //vector<double> genTotVec(vector<vector<double> >); //This adds up the ith element of all the columns and puts that value into a new vector. It those this for all the rows and then returns the new vector.
+ //vector<double> quicksort(vector<double>); //This sorts the given vector from highest to lowest and returns the sorted vector.
+ //vector<vector<double> > gen2DVec(vector<double>, int, int); //(vector, #rows/columns, 0 if the second parameter was rows, 1 if the second parameter was columns) Transforms a single vector that was formatted like a table into a 2D vector.
+ //vector<string> getSData(char[]);//This takes a file name as a parameter and reads all of the data in the file into a <string> vector.