#include "calculator.h"
-/***********************************************************************/
+/***********************************************************************
void VecCalc::printElements(vector<double> vec){
try {
for(int i = 0; i < vec.size(); i++)
}
}
-/***********************************************************************/
+/***********************************************************************
void VecCalc::printElements(vector<string> vec){
try {
exit(1);
}
}
-/***********************************************************************/
+/***********************************************************************
int VecCalc::findString(vector<string> vec, string str){
try {
for(int i = 0; i < vec.size(); i++)
exit(1);
}
}
-/***********************************************************************/
+/***********************************************************************
double VecCalc::mean(vector<double> vec){
return sumElements(vec)/vec.size();
}
-/***********************************************************************/
+/***********************************************************************
double VecCalc::stError(vector<double> vec){
try {
double sum = 0;
return sumElements(vec,0);
}
catch(exception& e) {
- cout << "Standard Error: " << e.what() << " has occurred in the VecCalc class Function sumElements. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+ errorOut(e, "VecCalc", "sumElements");
exit(1);
}
- catch(...) {
- cout << "An unknown error has occurred in the VecCalc class function sumElements. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
- exit(1);
- }
}
/***********************************************************************/
int VecCalc::sumElements(vector<int> vec, int index){
return sum;
}
catch(exception& e) {
- cout << "Standard Error: " << e.what() << " has occurred in the VecCalc class Function sumElements. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+ errorOut(e, "VecCalc", "sumElements");
exit(1);
}
- catch(...) {
- cout << "An unknown error has occurred in the VecCalc class function sumElements. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
- exit(1);
- }
}
/***********************************************************************/
return sum;
}
catch(exception& e) {
- cout << "Standard Error: " << e.what() << " has occurred in the VecCalc class Function sumElements. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+ errorOut(e, "VecCalc", "sumElements");
exit(1);
}
- catch(...) {
- cout << "An unknown error has occurred in the VecCalc class function sumElements. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
- exit(1);
- }
}
/***********************************************************************/
double VecCalc::sumElements(vector<double> vec, int index){
return sum;
}
catch(exception& e) {
- cout << "Standard Error: " << e.what() << " has occurred in the VecCalc class Function sumElements. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+ errorOut(e, "VecCalc", "sumElements");
exit(1);
}
- catch(...) {
- cout << "An unknown error has occurred in the VecCalc class function sumElements. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
- exit(1);
- }
}
-/***********************************************************************/
+/***********************************************************************
double VecCalc::findMax(vector<double> vec){
try {
double max = -1000000.0;
return numNZ;
}
catch(exception& e) {
- cout << "Standard Error: " << e.what() << " has occurred in the VecCalc class Function numNZ. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+ errorOut(e, "VecCalc", "numNZ");
exit(1);
}
- catch(...) {
- cout << "An unknown error has occurred in the VecCalc class function numNZ. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
- exit(1);
- }
}
/***********************************************************************/
double VecCalc::numNZ(vector<double> vec){
return numNZ;
}
catch(exception& e) {
- cout << "Standard Error: " << e.what() << " has occurred in the VecCalc class Function numNZ. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+ errorOut(e, "VecCalc", "numNZ");
exit(1);
}
- catch(...) {
- cout << "An unknown error has occurred in the VecCalc class function numNZ. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
- exit(1);
- }
}
-/***********************************************************************/
+/***********************************************************************
double VecCalc::numPos(vector<double> vec){
try {
double numPos = 0;
exit(1);
}
}
-/***********************************************************************/
+/***********************************************************************
double VecCalc::findMaxDiff(vector<double> vec1, vector<double> vec2){
try {
double maxDiff = -10000000000.0;
exit(1);
}
}
-/***********************************************************************/
+/***********************************************************************
double VecCalc::findDStat(vector<double> vec1, vector<double> vec2, double num){
try {
double mDiff = findMaxDiff(vec1, vec2);
exit(1);
}
}
-/***********************************************************************/
+/***********************************************************************
vector<int> VecCalc::findQuartiles(vector<double> vec){
try {
vector<int> quartiles;
exit(1);
}
}
-/***********************************************************************/
+/***********************************************************************
vector<double> VecCalc::add(vector<double> vec, double x){
try {
vector<double> newVec;
exit(1);
}
}
-/***********************************************************************/
+/***********************************************************************
vector<double> VecCalc::multiply(vector<double> vec, double x){
try {
vector<double> newVec;
exit(1);
}
}
-/***********************************************************************/
+/***********************************************************************
vector<double> VecCalc::power(vector<double> vec, double p){
try {
vector<double> newVec;
exit(1);
}
}
-/***********************************************************************/
+/***********************************************************************
vector<double> VecCalc::addVecs(vector<double> vec1, vector<double> vec2) //Vectors must be the same size.
{ try {
vector<double> newVec;
exit(1);
}
}
-/***********************************************************************/
+/***********************************************************************
vector<double> VecCalc::multVecs(vector<double> vec1, vector<double> vec2) //Vectors must be the same size.
{ try {
vector<double> newVec;
exit(1);
}
}
-/***********************************************************************/
+/***********************************************************************
vector<double> VecCalc::remDup(vector<double> vec){
try {
vector<double> newVec;
exit(1);
}
}
-/***********************************************************************/
+/***********************************************************************
vector<double> VecCalc::genCVec(vector<double> vec1){
try {
vector<double> vec2;
exit(1);
}
}
-/***********************************************************************/
+/***********************************************************************
vector<double> VecCalc::genRelVec(vector<double> vec){
try {
vector<double> newVec;
exit(1);
}
}
-/***********************************************************************/
+/***********************************************************************
vector<double> VecCalc::genDiffVec(vector<double> vec1, vector<double> vec2){
try {
vector<double> newVec;
exit(1);
}
}
-/***********************************************************************/
+/***********************************************************************
vector<double> VecCalc::genCSVec(vector<double> vec){
try {
vector<double> newVec;
exit(1);
}
}
-/***********************************************************************/
+/***********************************************************************
vector<double> VecCalc::genTotVec(vector<vector<double> > vec){
try {
vector<double> newVec = vec.at(0);
exit(1);
}
}
-/***********************************************************************/
+/***********************************************************************
vector<double> VecCalc::quicksort(vector<double> vec){
try {
sort(vec.rbegin(), vec.rend());
exit(1);
}
}
-/***********************************************************************/
+/***********************************************************************
vector<vector<double> > VecCalc::gen2DVec(vector<double> vec, int div, int type){
try {
vector<vector<double> > vec2D;
exit(1);
}
}
-/***********************************************************************/
+/***********************************************************************
vector<string> VecCalc::getSData(char name[]){
try {
vector<string> vec;
}
/***********************************************************************/
-/***********************************************************************/
+/***********************************************************************
void BrokenStick::doBStick(vector<double> vec)//vec = The data vector.
{ try {
VecCalc vecCalc;
}
}
-/***********************************************************************/
+/***********************************************************************
double kEq(double k, double spec)
{
return k/(1-k)*pow(1-k, spec)/(1-pow(1-k, spec));
}
}*/
-/***********************************************************************/
+/***********************************************************************
void Jackknifing::doJK(vector<double> vec, double cols)//vec = the data vector if the data table was read left-to-right, top-to-bottom. cols = The number of columns in the data table.
{ try {
VecCalc vecCalc;
exit(1);
}
}
-/***********************************************************************/
+/***********************************************************************
void KS2SampleTest::doKSTest(vector<double> abun1, vector<double> abun2)//abun1 = 1st vector of abundances, abun2 = 2nd vector of abundances
{ try {
VecCalc vecCalc;
}
}
-/***********************************************************************/
+/***********************************************************************
void QStatistic::doQStat(vector<double> vec)//vec = The data vector.
{ try {
exit(1);
}
}
-/***********************************************************************/
+/***********************************************************************
double SSBPDiversityIndices::getShan(vector<double> vec)//vec = The data vector.
{ try {
VecCalc vecCalc;
exit(1);
}
}
-/***********************************************************************/
+/***********************************************************************
double SSBPDiversityIndices::getSimp(vector<double> vec)//vec = The data vector.
{ try {
VecCalc vecCalc;
exit(1);
}
}
-/***********************************************************************/
+/***********************************************************************
double SSBPDiversityIndices::getBP(vector<double> vec)//vec = The data vector.
{ try {
VecCalc vecCalc;
exit(1);
}
}
-/***********************************************************************/
+/***********************************************************************
void SSBPDiversityIndices::doSSBP(vector<double> vec)//vec = The data vector.
{ try {
VecCalc vecCalc;
return values[row][col];
}
catch(exception& e) {
- cout << "Standard Error: " << e.what() << " has occurred in the TDTable class Function getConfLimit. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+ errorOut(e, "TDTable", "getConfLimit");
exit(1);
}
- catch(...) {
- cout << "An unknown error has occurred in the TDTable class function getConfLimit. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
- exit(1);
- }
}
-/***********************************************************************/
+/***********************************************************************
double KOSTable::getConfLimit(int index) //Table of Critical values for N = 4-20 for One-Sample Kolmogorov-Smirnov Test
{ try {
//Confidence Level = .05