Skip to content

Commit

Permalink
Forgot to remove debug tests from main.
Browse files Browse the repository at this point in the history
  • Loading branch information
plichard committed Feb 23, 2012
1 parent 34cb368 commit 904c203
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 11 deletions.
10 changes: 5 additions & 5 deletions LaplaceInverse/src/main.cpp
Expand Up @@ -30,7 +30,7 @@ int main(int argc, char **argv)
int choice;
TransferFunction* f1 = new TransferFunction;
//f1.TextInput();
/*cout << "Interactive or from file(0,1): ";
cout << "Interactive or from file(0,1): ";
cin >> choice;

if(choice == 1)
Expand All @@ -48,8 +48,8 @@ int main(int argc, char **argv)
cout << "Unkown choice, exiting."<<endl;
exit(0);
}
*/
f1->LoadFromFile("test2");

/*
int max_loop = 1000;
int bar_size = 20;
cout << "[";
Expand All @@ -59,8 +59,8 @@ int main(int argc, char **argv)
cout<<"=";fflush(stdout);
f1->FindFactors(false);
}
cout << "]"<<endl;
//f1->FindFactors();
cout << "]"<<endl;*/
f1->FindFactors();


cout << "Factors: "; f1->PrintFactors(); cout << endl;
Expand Down
37 changes: 31 additions & 6 deletions LaplaceInverse/src/main.cpp~
@@ -1,10 +1,12 @@
#include <iostream>
#include <string>
#include <map>
#include <cstdio>
using namespace std;
#include "TransferFunction.h"
#include "Literal.h"
#include "LiteralElement.h"
#include "MemoryManager.h"

typedef map<string,TransferFunction*> TransferMap;
typedef TransferMap::iterator TransferMapIt;
Expand All @@ -13,10 +15,20 @@ TransferMap functions;

int main(int argc, char **argv)
{
/*
cout << "Lets test the memory manager"<<endl;
MemoryManager<LiteralElement> mem(10);
LiteralElement* elem0 = mem.New();
LiteralElement* elem1 = mem.New();
LiteralElement* elem2 = mem.New();
LiteralElement* elem3 = mem.New();
mem.Free(elem2);
mem.Free(elem1);
elem2 = mem.New();*/
cout << "Your system supports "<<sizeof(long double)*8<<"bit precision"<<endl;

int choice;
TransferFunction f1;
TransferFunction* f1 = new TransferFunction;
//f1.TextInput();
cout << "Interactive or from file(0,1): ";
cin >> choice;
Expand All @@ -36,14 +48,27 @@ int main(int argc, char **argv)
cout << "Unkown choice, exiting."<<endl;
exit(0);
}
for(int i = 0; i < 10000;i++)

/*
int max_loop = 1000;
int bar_size = 20;
cout << "[";
for(int i = 0; i < max_loop; i++)
{
cout << i << endl;
f1.FindFactors();
if(!(i%(max_loop/bar_size)))
cout<<"=";fflush(stdout);
f1->FindFactors(false);
}
cout << "]"<<endl;*/
f1->FindFactors();


cout << "Factors: "; f1.PrintFactors(); cout << endl;
f1.NicePrintFactors();
cout << "Factors: "; f1->PrintFactors(); cout << endl;
f1->NicePrintFactors();
delete f1;
cout << "memory stats(lost objects): "<<endl;
cout << "LiteralElement: "<<LiteralElement::object_count<<endl;
cout << "Literal : "<<Literal::object_count<<endl;

return 0;
}

0 comments on commit 904c203

Please sign in to comment.