#include <SyFi.h>
#include <fstream>
Go to the source code of this file.
Functions | |
int | main () |
int main | ( | ) |
Definition at line 8 of file polh.cpp.
References SyFi::compare_archives(), SyFi::homogenous_pol(), SyFi::initSyFi(), and SyFi::nsd.
00008 { 00009 00010 archive ar; 00011 int order = 3; 00012 00013 initSyFi(1); 00014 cout <<"third order homogenous polynomial in 1D"<<endl; 00015 ex polh = homogenous_pol(order, nsd, "a"); 00016 cout <<"polh "<<polh<<endl; 00017 ar.archive_ex(polh, "polh1_3"); 00018 00019 00020 initSyFi(2); 00021 cout <<"third order homogenous polynomial in 2D"<<endl; 00022 polh = homogenous_pol(order, nsd, "a"); 00023 cout <<"polh "<<polh<<endl; 00024 ar.archive_ex(polh, "polh2_3"); 00025 00026 initSyFi(3); 00027 cout <<"third order homogenous polynomial in 3D"<<endl; 00028 polh = homogenous_pol(order, nsd, "a"); 00029 cout <<"polh "<<polh<<endl; 00030 ar.archive_ex(polh, "polh3_3"); 00031 00032 ofstream vfile("polh.gar.v"); 00033 vfile << ar; vfile.close(); 00034 if(!compare_archives("polh.gar.v", "polh.gar.r")) { 00035 cerr << "Failure!" << endl; 00036 return -1; 00037 } 00038 00039 return 0; 00040 00041 00042 }