SyFi  0.3
polh.cpp File Reference
#include <SyFi.h>
#include <fstream>

Go to the source code of this file.

Functions

int main ()

Function Documentation

int main ( )

Definition at line 8 of file polh.cpp.

References SyFi::compare_archives(), SyFi::homogenous_pol(), SyFi::initSyFi(), and SyFi::nsd.

           {

    archive ar; 
    int order = 3; 

    initSyFi(1);
    cout <<"third order homogenous polynomial in 1D"<<endl; 
    ex polh = homogenous_pol(order, nsd, "a");  
    cout <<"polh "<<polh<<endl; 
    ar.archive_ex(polh, "polh1_3"); 


    initSyFi(2);
    cout <<"third order homogenous polynomial in 2D"<<endl; 
    polh = homogenous_pol(order, nsd, "a");  
    cout <<"polh "<<polh<<endl; 
    ar.archive_ex(polh, "polh2_3"); 

    initSyFi(3);
    cout <<"third order homogenous polynomial in 3D"<<endl; 
    polh = homogenous_pol(order, nsd, "a");  
    cout <<"polh "<<polh<<endl; 
    ar.archive_ex(polh, "polh3_3"); 

    ofstream vfile("polh.gar.v"); 
    vfile << ar; vfile.close(); 
    if(!compare_archives("polh.gar.v", "polh.gar.r")) { 
            cerr << "Failure!" << endl;
            return -1;
    }

    return 0; 


}
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator