line_ex3.cpp
Go to the documentation of this file.00001 #include <SyFi.h>
00002
00003 using namespace GiNaC;
00004 using namespace SyFi;
00005 using namespace std;
00006
00007 int main() {
00008
00009 initSyFi(3);
00010
00011
00012
00013 numeric h(1,100);
00014 numeric a(1,2);
00015 ex p0 = lst(a,a,a);
00016 ex p1 = lst(a+h,a,a);
00017
00018 Line line(p0,p1);
00019
00020
00021 ex f = 1;
00022 ex intf = line.integrate(f);
00023 cout <<"intf "<<intf<<endl;
00024 EQUAL_OR_DIE(intf, "1/100");
00025
00026 return 0;
00027
00028 }
00029