barycenter_simplex.cpp
Go to the documentation of this file.00001 #include <SyFi.h>
00002 #include <fstream>
00003
00004 using namespace GiNaC;
00005 using namespace SyFi;
00006 using namespace std;
00007
00008 int main() {
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 initSyFi(4);
00025
00026 ex q0 = lst(0.0,0.0,0.0,0.0);
00027 ex q1 = lst(1.0,0.0,0.0,0.0);
00028 ex q2 = lst(0.0,1.0,0.0,0.0);
00029 ex q3 = lst(0.0,0.0,1.0,0.0);
00030 ex q4 = lst(0.0,0.0,0.0,1.0);
00031
00032 Simplex simplex4(lst(q0,q1,q2,q3,q4));
00033
00034 ex coord4 = barycenter(simplex4);
00035 cout <<"coord "<<coord4<<endl;
00036
00037 }
00038
00039
00040