int main() {
	// 2 1 3
	ListNode l1(2), l2(1), l3(3);
	ListNode l4(4), l5(2), l6(1), l7(6), l8(6), l9(9), l10(10), l11(11), l12(12), l13(6);
	ListNode n1(0), n2(0), n3(0), n4(1);
	l1.next = &l2;
	//l2.next = &l3;

	l4.next = &l5;
	l5.next = &l6;
	l6.next = &l7;
	l7.next = &l8;
	l8.next = &l9;
	l9.next = &l10;
	l10.next = &l11;
	l11.next = &l12;
	l12.next = &l13;

	print_list(&l1);
	Solution s;
	ListNode *result = s.removeNthFromEnd(&l1, 2);
	print_list(result);
	return 0;
}
//
//    Save
//    ====
//
//    Save the information for this object to the AuditDataFile
//
bool CLocaleScanner::SaveData	(CAuditDataFile* pAuditDataFile)
{
	CLogFile log;
	log.Write("CLocaleScanner::SaveData Start" ,true);

	CString strValue;

	// Add the Category for memory
	CAuditDataFileCategory category(HARDWARE_CLASS);

	// Each audited item gets added an a CAuditDataFileItem to the category
	CAuditDataFileItem l1(V_LOCALE_CODEPAGE ,m_iCodePage);
	CAuditDataFileItem l2(V_LOCALE_CALENDARTYPE ,m_strCalendarType);
	CAuditDataFileItem l3(V_LOCALE_COUNTRY ,m_strCountry);
	CAuditDataFileItem l4(V_LOCALE_COUNTRYCODE ,m_iCountryCode);
	CAuditDataFileItem l5(V_LOCALE_CURRENCY ,m_strCurrency);
	CAuditDataFileItem l6(V_LOCALE_DATEFORMAT ,m_strDateFormat);
	CAuditDataFileItem l7(V_LOCALE_LANGUAGE ,m_strLanguage);
	CAuditDataFileItem l8(V_LOCALE_LOCALLANGUAGE ,m_strLocaleLocalLanguage);
	CAuditDataFileItem l9(V_LOCALE_OEM_CODEPAGE ,m_iOEMCodePage);
	CAuditDataFileItem l10(V_LOCALE_TIMEFORMAT ,m_strTimeFormat);
	CAuditDataFileItem l11(V_LOCALE_TIMEFORMATSPECIFIER ,m_strTimeFormatSpecifier);
	CAuditDataFileItem l12(V_LOCALE_TIMEZONE ,m_strLocaleTimeZone);

	// Add the items to the category
	category.AddItem(l1);
	category.AddItem(l2);
	category.AddItem(l3);
	category.AddItem(l4);
	category.AddItem(l5);
	category.AddItem(l6);
	category.AddItem(l7);
	category.AddItem(l8);
	category.AddItem(l9);
	category.AddItem(l10);
	category.AddItem(l11);
	category.AddItem(l12);

	// ...and add the category to the AuditDataFile
	pAuditDataFile->AddAuditDataFileItem(category);

	// we always need to get the default browser details so do here
	CAuditDataFileCategory browserCategory("Internet|Browsers|Default Browser", FALSE, TRUE);
	CAuditDataFileItem b1("Path", GetRegValue("HKEY_CLASSES_ROOT\\http\\shell\\open\\command", ""));
	browserCategory.AddItem(b1);

	pAuditDataFile->AddInternetItem(browserCategory);


	log.Write("CLocaleScanner::SaveData End" ,true);
	return true;
}
Beispiel #3
0
int main(void)
{
	static const struct st3 a = {1, 2, 3, 4, 5, 6};

	l1(100);
	l2(100, 200);
	l3(100, 200, 300);
	l4(100, 200, 300, 400);
	l5(100, 200, 300, 400, 500);
	l6(100, 200, 300, 400, 500, 600);
	l7(100, 200, 300, 400, 500, 600, 700);
	l8(100, 200, 300, 400, 500, 600, 700, 800);

	d1();
	d2(43);
	d3(100, 200);
	d4(a);
	d5('a', 43, a);
	d6('a', 1);

	c1(44);
	c2(100, 'a', 3.4);
	c3(200, 2.777, 'q');
	c4(200, 1);
	c5(1.1, 2.2);
	c6(1.23, 45.6);
	c7('z', 0x200);

	a1('a');
	a2(10);
	a3(20);
	a4(102030405060LL);

	b1('a', 20);
	b2(30, 'b');
	b3(10, 20, 30, 40, 50, 60);

	s1(sx);
	s1p(&sx);
	s2(sy);
	s3(sz);
	s4(sq);
	s5(sa);
	s6(sb);

	r1();
	r3();
	r4();

	q1(200, sx);
	q2(300, 't', sx);
	q3(400, 410, sy);
	q4(500, 510, sq);
	q5(600, 610, 'z', 'q', sq);

	real1("fresh air");
	real2();

	return 0;
}
Beispiel #4
0
TEST(TestMultipleSharedSection, General)
{
    CSharedSection sec;

    CEvent event;
    std::atomic<long> mutex(0L);

    locker<CSharedLock> l1(sec,&mutex, &event);

    {
        CSharedLock lock(sec);
        thread waitThread1(l1);

        EXPECT_TRUE(waitForThread(mutex,1,10000));
        SleepMillis(10);

        EXPECT_TRUE(l1.haslock);

        event.Set();

        EXPECT_TRUE(waitThread1.timed_join(MILLIS(10000)));
    }

    locker<CSharedLock> l2(sec,&mutex,&event);
    locker<CSharedLock> l3(sec,&mutex,&event);
    locker<CSharedLock> l4(sec,&mutex,&event);
    locker<CSharedLock> l5(sec,&mutex,&event);
    {
        CExclusiveLock lock(sec);
        thread waitThread1(l2);
        thread waitThread2(l3);
        thread waitThread3(l4);
        thread waitThread4(l5);

        EXPECT_TRUE(waitForThread(mutex,4,10000));
        SleepMillis(10);

        EXPECT_TRUE(!l2.haslock);
        EXPECT_TRUE(!l3.haslock);
        EXPECT_TRUE(!l4.haslock);
        EXPECT_TRUE(!l5.haslock);

        lock.Leave();

        EXPECT_TRUE(waitForWaiters(event,4,10000));

        EXPECT_TRUE(l2.haslock);
        EXPECT_TRUE(l3.haslock);
        EXPECT_TRUE(l4.haslock);
        EXPECT_TRUE(l5.haslock);

        event.Set();

        EXPECT_TRUE(waitThread1.timed_join(MILLIS(10000)));
        EXPECT_TRUE(waitThread2.timed_join(MILLIS(10000)));
        EXPECT_TRUE(waitThread3.timed_join(MILLIS(10000)));
        EXPECT_TRUE(waitThread4.timed_join(MILLIS(10000)));
    }
}
Beispiel #5
0
/* List */
void challenge() {
    int numbers[] = { 1, 2, 3, 4, 5 };
    list<int> l1(numbers, numbers + 5);
    print<list<int> >(l1);

    list<int> l2;
    for (int i = 0; i < 10; ++i) {
        l2.push_back(i);
    }
    print<list<int> >(l2);

    for (int i = 0; i < 10; ++i) {
        l2.push_front(i);
    }
    print<list<int> >(l2);

    for (int i = 0; i < 10; ++i) {
        l2.pop_front();
    }
    print<list<int> >(l2);
    for (int i = 0; i < 10; ++i) {
        l2.pop_back();
    }
    print<list<int> >(l2);

    list<int> l3 (numbers, numbers + 5);
    // O(1)
    l3.erase(l3.begin());
    print<list<int> >(l3);
    // O(n), n = distance(begin, end)
    l3.erase(l3.begin(), l3.end());
    print<list<int> >(l3);
    // List operations
    list<int> l4 (numbers, numbers + 5);
    list<int> l5 (numbers, numbers + 5);
    // O(size() + size() - 1)
    l4.merge(l5);
    print<list<int> >(l4);
    print<list<int> >(l5); // Empty

    list<int> l6 (numbers, numbers + 5);
    print<list<int> >(l6);
    // O(n)
    l6.reverse();
    print<list<int> >(l6);
    // O(nlog(n))
    l6.sort();
    print<list<int> >(l6);

    print<list<int> >(l4);
    // O(n)
    l4.unique();
    print<list<int> >(l4);
}
MatrixXd Utils::calculateHomographyMatrixFromFiveOrtoghonalLines(QList<Line*> firstOrtoghonalLines, QList<Line*> secondOrthogonalLines,
                     QList<Line*> thirdOrthogonalLines, QList<Line*> fourthOrthogonalLines,
                     QList<Line*> fifthOrthogonalLines)
{
    // A * x = b.
    MatrixXd A(5, 6);
    MatrixXd b(5, 1);
    MatrixXd x(5, 1);

    Vector3d l1 = getLineInHomogeneousCoordinates(firstOrtoghonalLines.at(0));
    Vector3d m1 = getLineInHomogeneousCoordinates(firstOrtoghonalLines.at(1));
    Vector3d l2 = getLineInHomogeneousCoordinates(secondOrthogonalLines.at(0));
    Vector3d m2 = getLineInHomogeneousCoordinates(secondOrthogonalLines.at(1));
    Vector3d l3 = getLineInHomogeneousCoordinates(thirdOrthogonalLines.at(0));
    Vector3d m3 = getLineInHomogeneousCoordinates(thirdOrthogonalLines.at(1));
    Vector3d l4 = getLineInHomogeneousCoordinates(fourthOrthogonalLines.at(0));
    Vector3d m4 = getLineInHomogeneousCoordinates(fourthOrthogonalLines.at(1));
    Vector3d l5 = getLineInHomogeneousCoordinates(fifthOrthogonalLines.at(0));
    Vector3d m5 = getLineInHomogeneousCoordinates(fifthOrthogonalLines.at(1));

    b << -l1(1)*m1(1), -l2(1)*m2(1), -l3(1)*m3(1), -l4(1)*m4(1), -l5(1)*m5(1);
    A << l1(0)*m1(0), (l1(0)*m1(1)+l1(1)*m1(0))/2, l1(1)*m1(1), (l1(0)*m1(2)+l1(2)*m1(0))/2, (l1(1)*m1(2)+l1(2)*m1(1))/2, l1(2)*m1(2),
         l2(0)*m2(0), (l2(0)*m2(1)+l2(1)*m2(0))/2, l2(1)*m2(1), (l2(0)*m2(2)+l2(2)*m2(0))/2, (l2(1)*m2(2)+l2(2)*m2(1))/2, l2(2)*m2(2),
         l3(0)*m3(0), (l3(0)*m3(1)+l3(1)*m3(0))/2, l3(1)*m3(1), (l3(0)*m3(2)+l3(2)*m3(0))/2, (l3(1)*m3(2)+l3(2)*m3(1))/2, l3(2)*m3(2),
         l4(0)*m4(0), (l4(0)*m4(1)+l4(1)*m4(0))/2, l4(1)*m4(1), (l4(0)*m4(2)+l4(2)*m4(0))/2, (l4(1)*m4(2)+l4(2)*m4(1))/2, l4(2)*m4(2),
         l5(0)*m5(0), (l5(0)*m5(1)+l5(1)*m5(0))/2, l5(1)*m5(1), (l5(0)*m5(2)+l5(2)*m5(0))/2, (l5(1)*m5(2)+l5(2)*m5(1))/2, l5(2)*m5(2);

   x = A.colPivHouseholderQr().solve(b);

   x/=x(2);

   Matrix3d C;
   C << x(0), x(1)/2, x(3)/2,
        x(1)/2, x(2), x(4)/2,
        x(3)/2, x(4)/2, 1;

   Matrix2d kkt;
   kkt << C(0,0), C(0,1),
          C(1,0), C(1,1);

   MatrixXd vKKt(1,2);
   vKKt << C(2,0), C(2,1);

   MatrixXd V(1,2);
   V = vKKt * kkt.inverse();

   LLT<MatrixXd> llt(kkt);
   MatrixXd U = llt.matrixU();

   MatrixXd J (3,3);
   J << U(0,0), U(0,1),0, U(1,0), U(1,1),0, V(0), V(1), 1;

   return J;
}
void test_try_lock_five()
{
    int const num_mutexes=5;
    
    for(int i=-1;i<num_mutexes;++i)
    {
        dummy_mutex mutexes[num_mutexes];

        if(i>=0)
        {
            mutexes[i].lock();
        }
        boost::unique_lock<dummy_mutex> l1(mutexes[0],boost::defer_lock),
            l2(mutexes[1],boost::defer_lock),
            l3(mutexes[2],boost::defer_lock),
            l4(mutexes[3],boost::defer_lock),
            l5(mutexes[4],boost::defer_lock);

        int const res=boost::try_lock(l1,l2,l3,l4,l5);
    
        BOOST_CHECK(res==i);
        for(int j=0;j<num_mutexes;++j)
        {
            if((i==j) || (i==-1))
            {
                BOOST_CHECK(mutexes[j].is_locked);
            }
            else
            {
                BOOST_CHECK(!mutexes[j].is_locked);
            }
        }
        if(i==-1)
        {
            BOOST_CHECK(l1.owns_lock());
            BOOST_CHECK(l2.owns_lock());
            BOOST_CHECK(l3.owns_lock());
            BOOST_CHECK(l4.owns_lock());
            BOOST_CHECK(l5.owns_lock());
        }
        else
        {
            BOOST_CHECK(!l1.owns_lock());
            BOOST_CHECK(!l2.owns_lock());
            BOOST_CHECK(!l3.owns_lock());
            BOOST_CHECK(!l4.owns_lock());
            BOOST_CHECK(!l5.owns_lock());
        }
    }
}
void lock_five_mutexes_slowly(boost::mutex* m1,boost::mutex* m2,boost::mutex* m3,boost::mutex* m4,boost::mutex* m5,
                              wait_data* locked,wait_data* quit)
{
    boost::lock_guard<boost::mutex> l1(*m1);
    boost::this_thread::sleep(boost::posix_time::milliseconds(500));
    boost::lock_guard<boost::mutex> l2(*m2);
    boost::this_thread::sleep(boost::posix_time::milliseconds(500));
    boost::lock_guard<boost::mutex> l3(*m3);
    boost::this_thread::sleep(boost::posix_time::milliseconds(500));
    boost::lock_guard<boost::mutex> l4(*m4);
    boost::this_thread::sleep(boost::posix_time::milliseconds(500));
    boost::lock_guard<boost::mutex> l5(*m5);
    locked->signal();
    quit->wait();
}
Beispiel #9
0
void test_spdt()
{
	//创建所需元器件
	ngdc dc("dc1", 5);
	ngspdt spdt("spdt", ngspdt::status_throw1);
	ngresistor r1("1", 5);
	ngresistor r2("2", 5);
	ngled led1("led1");
	ngled led2("led2");
	ngground gnd;

	//创建接线,连接各元器件
	ngline l1(dc.pos, spdt.pole);
	ngline l2(spdt.throw1, r1.p1);
	ngline l3(spdt.throw2, r2.p1);
	ngline l4(r1.p2, led1.pos);
	ngline l5(r2.p2, led2.pos);
	ngline l6(led1.neg, dc.neg);
	ngline l7(led2.neg, dc.neg);
	ngline l0(dc.neg, gnd.ground);

	//创建电路图,添加元器件、接线到电路图
	schema sch;
	sch.AddDevices(&dc, &spdt, &r1, &r2, &led1, &led2, &gnd, 0);
	sch.AddLines(&l1, &l2, &l3, &l4, &l5, &l6, &l7, &l0, 0);

	//创建仿真对象,添加电路图,并开始暂态仿真
	circuit cir(&sch);
	cir.Tran("1t", "1m", 0);
	do 
	{
		Sleep(200);
		char ch = getchar();
		switch (ch)
		{
		case 'a':
			cir.SwitchOver(&spdt);
			Sleep(200);
			break;
		case 'q':
			cir.Halt();
		default:
			break;
		};
	} while (cir.IsRunning()); //主程序线程,类似windows UI消息循环
}
Beispiel #10
0
	/** test orthogonality */
	TEST(Line, orthogonal) {

		Line l1(0,0, 1,0);
		Line l2 = l1.getOrthogonal();
		EXPECT_EQ(0, getSkalar(l1,l2));

		Line l3(1,4, 2,-5);
		Line l4 = l3.getOrthogonal();
		EXPECT_EQ(0, getSkalar(l3,l4));

		Line l5(-2,1, -3,9);
		Line l6 = l5.getOrthogonal();
		EXPECT_EQ(0, getSkalar(l5,l6));

		Line l7(1,2, 3,4);
		Point p1(5,-3);
		Line l8 = l7.getOrthogonal(p1);
		EXPECT_EQ(0, getSkalar(l7,l8));
		EXPECT_EQ(p1.x, l8.p1.x);
		EXPECT_EQ(p1.y, l8.p1.y);

	}
int main(){
    ListNode l0(0);
    ListNode l1(5);
    ListNode l2(2);
    ListNode l3(3);
    ListNode l4(4);
    ListNode l5(1);
    ListNode l6(6);
    l0.next = &l1;
    l1.next = &l2;
    l2.next = &l3;
    l3.next = &l4;
    l4.next = &l5;
    l5.next = &l6;
    ListNode* curr = sortList(&l0);
    while(curr){
        printf("%d ", curr->val);
        curr = curr->next;
    }
    printf("\n");
    return 0;
}
Beispiel #12
0
	TEST(Line, length) {

		Line l1(1,0, 0,0);
		EXPECT_EQ(1, l1.getLength());

		Line l2(0,1, 0,0);
		EXPECT_EQ(1, l2.getLength());

		Line l3(0,0, 1,0);
		EXPECT_EQ(1, l3.getLength());

		Line l4(0,0, 0,1);
		EXPECT_EQ(1, l4.getLength());


		Line l5(1,1, 1,1);
		EXPECT_EQ(0, l5.getLength());

		Line l6(0,0, 1,1);
		EXPECT_EQ(std::sqrt(2), l6.getLength());

	}
Beispiel #13
0
int main()
{
    Solution s;
    ListNode *ret;
    ListNode l1(1);
    ListNode l2(2);
    ListNode l3(3);
    ListNode l4(4);
    ListNode l5(5);

    l1.next = &l2;
    l2.next = &l3;
    l3.next = &l4;
    l4.next = &l5;

    ret = s.removeNthFromEnd(&l1, 2);

    while (ret) {
        std::cout << ret->val << ",";
        ret = ret->next;
    }
    std::cout << std::endl;
}
Beispiel #14
0
int main()
{
    try {
        powerset_graycode g(5);
        enumerate_powerset(g);
        std::cout << std::endl;

        powerset_binary b(5);
        enumerate_powerset(b);
        std::cout << std::endl;

        powerset_lexicographic l5(5);
        enumerate_powerset(l5);
        std::cout << std::endl;    

        powerset_lexicographic l(5, {1,2}, true);
        enumerate_powerset(l);

    } catch (const iterator_not_dereferenceable_exception& ex) {
        std::cout << "exception: " << ex.what() << std::endl;
    }

}
Beispiel #15
0
void test_lock_five_uncontended()
{
    boost::fibers::mutex m1,m2,m3,m4,m5;

    boost::fibers::mutex::scoped_lock l1(m1,boost::defer_lock),
        l2(m2,boost::defer_lock),
        l3(m3,boost::defer_lock),
        l4(m4,boost::defer_lock),
        l5(m5,boost::defer_lock);

    BOOST_CHECK(!l1.owns_lock());
    BOOST_CHECK(!l2.owns_lock());
    BOOST_CHECK(!l3.owns_lock());
    BOOST_CHECK(!l4.owns_lock());
    BOOST_CHECK(!l5.owns_lock());
    
    boost::lock(l1,l2,l3,l4,l5);
    
    BOOST_CHECK(l1.owns_lock());
    BOOST_CHECK(l2.owns_lock());
    BOOST_CHECK(l3.owns_lock());
    BOOST_CHECK(l4.owns_lock());
    BOOST_CHECK(l5.owns_lock());
}
int glEngine(int ac, char **av)
{
  (void)ac;
  (void)av;
  sf::ContextSettings context;
  context.depthBits = 24;
  context.stencilBits = 24;
  context.antialiasingLevel = 2;
  context.majorVersion = 3;
  context.minorVersion = 3;

  sf::Window App(sf::VideoMode(W_WIDTH, W_HEIGHT, 32), "glEngine : Point lights",
		 sf::Style::Default, context);
  App.setActive();

  gle::Scene			scene;
  gle::PerspectiveCamera	camera(gle::Vector3<GLfloat>(0, 0, 0),
				       gle::Vector3<GLfloat>(0, 30, 0),
				       45, (GLfloat)W_WIDTH/W_HEIGHT,
				       1, 10000);
  gle::Material			material;

  material.setDiffuseLightEnabled(true);
  material.setSpecularLightEnabled(true);
  material.setShininess(32);

  gle::ObjLoader loader;
  gle::Scene::Node* model = loader.load("./models/WaltDisneyHeads.obj", &material);

  if (model)
    {
      std::vector<gle::Scene::Node*> childs;
      model->getChildrenByName("DisneyHead_hires", childs);
      model->getChildrenByName("Disney_hires", childs);
      scene << childs;
    }
  else
    exit(-1);

  gle::Material			materialLight;

  materialLight.setDiffuseLightEnabled(false);
  materialLight.setSpecularLightEnabled(false);
  materialLight.setAmbientColor(gle::Color<GLfloat>(1, 0, 0.25));

  gle::PointLight		l(gle::Vector3<GLfloat>(0, 0, 0), gle::Color<GLfloat>(1, 0, 0.25));
  gle::Mesh*			sp = gle::Geometries::Sphere(&materialLight,
							     1, 30, 30, true);
  gle::PointLight		l2(gle::Vector3<GLfloat>(0, 0, 0),
				   gle::Color<GLfloat>(0, 0.25, 1));
  gle::Material			materialLight2;
  materialLight2.setDiffuseLightEnabled(false);
  materialLight2.setSpecularLightEnabled(false);
  materialLight2.setAmbientColor(gle::Color<GLfloat>(0, 0.25, 1));
  gle::Mesh*			sp2 = gle::Geometries::Sphere(&materialLight2,
							      1, 30, 30, true);
  gle::Material			materialLight3;
  materialLight3.setDiffuseLightEnabled(false);
  materialLight3.setSpecularLightEnabled(false);
  materialLight3.setAmbientColor(gle::Color<GLfloat>(0.5, 1, 0.5));
  gle::PointLight		l3(gle::Vector3<GLfloat>(0, 0, 0),
				   gle::Color<GLfloat>(0.5, 1, 0.5));
  gle::Mesh*			sp3 = gle::Geometries::Sphere(&materialLight3,
							      1, 30, 30, true);

  gle::Material			materialLight4;
  materialLight4.setDiffuseLightEnabled(false);
  materialLight4.setSpecularLightEnabled(false);
  materialLight4.setAmbientColor(gle::Color<GLfloat>(1, 0.66, 0));
  gle::PointLight		l4(gle::Vector3<GLfloat>(0, 0, 0),
				   gle::Color<GLfloat>(1, 0.66, 0));
  gle::Mesh*			sp4 = gle::Geometries::Sphere(&materialLight4,
							      1, 30, 30, true);
  gle::PointLight		l5(gle::Vector3<GLfloat>(0, 0, 0),
				   gle::Color<GLfloat>(0.1, 0.1, 0.1));
  sp->setPosition(gle::Vector3<GLfloat>(0, 100, 0));
  sp2->setPosition(gle::Vector3<GLfloat>(0, 0, -20));
  sp3->setPosition(gle::Vector3<GLfloat>(40, 0, 0));

  //gle::DirectionalLight		l4(gle::Vector3<GLfloat>(1, 1, 0), gle::Color<GLfloat>(0.5, 0.5, 0.5));

  sp->addChild(&l);
  sp2->addChild(&l2);
  sp3->addChild(&l3);
  sp4->addChild(&l4);
  camera.addChild(&l5);
  scene << &camera << sp << sp2 << sp3 << sp4;

  gle::Renderer		renderer;
  GLfloat		angle = 0;
  sf::Clock		clock;
  sf::Clock		time;
  size_t		frameCounter = 0;
  float			dist = 170;
 
  //scene.update();
  while (App.isOpen())
    {
      sf::Event event;
      if (time.getElapsedTime().asMilliseconds() >= 1000)
	{
	  std::cout << "fps:" << frameCounter << std::endl;
	  frameCounter = 0;
	  time.restart();
	}
      frameCounter++;
      angle = (float)clock.getElapsedTime().asMilliseconds() / 1000;
      sf::Event Event;
      while (App.pollEvent(Event))
	{
	  // Close window : exit
	  if (Event.type == sf::Event::Closed)
	    App.close();
	  else if (Event.type == sf::Event::KeyPressed
		   && Event.key.code == sf::Keyboard::Escape)
	    App.close();
	  // Adjust the viewport when the window is resized
	  if (Event.type == sf::Event::Resized)
	    glViewport(0, 0, Event.size.width, Event.size.height);
	  flycam::event(event, App);
	}

      camera.setPosition(gle::Vector3<GLfloat>(cos(angle/3) * -(dist/2),
					       30,
					       sin(angle/3) * -dist/0.8));

      float		dist2 = dist / 3;

      sp->setPosition(gle::Vector3<GLfloat>(sin(angle/2) * dist2, cos(angle/2) * dist2 + 30, 0));
      //l.setPosition(gle::Vector3<GLfloat>(sin(angle/2) * dist2, cos(angle/2) * dist2 + 30, 0));

      sp2->setPosition(gle::Vector3<GLfloat>(sin(angle/2) * dist2, 30, cos(angle/2) * dist2));
      //l2.setPosition(gle::Vector3<GLfloat>(sin(angle/2) * dist2, 30, cos(angle/2) * dist2));

      sp3->setPosition(gle::Vector3<GLfloat>(0, sin(angle/2) * dist2+30, cos(angle/2) * dist2));
      //l3.setPosition(gle::Vector3<GLfloat>(0, sin(angle/2) * dist2+30, cos(angle/2) * dist2));

      sp4->setPosition(gle::Vector3<GLfloat>(0, cos(angle/2) * dist2+30, sin(angle/2) * dist2));
      //l4.setPosition(gle::Vector3<GLfloat>(0, cos(angle/2) * dist2+30, sin(angle/2) * dist2));

      //scene.updateLights();

      renderer.render(&scene, gle::Rectf(0, 0, W_WIDTH, W_HEIGHT));
      App.display();
      //video::saveImage(App, W_FRAMERATE);
    }

  //video::save(av[0], W_FRAMERATE);
  
  return (0);
}
Beispiel #17
0
int main()
{
try
  {

     symbol k("k"),q("q"),p("p"),p1("p1"),p2("p2"),p3("p3"),ms("ms"),l("l"),s("s"),m1s("m1s"),m2s("m2s"),m3s("m3s");
    symbol l1("l1"),l2("l2"),l3("l3"),l4("l4"),t("t"),p4("p4"),p5("p5"),tp("tp"),v1("v1"),v2("v2"),l5("l5");
    symbol k1("k1"),k2("k2"),k3("k3"),k4("k4"),k5("k5"),ms1("ms1"),ms2("ms2"),ms3("ms3"),ms4("ms4");
  // oneloop box
  //      UFXmap l45 = UF(lst(k),lst(pow(k,2),pow(k+p1,2),pow(k+p1+p2,2),pow(k+p1+p2+p3,2)),lst(pow(p1,2)==0,pow(p2,2)==0));
  // MBintegral root_int(l45,lst(1,1,1,1),1);

   //two loop box bubble
  // UFXmap l45 = UF(lst(k,l),lst(pow(k,2),pow(k+p1,2),pow(k+p1+p2,2),pow(l+p1+p2,2),pow(l+p1+p2+p3,2),pow(l,2),pow(k-l,2)),lst(pow(p1,2)==0,pow(p2,2)==0,pow(p3,2)==0));
  //MBintegral root_int(l45,lst(1,1,1,1,1,1,1),2);

  // B0
  //    UFXmap l45 = UF(lst(k),lst(ms-pow(k,2),ms-pow(-k,2)),lst(ms==1));
  // MBintegral root_int(l45,lst(1,1),1);

  // 2 loop sunrise
  //UFXmap l45 = UF(lst(k,q),lst(ms-pow(k,2),ms-pow(-q-k,2),ms-pow(q,2)),lst(ms==1));
  //MBintegral root_int(l45,lst(1,1,1),2);


  //RoMB_planar box2loop(lst(k,l),lst(pow(k,2),pow(k+p1,2),pow(k+p1+p2,2),pow(l+p1+p2,2),pow(l+p1+p2+p3,2),pow(l,2),pow(k-l,2)),lst(pow(p1,2)==0,pow(p2,2)==0,pow(p3,2)==0),lst(1,1,1,1,1,1,1),2);

  //  RoMB_planar  box1loop(lst(k),lst(pow(k,2),pow(k+p1,2)-ms,pow(k+p1+p2,2),pow(k+p1+p2+p3,2)),lst(pow(p1,2)==0,pow(p2,2)==0,pow(p3,2)==0,p1==0,p2==0,p3==0,ms==1),lst(1,1,1,1),1);

  //  RoMB_planar B0_1loop(lst(k),lst(pow(k,2)-ms,pow(p+k,2)-ms),lst(ms==0,pow(p,2)==1),lst(1,1),1);

  //  RoMB_planar C0_1loop(lst(k),lst(pow(k,2)-ms,pow(p1+k,2)-ms,pow(p1+p2+k,2)),lst(ms==1,pow(p1,2)==0,pow(p2,2)==0,p1*p2==50),lst(1,1,1),1);
//cout<<" new point "<<endl<<root_int.new_point()<<endl;
// cout<<" saved point "<<endl<<root_int.get_point()<<endl;
//  MBcontinue(root_int);
  //cout<<MB_lst(l45,lst(1,1,1,1),1).expand()<<endl;


  // RoMB_loop_by_loop box2loop(lst(k,l),lst(pow(k,2),pow(k+p1,2),pow(k+p1+p2,2),pow(l+p1+p2,2),pow(l+p1+p2+p3,2),pow(l,2),pow(k-l,2)),lst(pow(p1,2)==0,pow(p2,2)==0,pow(p3,2)==0),lst(1,1,1,1,1,1,1));
  //      RoMB_loop_by_loop t2(lst(k,l), lst(pow(k,2),pow(p+k,2),pow(p+k+l,2),pow(l,2),pow(k+l,2)),lst(pow(p,2)==1),lst(1,1,1,1,1));


  // works!!!
  //        RoMB_loop_by_loop sunset(lst(k,l), lst(pow(k,2)-1,pow(p-k-l,2)-4,pow(l,2)-5),lst(pow(p,2)==s),lst(1,1,1));
      
  //   RoMB_loop_by_loop sunset(lst(k,l), lst(pow(k,2)-m1s,pow(-k-l,2)-m2s,pow(l,2)-m3s),lst(pow(p,2)==s),lst(1,1,1));
  //                 sunset.integrate(lst(m1s==1,m2s==1,m3s==1,s==0),0);

    //     bubble sunset 2=loop
//                   RoMB_loop_by_loop sunset_bub(lst(k,l), lst(-pow(k,2)+ms,-pow(-k-l,2)+ms,-pow(l,2)+ms),lst(pow(p,2)==0),lst(1,1,1));
//      sunset_bub.integrate(lst(ms==1,m2s==1,m3s==1,s==0),1);

    //     bubble sunset 3=loop
    //                     RoMB_loop_by_loop sunset_bub(lst(p,k,l), lst(-pow(p,2)+ms,-pow(k,2)+ms,-pow(l,2)+ms,-pow(-p-k-l,2)+ms),lst(pow(l3,2)==s),lst(1,1,1,1));
    //       sunset_bub.integrate(lst(ms==1,m2s==1,m3s==1,s==0),0);

    //     RoMB_loop_by_loop sunset_bub_d(lst(l1,l2,l3), lst(-pow(l1,2)+ms,-pow(l2,2)+ms,-pow(l3,2)+ms,-pow(l1+l2,2)+ms,-pow(l1+l2+l3,2)+ms),lst(pow(p,2)==s),lst(1,1,1,1,1));
    //   sunset_bub_d.integrate(lst(ms==1,m2s==1,m3s==1,s==0),-1);
//           RoMB_loop_by_loop sunset_bub_e(lst(l1,l2,l3), lst(-pow(l1,2)+ms,-pow(l2,2)+ms,-pow(l3,2)+ms,-pow(l1-l2,2)+ms,-pow(l2-l3,2)+ms,-pow(l3-l1,2)+ms),lst(pow(p,2)==s),lst(1,1,1,1,1,1));  
//                      sunset_bub_e.integrate_map(lst(ms==1,m2s==1,m3s==1,s==0),1);
    //bubble 4-loop
    //            RoMB_loop_by_loop sunset_bub(lst(k,l1,l2,l3), lst(-pow(k,2)+ms,-pow(l2,2)+ms,-pow(l1,2)+ms,-pow(l3,2)+ms,-pow(k+l1+l2+l3,2)+ms),lst(pow(p,2)==s),lst(1,1,1,1,1));
    // sunset_bub.integrate(lst(ms==1,m2s==1,m3s==1,s==0),0);
    
//bubble 5-loop
//     RoMB_loop_by_loop sunset_bub5(lst(l3,k,l1,l2,l4), lst(-pow(l3,2)+ms,-pow(k,2)+ms,-pow(l1,2)+ms,-pow(l2,2)+ms,-pow(l4,2)+ms,-pow(k+l1+l2+l3+l4,2)+ms),lst(pow(p,2)==s),lst(1,1,1,1,1,1));
//     sunset_bub5.integrate_map(lst(ms==1,m2s==1,m3s==1,s==0),3);



//    RoMB_loop_by_loop sunset_bubC2(lst(l1,l2,l3,l4,l5), lst(-pow(l3,2)+ms,-pow(l5,2)+ms,-pow(l1,2)+ms,-pow(l2,2)+ms,-pow(l4,2)+ms,-pow(l5+l1+l2,2)+ms,-pow(l5+l3+l4,2)+ms),lst(pow(p,2)==s),lst(1,1,1,1,1,1,1));
//     sunset_bubC2.integrate_map(lst(ms==1,m2s==1,m3s==1,s==0),0);


//    RoMB_loop_by_loop sunset_bubC2(lst(l1,l2,l3,l4,l5), lst(-pow(l3,2)+ms,-pow(l5,2)+ms,-pow(l1,2)+ms,-pow(l2,2)+ms,-pow(l4,2)+ms,-pow(l3+l4+l5,2)+ms,-pow(l1+l2+l5+l3+l4,2)+ms),lst(pow(p,2)==s),lst(1,1,1,1,1,1,1));
//     sunset_bubC2.integrate_map(lst(ms==1,m2s==1,m3s==1,s==0),0);


//    RoMB_loop_by_loop sunset_bubC1(lst(l1,l2,l3,l4,l5), lst(-pow(l3,2)+ms,-pow(l5,2)+ms,-pow(l1,2)+ms,-pow(l2,2)+ms,-pow(l4,2)+ms,-pow(l2+l3+l4+l5,2)+ms,-pow(l1+l2+l5+l3+l4,2)+ms),lst(pow(p,2)==s),lst(1,1,1,1,1,1,1));
//     sunset_bubC1.integrate_map(lst(ms==1,m2s==1,m3s==1,s==0),0);



/*
MEGA 5-LOOP BUBBLE with 12 propagators
*/

//RoMB_loop_by_loop l5p12(lst(k5,k2,k1,k4,k3),lst(-pow(k1,2)+ms,-pow(k2,2)+ms,-pow(k3,2)+ms,-pow(k4,2)+ms,-pow(k5,2)+ms,
//-pow(k1-k3,2)+ms,-pow(k1-k4,2)+ms,-pow(k3-k2,2)+ms,-pow(k2-k4,2)+ms,-pow(k5+k3-k1,2)+ms,-pow(k5+k3-k2,2)+ms,-pow(k5+k3-k4,2)+ms),lst(pow(p,2)==0),lst(1,1,1,1,1,1,1,1,1,1,1,1));
//l5p12.integrate(lst(ms==0),0);      

//RoMB_loop_by_loop l5c1(lst(k2,k5,k3,k4,k1),lst(-pow(k3,2)+ms,-pow(k2,2)+ms,-pow(k1,2)+ms,-pow(k4,2)+ms,-pow(k5,2)+ms,
//-pow(k1+k3+k4,2)+ms,-pow(k2+k5-k3-k4,2)+ms),lst(pow(p,2)==0),lst(1,1,1,1,1,1,1));
//l5c1.integrate_map(lst(ms==1),0);      



//     RoMB_loop_by_loop t2loop(lst(k,l), lst(-pow(k,2)+ms,-pow(p+k,2)+ms,-pow(p+k+l,2)+ms,-pow(k+l,2)+ms,-pow(l,2)+ms),lst(pow(p,2)==s),lst(1,1,1,1,1));
//    t2loop.integrate(lst(s==1,ms == 0),1);
    
    /*     RoMB_loop_by_loop bubble_five_loop(lst(k,l1,l2,l3,l4), 
	   lst(pow(k,2)-ms,pow(l1,2)-ms,pow(l2,2)-ms,pow(l3,2)-ms,pow(l4,2)-ms,pow(k+l1,2)-ms,pow(k+l1+l2,2)-ms,pow(k+l1+l2+l3,2)-ms,pow(k+l1+l2+l3+l4,2)-ms,pow(k+l1+l2+l3,2)-ms,pow(k+l1+l2,2)-ms,pow(k+l1,2)-ms),
	   lst(ms==1),
	   lst(1,1,1,1,1,1,1,1,1,1,1,1));
    */

    // works!!!
    //             RoMB_loop_by_loop B0_1loop_lbl(lst(k),lst(pow(k,2)-2-ms,pow(p+k,2)-ms),lst(ms==0,pow(p,2)==1),lst(2,1));
    
    //     RoMB_loop_by_loop B0_1loop_lbl(lst(k),lst(pow(k,2)-m1s,pow(p+k,2)-m2s),lst(pow(p,2)==s),lst(1,1));
    //    B0_1loop_lbl.integrate(lst(s==-1,m1s==1,m2s==1));
    
    //MB works???
    //                                RoMB_loop_by_loop C0_1loop_lbl(lst(k),lst(pow(k,2),pow(k+p1,2)-m1s,pow(k-p2,2)-m2s),lst(ms==1,pow(p1,2)==m1s,pow(p2,2)==m2s,p1*p2==(s-m1s-m2s)/2),lst(1,1,1));
    //          C0_1loop_lbl.integrate(lst(m1s==1,m2s==1,s==-100));
    

  //MB works???
  
    /*
          RoMB_loop_by_loop box1loopm0(lst(k),lst(-pow(k,2),-pow(k+p1,2),-pow(k+p1+p2,2),-pow(k+p1+p2+p4,2)),
                                  lst(pow(p1,2)==0,pow(p2,2)==0,pow(p4,2)==0,
                                      p1*p2==-s/2,//
                                      
                                      p1*p4==s/2+t/2,//
                                      
                                      p2*p4==-t/2 //
                                      ),
                                       lst(1,1,1,1),false);
    box1loopm0.integrate_map(lst(s==3,t==1));
   
    box1loopm0.integrate(lst(s==5,t==2));
    */
//MASIVE BOX LBL
       
    RoMB_loop_by_loop box1loopm(lst(k),lst(-pow(k,2)+ms,-pow(k+p1,2)+ms,-pow(k+p1+p2,2)+ms,-pow(k+p1+p2+p4,2)+ms),
                                    lst(pow(p1,2)==0,pow(p2,2)==0,pow(p4,2)==0,
                                       p1*p2==s/2,//
                                        
                                      p1*p4==-(s/2+t/2),//
                                        
                                        p2*p4==t/2 //
                                        ),
                                lst(1,1,1,1),false);
        box1loopm.integrate_map(lst(ms1==1,ms2==1,ms3==1,ms4==1,ms==1,s==-3,t==-1),3);
    
    //triple box
/*
    RoMB_loop_by_loop tribox1loopm(lst(k1,k2,k3),lst(-pow(k1,2)+ms,-pow(k1+p1,2),-pow(k1+p1+p2,2)+ms,
                                                     -pow(k1-k2,2),-pow(k2,2)+ms,-pow(k2+p1+p2,2)+ms,
                                                     -pow(k2-k3,2),-pow(k3,2)+ms,-pow(k3+p1+p2,2)+ms,
                                                     -pow(k3-p3,2)),

                                   lst(pow(p1,2)==ms,pow(p2,2)==ms,pow(p3,2)==ms,pow(p4,2)==ms,
                                       p1*p2==s/2-ms,//
                                        
                                      p1*p3==t/2-ms,//
                                        
                                       p2*p3==ms-(s+t)/2 //
                                        ),
                                   lst(1,1,1,1,1,1,1,1,1,1),true);
    tribox1loopm.integrate_map(lst(ms1==1,ms2==1,ms3==1,ms4==1,ms==1,s==-1/2,t==-3));
*/



    //double box
    /*
    RoMB_loop_by_loop dobox1loopm(lst(k1,k2),lst(-pow(k1,2),-pow(k1+p1,2),-pow(k1+p1+p2,2),
                                                     -pow(k1-k2,2),-pow(k2,2),-pow(k2+p1+p2,2),
                                                     -pow(k2-p3,2)),

                                   lst(pow(p1,2)==0,pow(p2,2)==0,pow(p3,2)==0,pow(p4,2)==0,
                                       p1*p2==s/2-ms,//
                                        
                                      p1*p3==t/2-ms,//
                                        
                                       p2*p3==ms-(s+t)/2 //
                                        ),
                                   lst(1,1,1,1,1,1,1),false);
   dobox1loopm.integrate_map(lst(ms1==1,ms2==1,ms3==1,ms4==1,ms==1,s==-1/2,t==-3));
*/
        
    /*
      4-loop  tadpole
    */


    //             RoMB_loop_by_loop tad4(lst(l1, l2, l3, l4),lst(pow(l1,2)- ms,pow(l2,2)- ms,pow(l3 ,2)- ms,pow(l4,2),pow(l1+l2+l3+l4,2)),lst(),lst(1,1,1,1,1));
    //      tad4.integrate(lst(ms == 1),-2);


    
     /*
       Pentagon
     */
  /* 
            RoMB_loop_by_loop pent(lst(k1),lst(-pow(p1 + k1,2)+ ms,-pow(p1 + p5 + k1,2),
                                        -pow(p1 + p5 + p4 + k1,2)+ ms,-pow(p1 + p5 + p4 + p3 + k1,2)+ ms,
                                        -pow(k1,2)),
                            lst(



p1*p1 == ms, p2*p2 == ms, p3*p3 == 0, p4*p4 == ms, p5*p5 == ms, 
p1*p2 == 1/2* (tp - 2* ms), p1*p3 == 1/2* (t - tp - v1), 
p1*p4 == ms - 1/2* (s + t - v1), p1*p5 == 1/2* (s - 2* ms), 
p2* p3 == 1/2* v1, p2* p4 == 1/2* (s - 2* ms - v1 - v2), 
p2* p5 == ms - 1/2* (s + tp - v2), p3* p4 == 1/2* v2, 
p3* p5 == 1/2* (tp - t - v2), p4* p5 == 1/2* (t - 2* ms)),
lst(1,1,1,1,1));
pent.integrate_map(lst(s==-2,t==-3,v2==-4,tp==-5,v1==-6,ms==1));

*/
    /*
        RoMB_loop_by_loop pent(lst(k1),lst(-pow(p1 + k1,2)+ ms,-pow(p1 + p5 + k1,2),
                                           -pow(p1 + p5 + p4 + k1,2)+ ms,-pow(p1 + p5 + p4 + p3 + k1,2)+ ms,
                                           -pow(k1,2)),
                               lst(
                                   p1*p1 == ms, 
                                   p2*p2 == ms, 
                                   p3*p3 == 0, 
                                   p4*p4 == ms, 
                                   p5*p5 == ms, 
                                   p1*p2 == 1/2* (tp - 2* ms), 
                                   wild(1)*p1*p3 == wild(1)*1/2* (t - tp - v1), 
                                   wild(2)*p1*p4 == wild(2)*(ms - 1/2* (s + t - v1)), 
                                  wild(3)* p1*p5 == wild(3)*1/2* (s - 2* ms), 
                                   wild(4)*p2* p3 == wild(4)*1/2* v1, 
                                   wild(5)*p2* p4 == wild(5)*1/2* (s - 2* ms - v1 - v2), 
                                   wild(6)*p2* p5 ==wild(6)*( ms - 1/2* (s + tp - v2)), 
                                   wild(7)*p3* p4 == wild(7)*1/2* v2, 
                                   wild(8)*p3* p5 == wild(8)*1/2* (tp - t - v2), 
                                   wild()*p4* p5 == wild()*1/2* (t - 2* ms)),
                               lst(1,1,1,1,1));
        pent.integrate_map(lst(s==-2,t==-3,v2==-4,tp==-5,v1==-6,ms==1));
       
        */
  }
  catch(std::exception &p)
    {
      std::cerr<<"******************************************************************"<<endl;
      std::cerr<<"   >>>ERROR:  "<<p.what()<<endl;
      std::cerr<<"******************************************************************"<<endl;
      return 1;
    }
  return 0;
}
Beispiel #18
0
static double lob5(double x)  { return l5(x); }
Beispiel #19
0
ClusterAddTest::ClusterAddTest()
{
    //funzione createwalls;
//    SLAM::Geometry::LineSegment l1 ( 1, 1, 3, 1) ;
//    qDebug() << "l'angolo di l1 è " << l1.angle() <<endl;
//    SLAM::Geometry::LineSegment l2 ( 4, 1, 6, 1) ;
//    SLAM::Geometry::LineSegment l3 ( 6, 1, 6, 3) ;
//    SLAM::Geometry::LineSegment l4 ( 6, 3, 3, 4) ;
//    SLAM::Geometry::LineSegment l5 ( 4, 4, 4, 6) ;
//    qDebug() << "l'angolo di l5 è " << fabs(fmod(l5.angle(),M_PI)) <<endl;
//    SLAM::Geometry::LineSegment l6 ( 4, 6, 3, 6) ;
//    SLAM::Geometry::LineSegment l7 ( 3, 6, 3, 4) ;
//    qDebug() << "l'angolo di l7 è " << fabs(fmod(l7.angle(),M_PI)) <<endl;
//    SLAM::Geometry::LineSegment l8 ( 1, 2, 3, 4) ;
//    qDebug() << "l'angolo di l8 è " << fabs(l8.angle()) <<endl;
//    SLAM::Geometry::LineSegment l9 ( 1, 2, 1, 1) ;
    SLAM::Geometry::LineSegment l1 ( 1, 1, 2, 2) ;
    SLAM::Geometry::LineSegment l2 ( 3, 3, 4, 4) ;
    SLAM::Geometry::LineSegment l3 ( 6, 6, 8, 8) ;
    SLAM::Geometry::LineSegment l4 ( 4, 1, 5, 2) ;
    SLAM::Geometry::LineSegment l5 ( 7, 0, 8, 1) ;
    SLAM::Geometry::LineSegment l6 ( 5, 5, 6, 4) ;
    SLAM::Geometry::LineSegment l7 ( 7, 3, 8, 1.95) ;
    SLAM::Geometry::LineSegment l8 ( 1, 4, 0, 5) ;
    SLAM::Geometry::LineSegment l9 ( 2, 5, 0, 7) ;
    bool isTrue = false;
    QList<ClusterAddTest::initWallStruct> consecutive;
    QList<ClusterAddTest::secondWallStruct> secondList;
    QList<SLAM::Geometry::LineSegment> list;
    list.append(l1);
    list.append(l2);
    list.append(l3);
    list.append(l4);
    list.append(l5);
    list.append(l6);
    list.append(l7);
    list.append(l8);
    list.append(l9);
    qDebug() << "Inizia il test, e la lista ha questo n° di elementi" << list.size() << endl;
    for (int i = 0; i < list.size(); ++i)  {
         qDebug() <<  "Se è vuota consecutive, appendo il primo." <<endl;
         if (consecutive.size() == 0) {
             qDebug() << "ciao, sono dentro il primo if, dovresti arrivare qui" <<endl;
            QList<SLAM::Geometry::LineSegment> prova;
            ClusterAddTest::initWallStruct temp = { fabs(fmod(list[i].angle() + M_PI , M_PI )), prova  };
            temp.line.append(list[i]);
            consecutive.append( temp );
            qDebug() << "ciao, sono alla fine del primo if, dovresti arrivare qui" << consecutive[0].line[0].length() <<endl;
        }
        else
        {
            isTrue = false;
            for (int j = 0; j < consecutive.size(); ++j)   {
                if (( fabs(fmod(list.at(i).angle() + M_PI, M_PI )) >= consecutive[j].angle - WALL_ANGLE_TOLERANCE) &&
                        ( fabs(fmod(list.at(i).angle() + M_PI, M_PI )) <= consecutive[j].angle + WALL_ANGLE_TOLERANCE))
                {
                    //Aggiorno l'angolo della struttura, TODO errore Qui, come gestico la struttura?
                    consecutive[j].angle = (consecutive[j].angle * consecutive[j].line.size() + fabs(fmod(list[i].angle() + M_PI, M_PI ))) /
                            (consecutive[j].line.size() + 1);
                    //Aggiungo la linea alla struttura.
                    consecutive[j].line.append(list.at(i));
                    isTrue = true;
                }
            }
            //Nessuna parete trovata = nuova parete!
            if (!isTrue) {
                QList<SLAM::Geometry::LineSegment> prova;
                ClusterAddTest::initWallStruct temp = { fabs(fmod(list[i].angle() + M_PI, M_PI )), prova  };
                temp.line.append(list[i]);
                consecutive.append( temp );
            }
        }
    }
    /*
    Come faccio? posso provare a trasformare i punti di ogni singolo subset attraverso l'angolo. A questo punto controllo
    quantizzo il tutto e ottengo degli intervalli = faccio un "istogramma". Tutti quelli che sono nella stessa colonna
    dell'istogramma saranno la stessa parete. Come step successivo ci piazzo le porte.
    Metodo migliore! ogni segmento è associato ad una retta
                    y = M * x + Q ed intercetta l'asse X in ( - Q / M ; 0 ) e l'asse Y in ( Q ; 0 ).
    Divido in cluster tutti i segmenti che hanno i due punti di intersezione vicini!
    */
    qDebug() << "Ora stampo le cose che stanno dentro la prima struttura, ovvero quelli con angolo uguale" <<endl;
    qDebug() << " la grandezza di consecutive è " << consecutive.size() <<endl;
    for (int count = 0; count < consecutive.size(); count++ )
    {
        qDebug() << "Ora stampo consecutive["<< count << "]" <<endl;
        qDebug() << "Che contiene "<<consecutive[count].line.size()<<endl;
        for(int ccc = 0; ccc <consecutive[count].line.size(); ccc++){
            qDebug() << "che contiene" << consecutive[count].line[ccc].x1()
                    << "," << consecutive[count].line[ccc].y1()
                    << " e " << consecutive[count].line[ccc].x2()
                    << "," << consecutive[count].line[ccc].y2() << endl;
        }
    }
//CI PROVO!
    for (int z = 0; z< consecutive.size(); z++)  {
        if( z != 0)
        {
            qDebug() << "Ora stampo le cose che stanno dentro la seconda struttura, ovvero quelli con M uguale" <<endl;
            qDebug() << " la grandezza di secondList è " << secondList.size() << "quando z="
                        << z << endl;
            for (int count = 0; count < secondList.size(); count++ )
            {
                qDebug() << "Ora stampo secondList["<< count << "]" <<endl;
                qDebug() << "Che contiene "<<secondList[count].line.size()<<endl;
                for(int ccc = 0; ccc <secondList[count].line.size(); ccc++){
                    qDebug() << "che contiene" << secondList[count].line[ccc].x1()
                            << "," << secondList[count].line[ccc].y1()
                            << " e " << secondList[count].line[ccc].x2()
                            << "," << secondList[count].line[ccc].y2() << endl;}}

        }
        secondList.clear();
         qDebug() << secondList.size() <<endl;
        for (int i = 0; i < consecutive[z].line.size(); ++i)  {
            //Se è vuota consecutive, appendo il primo.
            if ( secondList.size() == 0 ) {
                //TODO Sarà corretta sta roba? c'è uguale anche 30 righe sopra
                QList<SLAM::Geometry::LineSegment> altraProva;
                ClusterAddTest::secondWallStruct temp2 = {consecutive.at(z).line.at(i).m(),
                                                           consecutive.at(z).line.at(i).q(),
                                                          - consecutive.at(z).line.at(i).q() / consecutive.at(z).line.at(i).m(),
                                                          altraProva};
                temp2.line.append(consecutive[z].line[i]);
                secondList.append(temp2);
            }
            else
            {
                isTrue = false;
                for (int j = 0; j < secondList.size(); ++j)   {
                    //TODO Modifica 24 maggio 2012;
                    qDebug() << "consecutive...q() vale " << consecutive[z].line.at(i).q() <<
                                " e invece secondlist.q vale " << secondList[j].Q <<endl;
                    qDebug() << "consecutive...QM() vale " <<consecutive[z].line.at(i).q()/ consecutive[z].line.at(i).m() <<
                                " e invece secondlist.q vale " <<  secondList[j].QM <<endl;
                    if ((consecutive[z].line.at(i).q() >= secondList[j].Q - M_TOLERANCE) &&
                            (consecutive[z].line.at(i).q() <= secondList[j].Q + M_TOLERANCE) &&
                            (0 -  (consecutive[z].line.at(i).q()/ consecutive[z].line.at(i).m()) >=
                             (secondList[j].QM - QM_TOLERANCE) ) &&
                            (0 -  (consecutive[z].line.at(i).q()/ consecutive[z].line.at(i).m()) <=
                             secondList[j].QM + QM_TOLERANCE))
                    {
                        //Aggiorno l'M  e Q e QM della struttura, TODO errore Qui, come gestico la struttura?
                        secondList[j].M = (secondList[j].M * secondList[j].line.size() + consecutive[z].line.at(i).m()) /
                                (secondList[j].line.size()+1);
                        secondList[j].Q = (secondList[j].Q * secondList[j].line.size() + consecutive[z].line.at(i).q()) /
                                (secondList.at(j).line.size()+1);
                        secondList[j].QM = - secondList[j].Q / secondList[j].M ;
                        //Aggiungo la linea alla struttura.
                        secondList[j].line.append(consecutive[z].line.at(i));
                        isTrue = true;
                    }
                }
                //Nessuna parete trovata = nuova singola parete!
                if (!isTrue) {
                    QList<SLAM::Geometry::LineSegment> altraProva;
                    ClusterAddTest::secondWallStruct temp2 = {consecutive.at(z).line.at(i).m(),
                                                               consecutive.at(z).line.at(i).q(),
                                                              - consecutive.at(z).line.at(i).q() / consecutive.at(z).line.at(i).m(),
                                                              altraProva};
                    temp2.line.append(consecutive[z].line[i]);
                    secondList.append(temp2);
                }
            }
        }

        qDebug() << "ed infine, l'ultimo cluster" <<endl;
        for (int count = 0; count < secondList.size(); count++ )
        {
            qDebug() << "Ora stampo secondList["<< count << "]" <<endl;
            qDebug() << "Che contiene "<<secondList[count].line.size()<<endl;
            for(int ccc = 0; ccc <secondList[count].line.size(); ccc++){
                qDebug() << "che contiene" << secondList[count].line[ccc].x1()
                        << "," << secondList[count].line[ccc].y1()
                        << " e " << secondList[count].line[ccc].x2()
                        << "," << secondList[count].line[ccc].y2() << endl;}}
    }


}
Beispiel #20
0
int main()
{
try
  {

     symbol k("k"),q("q"),p("p"),p1("p1"),p2("p2"),p3("p3"),ms("ms"),l("l"),s("s"),m1s("m1s"),m2s("m2s"),m3s("m3s");
    symbol l1("l1"),l2("l2"),l3("l3"),l4("l4"),t("t"),p4("p4"),p5("p5"),tp("tp"),v1("v1"),v2("v2"),l5("l5");
    symbol k1("k1"),k2("k2"),k3("k3"),k4("k4"),k5("k5"),ms1("ms1"),ms2("ms2"),ms3("ms3"),ms4("ms4");
  // oneloop box
  //      UFXmap l45 = UF(lst(k),lst(pow(k,2),pow(k+p1,2),pow(k+p1+p2,2),pow(k+p1+p2+p3,2)),lst(pow(p1,2)==0,pow(p2,2)==0));
  // MBintegral root_int(l45,lst(1,1,1,1),1);

   //two loop box bubble
  // UFXmap l45 = UF(lst(k,l),lst(pow(k,2),pow(k+p1,2),pow(k+p1+p2,2),pow(l+p1+p2,2),pow(l+p1+p2+p3,2),pow(l,2),pow(k-l,2)),lst(pow(p1,2)==0,pow(p2,2)==0,pow(p3,2)==0));
  //MBintegral root_int(l45,lst(1,1,1,1,1,1,1),2);

  // B0
  //    UFXmap l45 = UF(lst(k),lst(ms-pow(k,2),ms-pow(-k,2)),lst(ms==1));
  // MBintegral root_int(l45,lst(1,1),1);

  // 2 loop sunrise
  //UFXmap l45 = UF(lst(k,q),lst(ms-pow(k,2),ms-pow(-q-k,2),ms-pow(q,2)),lst(ms==1));
  //MBintegral root_int(l45,lst(1,1,1),2);


  //RoMB_planar box2loop(lst(k,l),lst(pow(k,2),pow(k+p1,2),pow(k+p1+p2,2),pow(l+p1+p2,2),pow(l+p1+p2+p3,2),pow(l,2),pow(k-l,2)),lst(pow(p1,2)==0,pow(p2,2)==0,pow(p3,2)==0),lst(1,1,1,1,1,1,1),2);

  //  RoMB_planar  box1loop(lst(k),lst(pow(k,2),pow(k+p1,2)-ms,pow(k+p1+p2,2),pow(k+p1+p2+p3,2)),lst(pow(p1,2)==0,pow(p2,2)==0,pow(p3,2)==0,p1==0,p2==0,p3==0,ms==1),lst(1,1,1,1),1);

  //  RoMB_planar B0_1loop(lst(k),lst(pow(k,2)-ms,pow(p+k,2)-ms),lst(ms==0,pow(p,2)==1),lst(1,1),1);

  //  RoMB_planar C0_1loop(lst(k),lst(pow(k,2)-ms,pow(p1+k,2)-ms,pow(p1+p2+k,2)),lst(ms==1,pow(p1,2)==0,pow(p2,2)==0,p1*p2==50),lst(1,1,1),1);
//cout<<" new point "<<endl<<root_int.new_point()<<endl;
// cout<<" saved point "<<endl<<root_int.get_point()<<endl;
//  MBcontinue(root_int);
  //cout<<MB_lst(l45,lst(1,1,1,1),1).expand()<<endl;


  // RoMB_loop_by_loop box2loop(lst(k,l),lst(pow(k,2),pow(k+p1,2),pow(k+p1+p2,2),pow(l+p1+p2,2),pow(l+p1+p2+p3,2),pow(l,2),pow(k-l,2)),lst(pow(p1,2)==0,pow(p2,2)==0,pow(p3,2)==0),lst(1,1,1,1,1,1,1));
  //      RoMB_loop_by_loop t2(lst(k,l), lst(pow(k,2),pow(p+k,2),pow(p+k+l,2),pow(l,2),pow(k+l,2)),lst(pow(p,2)==1),lst(1,1,1,1,1));


  // works!!!
  //        RoMB_loop_by_loop sunset(lst(k,l), lst(pow(k,2)-1,pow(p-k-l,2)-4,pow(l,2)-5),lst(pow(p,2)==s),lst(1,1,1));
      
  //   RoMB_loop_by_loop sunset(lst(k,l), lst(pow(k,2)-m1s,pow(-k-l,2)-m2s,pow(l,2)-m3s),lst(pow(p,2)==s),lst(1,1,1));
  //                 sunset.integrate(lst(m1s==1,m2s==1,m3s==1,s==0),0);

    //     bubble sunset 2=loop
    //               RoMB_loop_by_loop sunset_bub(lst(k,l), lst(-pow(k,2)+ms,-pow(-k-l,2)+ms,-pow(l,2)+ms),lst(pow(p,2)==0),lst(1,1,1));
    //  sunset_bub.integrate_map(lst(ms==1,m2s==1,m3s==1,s==0),1);

    //     bubble sunset 3=loop
//#define TOPO 1
//#if TOPO==1    
/******************************************************************    
 *    FRESULT for parameters: {ms==1,m2s==1,m3s==1,s==0}
 *   
 *    FRESULT anl :           = 21.308685443306456902+23/3*eps^(-2)+2*eps^(-3)+35/2*eps^(-1)
 *    FRESULT num:           = 21.308685443306456902+(7.6666666666666666665)*eps^(-2)+(2.0)*eps^(-3)+(17.5)*eps^(-1)
 *    eps^-3 term: 2 +/- 0
 *    eps^-2 term: 23/3 +/- 0
 *    eps^-1 term: 35/2 +/- 0
 *    eps^0 term: 21.308685443306456902 +/- 0.01814768000077260732
 ***************************************************************/
//           RoMB_loop_by_loop sunset_bub(lst(p,k,l), lst(-pow(p,2)+ms,-pow(k,2)+ms,-pow(l,2)+ms,-pow(-p-k-l,2)+ms),lst(pow(l3,2)==s),lst(1,1,1,1));
//           sunset_bub.integrate_map(lst(ms==1,m2s==1,m3s==1,s==0),1);
//#elif TOPO==2
// RoMB_loop_by_loop sunset_bub_d(lst(l1,l2,l3), lst(-pow(l1,2)+ms,-pow(l2,2)+ms,-pow(l3,2)+ms,-pow(l1+l2,2)+ms,-pow(l1+l2+l3,2)+ms),lst(pow(p,2)==s),lst(1,1,1,1,1));
// sunset_bub_d.integrate_map(lst(ms==1,m2s==1,m3s==1,s==0),1);
//#elif TOPO==3
// RoMB_loop_by_loop sunset_bub_e(lst(l1,l2,l3), lst(-pow(l1,2)+ms,-pow(l2,2)+ms,-pow(l3,2)+ms,-pow(l1-l2,2)+ms,-pow(l2-l3,2)+ms,-pow(l3-l1,2)+ms),lst(pow(p,2)==s),lst(1,1,1,1,1,1));  
// sunset_bub_e.integrate_map(lst(ms==1,m2s==1,m3s==1,s==0),1);
//#endif
    //bubble 4-loop
    //            RoMB_loop_by_loop sunset_bub(lst(k,l1,l2,l3), lst(-pow(k,2)+ms,-pow(l2,2)+ms,-pow(l1,2)+ms,-pow(l3,2)+ms,-pow(k+l1+l2+l3,2)+ms),lst(pow(p,2)==s),lst(1,1,1,1,1));
    // sunset_bub.integrate(lst(ms==1,m2s==1,m3s==1,s==0),0);
#define TOPO 5
#if TOPO==1    
//bubble 5-loop
/*
FRESULT for parameters: {ms==1,m2s==1,m3s==1,s==0}

 FRESULT anl :           = 274.5475357301444122+1247/24*eps^(-3)+6/5*Pi^4+(125.67152533053854918)*eps^(-2)+3*eps^(-5)+33/2*eps^(-4)+(259.98755698571087874)*eps^(-1)-110/3*zeta(3)
  FRESULT num:           = 347.3630251884288798+(51.958333333333333332)*eps^(-3)+(125.67152533053854918)*eps^(-2)+(3.0)*eps^(-5)+(16.5)*eps^(-4)+(259.98755698571087874)*eps^(-1)
   eps^-5 term: 3 +/- 0
    eps^-4 term: 33/2 +/- 0
     eps^-3 term: 1247/24 +/- 0
      eps^-2 term: 125.67152533053854918 +/- 5.2760713655226570643E-5
       eps^-1 term: 259.98755698571087874 +/- 9.888628922902401464E-6
        eps^0 term: 274.5475357301444122+6/5*Pi^4-110/3*zeta(3) +/- 0.043609817405085687474
        
*/
     RoMB_loop_by_loop sunset_bub5(lst(l3,k,l1,l2,l4), lst(-pow(l3,2)+ms,-pow(k,2)+ms,-pow(l1,2)+ms,-pow(l2,2)+ms,-pow(l4,2)+ms,-pow(k+l1+l2+l3+l4,2)+ms),lst(pow(p,2)==s),lst(1,1,1,1,1,1));
     sunset_bub5.integrate_map(lst(ms==1,m2s==1,m3s==1,s==0),1);

#elif TOPO==2

    RoMB_loop_by_loop sunset_bubC2(lst(l1,l2,l3,l4,l5), lst(-pow(l3,2)+ms,-pow(l5,2)+ms,-pow(l1,2)+ms,-pow(l2,2)+ms,-pow(l4,2)+ms,-pow(l5+l1+l2,2)+ms,-pow(l5+l3+l4,2)+ms),lst(pow(p,2)==s),lst(1,1,1,1,1,1,1));
     sunset_bubC2.integrate_map(lst(ms==1,m2s==1,m3s==1,s==0),0);


//    RoMB_loop_by_loop sunset_bubC2(lst(l1,l2,l3,l4,l5), lst(-pow(l3,2)+ms,-pow(l5,2)+ms,-pow(l1,2)+ms,-pow(l2,2)+ms,-pow(l4,2)+ms,-pow(l3+l4+l5,2)+ms,-pow(l1+l2+l5+l3+l4,2)+ms),lst(pow(p,2)==s),lst(1,1,1,1,1,1,1));
//     sunset_bubC2.integrate_map(lst(ms==1,m2s==1,m3s==1,s==0),0);


//    RoMB_loop_by_loop sunset_bubC1(lst(l1,l2,l3,l4,l5), lst(-pow(l3,2)+ms,-pow(l5,2)+ms,-pow(l1,2)+ms,-pow(l2,2)+ms,-pow(l4,2)+ms,-pow(l2+l3+l4+l5,2)+ms,-pow(l1+l2+l5+l3+l4,2)+ms),lst(pow(p,2)==s),lst(1,1,1,1,1,1,1),true);
//     sunset_bubC1.integrate_map(lst(ms==1,m2s==1,m3s==1,s==0),0);



/*
MEGA 5-LOOP BUBBLE with 12 propagators
*/

//RoMB_loop_by_loop l5p12(lst(k5,k2,k1,k4,k3),lst(-pow(k1,2)+ms,-pow(k2,2)+ms,-pow(k3,2)+ms,-pow(k4,2)+ms,-pow(k5,2)+ms,
//-pow(k1-k3,2)+ms,-pow(k1-k4,2)+ms,-pow(k3-k2,2)+ms,-pow(k2-k4,2)+ms,-pow(k5+k3-k1,2)+ms,-pow(k5+k3-k2,2)+ms,-pow(k5+k3-k4,2)+ms),lst(pow(p,2)==0),lst(1,1,1,1,1,1,1,1,1,1,1,1));
//l5p12.integrate(lst(ms==0),0);      

#elif TOPO==3
/*
FRESULT for parameters: {ms==1}

 FRESULT anl :           = 1/5400*eps^(-2)*(-1540485.6006392892897+233937*zeta(3)-1505*Pi^4+6656*Pi^2)-1/10*(233.57451266786976057+Pi^2)*eps^(-4)-1/4*eps^(-6)+1/216000*eps^(-1)*(-7.391571256935002719E7+37697940*zeta(3)-40800*zeta(3)*Pi^2-727494*Pi^4+12801600*zeta(5)-1399535*Pi^2)-(3.7800000113486752996)*eps^(-5)+1/1200*(-100893.525326654920406+5280*zeta(3)-349*Pi^2)*eps^(-3)
  FRESULT num:           = -(465.22101564968708165)*eps^(-1)-(0.25)*eps^(-6)-(24.344411706895911919)*eps^(-4)-(3.7800000113486752996)*eps^(-5)-(81.65929734496037395)*eps^(-3)-(248.18307592543818119)*eps^(-2)
   eps^-6 term: -1/4 +/- 0
    eps^-5 term: -3.7800000113486752996 +/- 3.2541102943124789963E-10
     eps^-4 term: -23.357451266786976057-1/10*Pi^2 +/- 2.7206664064692618508E-5
      eps^-3 term: -84.07793777221243367+22/5*zeta(3)-349/1200*Pi^2 +/- 1.5019954980075151021E-4
       eps^-2 term: -285.2751112294980166+25993/600*zeta(3)-301/1080*Pi^4+832/675*Pi^2 +/- 0.00206337770109377918
        eps^-1 term: -342.20237300625012586+69811/400*zeta(3)-17/90*zeta(3)*Pi^2-121249/36000*Pi^4+889/15*zeta(5)-279907/43200*Pi^2 +/- 6.187359464224749039
        */
RoMB_loop_by_loop l5c1(lst(k2,k5,k3,k4,k1),lst(-pow(k3,2)+ms,-pow(k2,2)+ms,-pow(k1,2)+ms,-pow(k4,2)+ms,-pow(k5,2)+ms,
-pow(k1+k3+k4,2)+ms,-pow(k2+k5-k3-k4,2)+ms),lst(pow(p,2)==0),lst(1,1,1,1,1,1,1));
l5c1.integrate_map(lst(ms==1),0);      
#elif TOPO==4 // point in 2

RoMB_loop_by_loop l5c1(lst(k2,k5,k3,k4,k1),lst(-pow(k3,2)+ms,-pow(k2,2)+ms,-pow(k1,2)+ms,-pow(k4,2)+ms,-pow(k5,2)+ms,
-pow(k1+k3+k4,2)+ms,-pow(k2+k5-k3-k4,2)+ms),lst(pow(p,2)==0),lst(1,2,1,1,1,1,1));
l5c1.integrate_map(lst(ms==1),0);      

#elif TOPO==5 // point in 1

RoMB_loop_by_loop l5c1(lst(k2,k5,k3,k4,k1),lst(-pow(k3,2)+ms,-pow(k2,2)+ms,-pow(k1,2)+ms,-pow(k4,2)+ms,-pow(k5,2)+ms,
-pow(k1+k3+k4,2)+ms,-pow(k2+k5-k3-k4,2)+ms),lst(pow(p,2)==0),lst(2,1,1,1,1,1,1));
l5c1.integrate_map(lst(ms==1),0);      

#endif


    // RoMB_loop_by_loop t2loop(lst(l,k), lst(-pow(k,2)+ms,-pow(p+k,2)+ms,-pow(p+k+l,2)+ms,-pow(k+l,2)+ms,-pow(l,2)+ms),lst(pow(p,2)==s,ms==0),lst(1,1,1,1,1));
    //t2loop.integrate_map(lst(s==-1,ms == 0),3);
    
    /*     RoMB_loop_by_loop bubble_five_loop(lst(k,l1,l2,l3,l4), 
	   lst(pow(k,2)-ms,pow(l1,2)-ms,pow(l2,2)-ms,pow(l3,2)-ms,pow(l4,2)-ms,pow(k+l1,2)-ms,pow(k+l1+l2,2)-ms,pow(k+l1+l2+l3,2)-ms,pow(k+l1+l2+l3+l4,2)-ms,pow(k+l1+l2+l3,2)-ms,pow(k+l1+l2,2)-ms,pow(k+l1,2)-ms),
	   lst(ms==1),
	   lst(1,1,1,1,1,1,1,1,1,1,1,1));
    */

    // works!!!
    //             RoMB_loop_by_loop B0_1loop_lbl(lst(k),lst(pow(k,2)-2-ms,pow(p+k,2)-ms),lst(ms==0,pow(p,2)==1),lst(2,1));
    
    //     RoMB_loop_by_loop B0_1loop_lbl(lst(k),lst(pow(k,2)-m1s,pow(p+k,2)-m2s),lst(pow(p,2)==s),lst(1,1));
    //    B0_1loop_lbl.integrate(lst(s==-1,m1s==1,m2s==1));
    
    //MB works???
    //                                RoMB_loop_by_loop C0_1loop_lbl(lst(k),lst(pow(k,2),pow(k+p1,2)-m1s,pow(k-p2,2)-m2s),lst(ms==1,pow(p1,2)==m1s,pow(p2,2)==m2s,p1*p2==(s-m1s-m2s)/2),lst(1,1,1));
    //          C0_1loop_lbl.integrate(lst(m1s==1,m2s==1,s==-100));
    

  //MB works???
  
    /*
          RoMB_loop_by_loop box1loopm0(lst(k),lst(-pow(k,2),-pow(k+p1,2),-pow(k+p1+p2,2),-pow(k+p1+p2+p4,2)),
                                  lst(pow(p1,2)==0,pow(p2,2)==0,pow(p4,2)==0,
                                      p1*p2==-s/2,//
                                      
                                      p1*p4==s/2+t/2,//
                                      
                                      p2*p4==-t/2 //
                                      ),
                                       lst(1,1,1,1),false);
    box1loopm0.integrate_map(lst(s==3,t==1));
   
    box1loopm0.integrate(lst(s==5,t==2));
    */
//MASIVE BOX LBL
    /*   
    RoMB_loop_by_loop box1loopm(lst(k),lst(-pow(k,2)+ms,-pow(k+p1,2)+ms,-pow(k+p1+p2,2)+ms,-pow(k+p1+p2+p4,2)+ms),
                                    lst(pow(p1,2)==0,pow(p2,2)==0,pow(p4,2)==0,
                                       p1*p2==-s/2,//
                                        
                                      p1*p4==(s/2+t/2),//
                                        
                                        p2*p4==-t/2 //
                                        ),
                                lst(1,1,1,1),false);
        box1loopm.integrate_map(lst(ms1==1,ms2==1,ms3==1,ms4==1,ms==1,s==30,t==5));
    */

    //triple box
/*
    RoMB_loop_by_loop tribox1loopm(lst(k1,k2,k3),lst(-pow(k1,2)+ms,-pow(k1+p1,2),-pow(k1+p1+p2,2)+ms,
                                                     -pow(k1-k2,2),-pow(k2,2)+ms,-pow(k2+p1+p2,2)+ms,
                                                     -pow(k2-k3,2),-pow(k3,2)+ms,-pow(k3+p1+p2,2)+ms,
                                                     -pow(k3-p3,2)),

                                   lst(pow(p1,2)==ms,pow(p2,2)==ms,pow(p3,2)==ms,pow(p4,2)==ms,
                                       p1*p2==s/2-ms,//
                                        
                                      p1*p3==t/2-ms,//
                                        
                                       p2*p3==ms-(s+t)/2 //
                                        ),
                                   lst(1,1,1,1,1,1,1,1,1,1),true);
    tribox1loopm.integrate_map(lst(ms1==1,ms2==1,ms3==1,ms4==1,ms==1,s==-1/2,t==-3));
*/



    //double box
/*    
    RoMB_loop_by_loop dobox1loopm(lst(k1,k2),lst(-pow(k1,2),-pow(k1+p1,2),-pow(k1+p1+p2,2),
                                                     -pow(k1-k2,2),-pow(k2,2),-pow(k2+p1+p2,2),
                                                     -pow(k2-p3,2)),

                                   lst(pow(p1,2)==0,pow(p2,2)==0,pow(p3,2)==0,pow(p4,2)==0,
                                       p1*p2==s/2,//
                                        
                                      p1*p3==t/2,//
                                        
                                       p2*p3==-(s+t)/2 //
                                        ),
                                   lst(1,1,1,1,1,1,1),true);
   dobox1loopm.integrate_map(lst(ms1==1,ms2==1,ms3==1,ms4==1,ms==1,s==-1/2,t==-3));
    */
        
    /*
      4-loop  tadpole
    */

       /*
         RoMB_loop_by_loop tad4(lst(l1, l2, l3, l4),lst(-pow(l1,2)+ ms,-pow(l2,2)+ ms,-pow(l3 ,2)+ ms,-pow(l4,2),-pow(l1+l2+l3+l4,2)),lst(),lst(1,1,1,1,1));
         tad4.integrate_map(lst(ms == 1),1);

         */
    
     /*
       Pentagon
     */
  /* 
            RoMB_loop_by_loop pent(lst(k1),lst(-pow(p1 + k1,2)+ ms,-pow(p1 + p5 + k1,2),
                                        -pow(p1 + p5 + p4 + k1,2)+ ms,-pow(p1 + p5 + p4 + p3 + k1,2)+ ms,
                                        -pow(k1,2)),
                            lst(



p1*p1 == ms, p2*p2 == ms, p3*p3 == 0, p4*p4 == ms, p5*p5 == ms, 
p1*p2 == 1/2* (tp - 2* ms), p1*p3 == 1/2* (t - tp - v1), 
p1*p4 == ms - 1/2* (s + t - v1), p1*p5 == 1/2* (s - 2* ms), 
p2* p3 == 1/2* v1, p2* p4 == 1/2* (s - 2* ms - v1 - v2), 
p2* p5 == ms - 1/2* (s + tp - v2), p3* p4 == 1/2* v2, 
p3* p5 == 1/2* (tp - t - v2), p4* p5 == 1/2* (t - 2* ms)),
lst(1,1,1,1,1));
pent.integrate_map(lst(s==-2,t==-3,v2==-4,tp==-5,v1==-6,ms==1));

*/
    /*
        RoMB_loop_by_loop pent(lst(k1),lst(-pow(p1 + k1,2)+ ms,-pow(p1 + p5 + k1,2),
                                           -pow(p1 + p5 + p4 + k1,2)+ ms,-pow(p1 + p5 + p4 + p3 + k1,2)+ ms,
                                           -pow(k1,2)),
                               lst(
                                   p1*p1 == ms, 
                                   p2*p2 == ms, 
                                   p3*p3 == 0, 
                                   p4*p4 == ms, 
                                   p5*p5 == ms, 
                                   p1*p2 == 1/2* (tp - 2* ms), 
                                   wild(1)*p1*p3 == wild(1)*1/2* (t - tp - v1), 
                                   wild(2)*p1*p4 == wild(2)*(ms - 1/2* (s + t - v1)), 
                                  wild(3)* p1*p5 == wild(3)*1/2* (s - 2* ms), 
                                   wild(4)*p2* p3 == wild(4)*1/2* v1, 
                                   wild(5)*p2* p4 == wild(5)*1/2* (s - 2* ms - v1 - v2), 
                                   wild(6)*p2* p5 ==wild(6)*( ms - 1/2* (s + tp - v2)), 
                                   wild(7)*p3* p4 == wild(7)*1/2* v2, 
                                   wild(8)*p3* p5 == wild(8)*1/2* (tp - t - v2), 
                                   wild()*p4* p5 == wild()*1/2* (t - 2* ms)),
                               lst(1,1,1,1,1));
        pent.integrate_map(lst(s==-2,t==-3,v2==-4,tp==-5,v1==-6,ms==1));
       
        */
  }
  catch(std::exception &p)
    {
      std::cerr<<"******************************************************************"<<endl;
      std::cerr<<"   >>>ERROR:  "<<p.what()<<endl;
      std::cerr<<"******************************************************************"<<endl;
      return 1;
    }
  return 0;
}
Beispiel #21
0
static double lobatto_fn_5(double x) { return l5(x); }
Beispiel #22
0
int main (int, char**)
{
  UnitTest t (1208);

  std::vector <std::pair <std::string, Lexer::Type>> tokens;
  std::string token;
  Lexer::Type type;

  // Feed in some attributes and types, so that the Lexer knows what a DOM
  // reference is.
  Lexer::attributes["due"]         = "date";
  Lexer::attributes["tags"]        = "string";
  Lexer::attributes["description"] = "string";

  // White space detection.
  t.notok (Lexer::isWhitespace (0x0041), "U+0041 (A) ! isWhitespace");
  t.ok (Lexer::isWhitespace (0x0020), "U+0020 isWhitespace");
  t.ok (Lexer::isWhitespace (0x0009), "U+0009 isWhitespace");
  t.ok (Lexer::isWhitespace (0x000A), "U+000A isWhitespace");
  t.ok (Lexer::isWhitespace (0x000B), "U+000B isWhitespace");
  t.ok (Lexer::isWhitespace (0x000C), "U+000C isWhitespace");
  t.ok (Lexer::isWhitespace (0x000D), "U+000D isWhitespace");
  t.ok (Lexer::isWhitespace (0x0085), "U+0085 isWhitespace");
  t.ok (Lexer::isWhitespace (0x00A0), "U+00A0 isWhitespace");
  t.ok (Lexer::isWhitespace (0x1680), "U+1680 isWhitespace"); // 10
  t.ok (Lexer::isWhitespace (0x180E), "U+180E isWhitespace");
  t.ok (Lexer::isWhitespace (0x2000), "U+2000 isWhitespace");
  t.ok (Lexer::isWhitespace (0x2001), "U+2001 isWhitespace");
  t.ok (Lexer::isWhitespace (0x2002), "U+2002 isWhitespace");
  t.ok (Lexer::isWhitespace (0x2003), "U+2003 isWhitespace");
  t.ok (Lexer::isWhitespace (0x2004), "U+2004 isWhitespace");
  t.ok (Lexer::isWhitespace (0x2005), "U+2005 isWhitespace");
  t.ok (Lexer::isWhitespace (0x2006), "U+2006 isWhitespace");
  t.ok (Lexer::isWhitespace (0x2007), "U+2007 isWhitespace");
  t.ok (Lexer::isWhitespace (0x2008), "U+2008 isWhitespace"); // 20
  t.ok (Lexer::isWhitespace (0x2009), "U+2009 isWhitespace");
  t.ok (Lexer::isWhitespace (0x200A), "U+200A isWhitespace");
  t.ok (Lexer::isWhitespace (0x2028), "U+2028 isWhitespace");
  t.ok (Lexer::isWhitespace (0x2029), "U+2029 isWhitespace");
  t.ok (Lexer::isWhitespace (0x202F), "U+202F isWhitespace");
  t.ok (Lexer::isWhitespace (0x205F), "U+205F isWhitespace");
  t.ok (Lexer::isWhitespace (0x3000), "U+3000 isWhitespace");

  // static bool Lexer::isBoundary (int, int);
  t.ok    (Lexer::isBoundary (' ', 'a'), "' ' --> 'a' = isBoundary");
  t.ok    (Lexer::isBoundary ('a', ' '), "'a' --> ' ' = isBoundary");
  t.ok    (Lexer::isBoundary (' ', '+'), "' ' --> '+' = isBoundary");
  t.ok    (Lexer::isBoundary (' ', ','), "' ' --> ',' = isBoundary");
  t.notok (Lexer::isBoundary ('3', '4'), "'3' --> '4' = isBoundary");
  t.ok    (Lexer::isBoundary ('(', '('), "'(' --> '(' = isBoundary");
  t.notok (Lexer::isBoundary ('r', 'd'), "'r' --> 'd' = isBoundary");

  // static bool Lexer::wasQuoted (const std::string&);
  t.notok (Lexer::wasQuoted (""),        "'' --> !wasQuoted");
  t.notok (Lexer::wasQuoted ("foo"),     "'foo' --> !wasQuoted");
  t.ok    (Lexer::wasQuoted ("a b"),     "'a b' --> wasQuoted");
  t.ok    (Lexer::wasQuoted ("(a)"),     "'(a)' --> wasQuoted");

  // static bool Lexer::dequote (std::string&, const std::string& quotes = "'\"");
  token = "foo";
  Lexer::dequote (token);
  t.is (token, "foo", "dequote foo --> foo");

  token = "'foo'";
  Lexer::dequote (token);
  t.is (token, "foo", "dequote 'foo' --> foo");

  token = "'o\\'clock'";
  Lexer::dequote (token);
  t.is (token, "o\\'clock", "dequote 'o\\'clock' --> o\\'clock");

  token = "abba";
  Lexer::dequote (token, "a");
  t.is (token, "bb", "dequote 'abba' (a) --> bb");

  // Should result in no tokens.
  Lexer l0 ("");
  t.notok (l0.token (token, type), "'' --> no tokens");

  // Should result in no tokens.
  Lexer l1 ("       \t ");
  t.notok (l1.token (token, type), "'       \\t ' --> no tokens");

  // \u20ac = Euro symbol.
  Lexer l2 (" one 'two \\'three\\''+456-(1.3*2 - 0x12) 1.2e-3.4    foo.bar and '\\u20ac'");

  tokens.clear ();
  while (l2.token (token, type))
  {
    std::cout << "# «" << token << "» " << Lexer::typeName (type) << "\n";
    tokens.push_back (std::pair <std::string, Lexer::Type> (token, type));
  }

  t.is (tokens[0].first,                     "one",           "tokens[0] = 'one'"); // 30
  t.is (Lexer::typeName (tokens[0].second),  "identifier",    "tokens[0] = identifier");
  t.is (tokens[1].first,                     "'two 'three''", "tokens[1] = 'two 'three''");
  t.is (Lexer::typeName (tokens[1].second),  "string",        "tokens[1] = string");
  t.is (tokens[2].first,                     "+",             "tokens[2] = '+'");
  t.is (Lexer::typeName (tokens[2].second),  "op",            "tokens[2] = op");
  t.is (tokens[3].first,                     "456",           "tokens[3] = '456'");
  t.is (Lexer::typeName (tokens[3].second),  "number",        "tokens[3] = number");
  t.is (tokens[4].first,                     "-",             "tokens[4] = '-'");
  t.is (Lexer::typeName (tokens[4].second),  "op",            "tokens[4] = op");
  t.is (tokens[5].first,                     "(",             "tokens[5] = '('"); // 40
  t.is (Lexer::typeName (tokens[5].second),  "op",            "tokens[5] = op");
  t.is (tokens[6].first,                     "1.3",           "tokens[6] = '1.3'");
  t.is (Lexer::typeName (tokens[6].second),  "number",        "tokens[6] = number");
  t.is (tokens[7].first,                     "*",             "tokens[7] = '*'");
  t.is (Lexer::typeName (tokens[7].second),  "op",            "tokens[7] = op");
  t.is (tokens[8].first,                     "2",             "tokens[8] = '2'");
  t.is (Lexer::typeName (tokens[8].second),  "number",        "tokens[8] = number");
  t.is (tokens[9].first,                     "-",             "tokens[9] = '-'");
  t.is (Lexer::typeName (tokens[9].second),  "op",            "tokens[9] = op");
  t.is (tokens[10].first,                    "0x12",          "tokens[10] = '0x12'"); // 50
  t.is (Lexer::typeName (tokens[10].second), "hex",           "tokens[10] = hex");
  t.is (tokens[11].first,                    ")",             "tokens[11] = ')'");
  t.is (Lexer::typeName (tokens[11].second), "op",            "tokens[11] = op");
  t.is (tokens[12].first,                    "1.2e-3.4",      "tokens[12] = '1.2e-3.4'");
  t.is (Lexer::typeName (tokens[12].second), "number",        "tokens[12] = number");
  t.is (tokens[13].first,                    "foo.bar",       "tokens[13] = 'foo.bar'");
  t.is (Lexer::typeName (tokens[13].second), "identifier",    "tokens[13] = identifier");
  t.is (tokens[14].first,                    "and",           "tokens[14] = 'and'"); // 60
  t.is (Lexer::typeName (tokens[14].second), "op",            "tokens[14] = op");
  t.is (tokens[15].first,                    "'€'",           "tokens[15] = \\u20ac --> ''€''");
  t.is (Lexer::typeName (tokens[15].second), "string",        "tokens[15] = string");

  // Test for numbers that are no longer ISO-8601 dates.
  Lexer l3 ("1 12 123 1234 12345 123456 1234567");
  tokens.clear ();
  while (l3.token (token, type))
  {
    std::cout << "# «" << token << "» " << Lexer::typeName (type) << "\n";
    tokens.push_back (std::pair <std::string, Lexer::Type> (token, type));
  }

  t.is ((int)tokens.size (),     7,                         "7 tokens");
  t.is (tokens[0].first,         "1",                       "tokens[0] == '1'");
  t.is ((int) tokens[0].second,  (int) Lexer::Type::number, "tokens[0] == Type::number");
  t.is (tokens[1].first,         "12",                      "tokens[1] == '12'");
  t.is ((int) tokens[1].second,  (int) Lexer::Type::number, "tokens[1] == Type::date");
  t.is (tokens[2].first,         "123",                     "tokens[2] == '123'");
  t.is ((int) tokens[2].second,  (int) Lexer::Type::number, "tokens[2] == Type::number"); // 70
  t.is (tokens[3].first,         "1234",                    "tokens[3] == '1234'");
  t.is ((int) tokens[3].second,  (int) Lexer::Type::number, "tokens[3] == Type::date");
  t.is (tokens[4].first,         "12345",                   "tokens[4] == '12345'");
  t.is ((int) tokens[4].second,  (int) Lexer::Type::number, "tokens[4] == Type::number");
  t.is (tokens[5].first,         "123456",                  "tokens[5] == '123456'");
  t.is ((int) tokens[5].second,  (int) Lexer::Type::number, "tokens[5] == Type::date");
  t.is (tokens[6].first,         "1234567",                 "tokens[6] == '1234567'");
  t.is ((int) tokens[6].second,  (int) Lexer::Type::number, "tokens[6] == Type::number");

  // void split (std::vector<std::string>&, const std::string&);
  std::string unsplit = " ( A or B ) ";
  std::vector <std::string> items;
  items = Lexer::split (unsplit);
  t.is (items.size (), (size_t) 5, "split ' ( A or B ) '");
  t.is (items[0], "(",             "split ' ( A or B ) ' -> [0] '('");
  t.is (items[1], "A",             "split ' ( A or B ) ' -> [1] 'A'");
  t.is (items[2], "or",            "split ' ( A or B ) ' -> [2] 'or'");
  t.is (items[3], "B",             "split ' ( A or B ) ' -> [3] 'B'");
  t.is (items[4], ")",             "split ' ( A or B ) ' -> [4] ')'");

  // Test simple mode with contrived tokens that ordinarily split.
  unsplit = "  +-* a+b 12.3e4 'c d'";
  items = Lexer::split (unsplit);
  t.is (items.size (), (size_t) 8, "split '  +-* a+b 12.3e4 'c d''");
  t.is (items[0], "+",             "split '  +-* a+b 12.3e4 'c d'' -> [0] '+'");
  t.is (items[1], "-",             "split '  +-* a+b 12.3e4 'c d'' -> [1] '-'");
  t.is (items[2], "*",             "split '  +-* a+b 12.3e4 'c d'' -> [2] '*'");
  t.is (items[3], "a",             "split '  +-* a+b 12.3e4 'c d'' -> [3] 'a'");
  t.is (items[4], "+",             "split '  +-* a+b 12.3e4 'c d'' -> [4] '+'");
  t.is (items[5], "b",             "split '  +-* a+b 12.3e4 'c d'' -> [5] 'b'");
  t.is (items[6], "12.3e4",        "split '  +-* a+b 12.3e4 'c d'' -> [6] '12.3e4'");
  t.is (items[7], "'c d'",         "split '  +-* a+b 12.3e4 'c d'' -> [7] ''c d''");

  // static bool decomposePair (const std::string&, std::string&, std::string&, std::string&, std::string&);
  // 2 * 4 * 2 * 5 = 80 tests.
  std::string outName, outMod, outValue, outSep;
  for (auto& name : {"name"})
  {
    for (auto& mod : {"", "mod"})
    {
      for (auto& sep : {":", "=", "::", ":="})
      {
        for (auto& value : {"", "value", "a:b", "a::b", "a=b", "a:=b"})
        {
          std::string input = std::string ("name") + (strlen (mod) ? "." : "") + mod + sep + value;
          t.ok (Lexer::decomposePair (input, outName, outMod, outSep, outValue), "decomposePair '" + input + "' --> true");
          t.is (name,  outName,  "  '" + input + "' --> name '"  + name  + "'");
          t.is (mod,   outMod,   "  '" + input + "' --> mod '"   + mod   + "'");
          t.is (value, outValue, "  '" + input + "' --> value '" + value + "'");
          t.is (sep,   outSep,   "  '" + input + "' --> sep '"   + sep   + "'");
        }
      }
    }
  }

  // static bool readWord (const std::string&, const std::string&, std::string::size_type&, std::string&);
  std::string::size_type cursor = 0;
  std::string word;
  t.ok (Lexer::readWord ("'one two'", "'\"", cursor, word), "readWord ''one two'' --> true");
  t.is (word, "'one two'",                                  "  word '" + word + "'");
  t.is ((int)cursor, 9,                                     "  cursor");

  // Unterminated quoted string is invalid.
  cursor = 0;
  t.notok (Lexer::readWord ("'one", "'\"", cursor, word),   "readWord ''one' --> false");

  // static bool readWord (const std::string&, std::string::size_type&, std::string&);
  cursor = 0;
  t.ok (Lexer::readWord ("input", cursor, word),            "readWord 'input' --> true");
  t.is (word, "input",                                      "  word '" + word + "'");
  t.is ((int)cursor, 5,                                     "  cursor");

  cursor = 0;
  t.ok (Lexer::readWord ("one\\ two", cursor, word),        "readWord 'one\\ two' --> true");
  t.is (word, "one two",                                    "  word '" + word + "'");
  t.is ((int)cursor, 8,                                     "  cursor");

  cursor = 0;
  t.ok (Lexer::readWord ("\\u20A43", cursor, word),         "readWord '\\u20A43' --> true");
  t.is (word, "₤3",                                         "  word '" + word + "'");
  t.is ((int)cursor, 7,                                     "  cursor");

  cursor = 0;
  t.ok (Lexer::readWord ("U+20AC4", cursor, word),          "readWord '\\u20AC4' --> true");
  t.is (word, "€4",                                         "  word '" + word + "'");
  t.is ((int)cursor, 7,                                     "  cursor");

  std::string text = "one 'two' three\\ four";
  cursor = 0;
  t.ok (Lexer::readWord (text, cursor, word),               "readWord \"one 'two' three\\ four\" --> true");
  t.is (word, "one",                                        "  word '" + word + "'");
  cursor++;
  t.ok (Lexer::readWord (text, cursor, word),               "readWord \"one 'two' three\\ four\" --> true");
  t.is (word, "'two'",                                      "  word '" + word + "'");
  cursor++;
  t.ok (Lexer::readWord (text, cursor, word),               "readWord \"one 'two' three\\ four\" --> true");
  t.is (word, "three four",                                 "  word '" + word + "'");

  text = "one     ";
  cursor = 0;
  t.ok (Lexer::readWord (text, cursor, word),               "readWord \"one     \" --> true");
  t.is (word, "one",                                        "  word '" + word + "'");

  // bool isLiteral (const std::string&, bool, bool);
  Lexer l4 ("one.two");
  t.notok (l4.isLiteral("zero", false, false),              "isLiteral 'one.two' --> false");
  t.ok    (l4.isLiteral("one",  false, false),              "isLiteral 'one.two' --> 'one'");
  t.ok    (l4.isLiteral(".",    false, false),              "isLiteral 'one.two' --> '.'");
  t.ok    (l4.isLiteral("two",  false, true),               "isLiteral 'one.two' --> 'two'");

  Lexer l5 ("wonder");
  t.notok (l5.isLiteral ("wonderful", false, false),        "isLiteral 'wonderful' != 'wonder' without abbreviation");
  t.ok    (l5.isLiteral ("wonderful", true,  false),        "isLiteral 'wonderful' == 'wonder' with abbreviation");

  // bool isOneOf (const std::string&, bool, bool);
  Lexer l6 ("Grumpy.");
  std::vector <std::string> dwarves = {"Sneezy", "Doc", "Bashful", "Grumpy", "Happy", "Sleepy", "Dopey"};
  t.notok (l6.isOneOf (dwarves, false, true),               "isOneof ('Grumpy', true) --> false");
  t.ok    (l6.isOneOf (dwarves, false, false),              "isOneOf ('Grumpy', false) --> true");

  // static std::string::size_type commonLength (const std::string&, const std::string&);
  t.is ((int)Lexer::commonLength ("", ""),           0, "commonLength '' : '' --> 0");
  t.is ((int)Lexer::commonLength ("a", "a"),         1, "commonLength 'a' : 'a' --> 1");
  t.is ((int)Lexer::commonLength ("abcde", "abcde"), 5, "commonLength 'abcde' : 'abcde' --> 5");
  t.is ((int)Lexer::commonLength ("abc", ""),        0, "commonLength 'abc' : '' --> 0");
  t.is ((int)Lexer::commonLength ("abc", "def"),     0, "commonLength 'abc' : 'def' --> 0");
  t.is ((int)Lexer::commonLength ("foobar", "foo"),  3, "commonLength 'foobar' : 'foo' --> 3");
  t.is ((int)Lexer::commonLength ("foo", "foobar"),  3, "commonLength 'foo' : 'foobar' --> 3");

  // static std::string::size_type commonLength (const std::string&, std::string::size_type, const std::string&, std::string::size_type);
  t.is ((int)Lexer::commonLength ("wonder", 0, "prowonderbread", 3), 6, "'wonder'+0 : 'prowonderbread'+3 --> 6");

  // Test all Lexer types.
  #define NO {"",Lexer::Type::word}
  struct
  {
    const char* input;
    struct
    {
      const char* token;
      Lexer::Type type;
    } results[5];
  } lexerTests[] =
  {
    // Pattern
    { "/foo/",                                        { { "/foo/",                                        Lexer::Type::pattern      }, NO, NO, NO, NO }, },
    { "/a\\/b/",                                      { { "/a\\/b/",                                      Lexer::Type::pattern      }, NO, NO, NO, NO }, },
    { "/'/",                                          { { "/'/",                                          Lexer::Type::pattern      }, NO, NO, NO, NO }, },

    // Substitution
    { "/from/to/g",                                   { { "/from/to/g",                                   Lexer::Type::substitution }, NO, NO, NO, NO }, },
    { "/from/to/",                                    { { "/from/to/",                                    Lexer::Type::substitution }, NO, NO, NO, NO }, },

    // Tag
    { "+tag",                                         { { "+tag",                                         Lexer::Type::tag          }, NO, NO, NO, NO }, },
    { "-tag",                                         { { "-tag",                                         Lexer::Type::tag          }, NO, NO, NO, NO }, },
    { "+@tag",                                        { { "+@tag",                                        Lexer::Type::tag          }, NO, NO, NO, NO }, },

    // Path
    { "/long/path/to/file.txt",                       { { "/long/path/to/file.txt",                       Lexer::Type::path         }, NO, NO, NO, NO }, },

    // Word
    { "1.foo.bar",                                    { { "1.foo.bar",                                    Lexer::Type::word         }, NO, NO, NO, NO }, },

    // Identifier
    { "foo",                                          { { "foo",                                          Lexer::Type::identifier   }, NO, NO, NO, NO }, },
    { "Çirçös",                                       { { "Çirçös",                                       Lexer::Type::identifier   }, NO, NO, NO, NO }, },
    { "☺",                                            { { "☺",                                            Lexer::Type::identifier   }, NO, NO, NO, NO }, },
    { "name",                                         { { "name",                                         Lexer::Type::identifier   }, NO, NO, NO, NO }, },
    { "f1",                                           { { "f1",                                           Lexer::Type::identifier   }, NO, NO, NO, NO }, },
    { "foo.bar",                                      { { "foo.bar",                                      Lexer::Type::identifier   }, NO, NO, NO, NO }, },
    { "a1a1a1a1_a1a1_a1a1_a1a1_a1a1a1a1a1a1",         { { "a1a1a1a1_a1a1_a1a1_a1a1_a1a1a1a1a1a1",         Lexer::Type::identifier   }, NO, NO, NO, NO }, },

    // Word that starts wih 'or', which is an operator, but should be ignored.
    { "ordinary",                                     { { "ordinary",                                     Lexer::Type::identifier   }, NO, NO, NO, NO }, },

    // DOM
    { "due",                                          { { "due",                                          Lexer::Type::dom          }, NO, NO, NO, NO }, },
    { "123.tags",                                     { { "123.tags",                                     Lexer::Type::dom          }, NO, NO, NO, NO }, },
    { "123.tags.PENDING",                             { { "123.tags.PENDING",                             Lexer::Type::dom          }, NO, NO, NO, NO }, },
    { "123.description",                              { { "123.description",                              Lexer::Type::dom          }, NO, NO, NO, NO }, },
    { "123.annotations.1.description",                { { "123.annotations.1.description",                Lexer::Type::dom          }, NO, NO, NO, NO }, },
    { "123.annotations.1.entry",                      { { "123.annotations.1.entry",                      Lexer::Type::dom          }, NO, NO, NO, NO }, },
    { "123.annotations.1.entry.year",                 { { "123.annotations.1.entry.year",                 Lexer::Type::dom          }, NO, NO, NO, NO }, },
    { "a360fc44-315c-4366-b70c-ea7e7520b749.due",     { { "a360fc44-315c-4366-b70c-ea7e7520b749.due",     Lexer::Type::dom          }, NO, NO, NO, NO }, },
    { "12345678-1234-1234-1234-123456789012.due",     { { "12345678-1234-1234-1234-123456789012.due",     Lexer::Type::dom          }, NO, NO, NO, NO }, },
    { "system.os",                                    { { "system.os",                                    Lexer::Type::dom          }, NO, NO, NO, NO }, },
    { "rc.foo",                                       { { "rc.foo",                                       Lexer::Type::dom          }, NO, NO, NO, NO }, },

    // URL
    { "http://tasktools.org",                         { { "http://tasktools.org",                         Lexer::Type::url          }, NO, NO, NO, NO }, },
    { "https://bug.tasktools.org",                    { { "https://bug.tasktools.org",                    Lexer::Type::url          }, NO, NO, NO, NO }, },

    // String
    { "'one two'",                                    { { "'one two'",                                    Lexer::Type::string       }, NO, NO, NO, NO }, },
    { "\"three\"",                                    { { "\"three\"",                                    Lexer::Type::string       }, NO, NO, NO, NO }, },
    { "'\\''",                                        { { "'''",                                          Lexer::Type::string       }, NO, NO, NO, NO }, },
    { "\"\\\"\"",                                     { { "\"\"\"",                                       Lexer::Type::string       }, NO, NO, NO, NO }, },
    { "\"\tfoo\t\"",                                  { { "\"\tfoo\t\"",                                  Lexer::Type::string       }, NO, NO, NO, NO }, },
    { "\"\\u20A43\"",                                 { { "\"₤3\"",                                       Lexer::Type::string       }, NO, NO, NO, NO }, },
    { "\"U+20AC4\"",                                  { { "\"€4\"",                                       Lexer::Type::string       }, NO, NO, NO, NO }, },

    // Number
    { "1",                                            { { "1",                                            Lexer::Type::number       }, NO, NO, NO, NO }, },
    { "3.14",                                         { { "3.14",                                         Lexer::Type::number       }, NO, NO, NO, NO }, },
    { "6.02217e23",                                   { { "6.02217e23",                                   Lexer::Type::number       }, NO, NO, NO, NO }, },
    { "1.2e-3.4",                                     { { "1.2e-3.4",                                     Lexer::Type::number       }, NO, NO, NO, NO }, },
    { "0x2f",                                         { { "0x2f",                                         Lexer::Type::hex          }, NO, NO, NO, NO }, },

    // Set (1,2,4-7,9)
    { "1,2",                                          { { "1,2",                                          Lexer::Type::set          }, NO, NO, NO, NO }, },
    { "1-2",                                          { { "1-2",                                          Lexer::Type::set          }, NO, NO, NO, NO }, },
    { "1-2,4",                                        { { "1-2,4",                                        Lexer::Type::set          }, NO, NO, NO, NO }, },
    { "1-2,4,6-8",                                    { { "1-2,4,6-8",                                    Lexer::Type::set          }, NO, NO, NO, NO }, },
    { "1-2,4,6-8,10-12",                              { { "1-2,4,6-8,10-12",                              Lexer::Type::set          }, NO, NO, NO, NO }, },

    // Pair
    { "name:value",                                   { { "name:value",                                   Lexer::Type::pair         }, NO, NO, NO, NO }, },
    { "name=value",                                   { { "name=value",                                   Lexer::Type::pair         }, NO, NO, NO, NO }, },
    { "name:=value",                                  { { "name:=value",                                  Lexer::Type::pair         }, NO, NO, NO, NO }, },
    { "name.mod:value",                               { { "name.mod:value",                               Lexer::Type::pair         }, NO, NO, NO, NO }, },
    { "name.mod=value",                               { { "name.mod=value",                               Lexer::Type::pair         }, NO, NO, NO, NO }, },
    { "name:",                                        { { "name:",                                        Lexer::Type::pair         }, NO, NO, NO, NO }, },
    { "name=",                                        { { "name=",                                        Lexer::Type::pair         }, NO, NO, NO, NO }, },
    { "name.mod:",                                    { { "name.mod:",                                    Lexer::Type::pair         }, NO, NO, NO, NO }, },
    { "name.mod=",                                    { { "name.mod=",                                    Lexer::Type::pair         }, NO, NO, NO, NO }, },
    { "pro:'P 1'",                                    { { "pro:'P 1'",                                    Lexer::Type::pair         }, NO, NO, NO, NO }, },
    { "rc:x",                                         { { "rc:x",                                         Lexer::Type::pair         }, NO, NO, NO, NO }, },
    { "rc.name:value",                                { { "rc.name:value",                                Lexer::Type::pair         }, NO, NO, NO, NO }, },
    { "rc.name=value",                                { { "rc.name=value",                                Lexer::Type::pair         }, NO, NO, NO, NO }, },
    { "rc.name:=value",                               { { "rc.name:=value",                               Lexer::Type::pair         }, NO, NO, NO, NO }, },
    { "due:='eow - 2d'",                              { { "due:='eow - 2d'",                              Lexer::Type::pair         }, NO, NO, NO, NO }, },

    // Operator - complete set
    { "^",                                            { { "^",                                            Lexer::Type::op           }, NO, NO, NO, NO }, },
    { "!",                                            { { "!",                                            Lexer::Type::op           }, NO, NO, NO, NO }, },
    { "_neg_",                                        { { "_neg_",                                        Lexer::Type::op           }, NO, NO, NO, NO }, },
    { "_pos_",                                        { { "_pos_",                                        Lexer::Type::op           }, NO, NO, NO, NO }, },
    { "_hastag_",                                     { { "_hastag_",                                     Lexer::Type::op           }, NO, NO, NO, NO }, },
    { "_notag_",                                      { { "_notag_",                                      Lexer::Type::op           }, NO, NO, NO, NO }, },
    { "*",                                            { { "*",                                            Lexer::Type::op           }, NO, NO, NO, NO }, },
    { "/",                                            { { "/",                                            Lexer::Type::op           }, NO, NO, NO, NO }, },
    { "%",                                            { { "%",                                            Lexer::Type::op           }, NO, NO, NO, NO }, },
    { "+",                                            { { "+",                                            Lexer::Type::op           }, NO, NO, NO, NO }, },
    { "-",                                            { { "-",                                            Lexer::Type::op           }, NO, NO, NO, NO }, },
    { "<=",                                           { { "<=",                                           Lexer::Type::op           }, NO, NO, NO, NO }, },
    { ">=",                                           { { ">=",                                           Lexer::Type::op           }, NO, NO, NO, NO }, },
    { ">",                                            { { ">",                                            Lexer::Type::op           }, NO, NO, NO, NO }, },
    { "<",                                            { { "<",                                            Lexer::Type::op           }, NO, NO, NO, NO }, },
    { "=",                                            { { "=",                                            Lexer::Type::op           }, NO, NO, NO, NO }, },
    { "==",                                           { { "==",                                           Lexer::Type::op           }, NO, NO, NO, NO }, },
    { "!=",                                           { { "!=",                                           Lexer::Type::op           }, NO, NO, NO, NO }, },
    { "!==",                                          { { "!==",                                          Lexer::Type::op           }, NO, NO, NO, NO }, },
    { "~",                                            { { "~",                                            Lexer::Type::op           }, NO, NO, NO, NO }, },
    { "!~",                                           { { "!~",                                           Lexer::Type::op           }, NO, NO, NO, NO }, },
    { "and",                                          { { "and",                                          Lexer::Type::op           }, NO, NO, NO, NO }, },
    { "or",                                           { { "or",                                           Lexer::Type::op           }, NO, NO, NO, NO }, },
    { "xor",                                          { { "xor",                                          Lexer::Type::op           }, NO, NO, NO, NO }, },
    { "(",                                            { { "(",                                            Lexer::Type::op           }, NO, NO, NO, NO }, },
    { ")",                                            { { ")",                                            Lexer::Type::op           }, NO, NO, NO, NO }, },

    // UUID
    { "ffffffff-ffff-ffff-ffff-ffffffffffff",         { { "ffffffff-ffff-ffff-ffff-ffffffffffff",         Lexer::Type::uuid         }, NO, NO, NO, NO }, },
    { "00000000-0000-0000-0000-0000000",              { { "00000000-0000-0000-0000-0000000",              Lexer::Type::uuid         }, NO, NO, NO, NO }, },
    { "00000000-0000-0000-0000",                      { { "00000000-0000-0000-0000",                      Lexer::Type::uuid         }, NO, NO, NO, NO }, },
    { "00000000-0000-0000",                           { { "00000000-0000-0000",                           Lexer::Type::uuid         }, NO, NO, NO, NO }, },
    { "00000000-0000",                                { { "00000000-0000",                                Lexer::Type::uuid         }, NO, NO, NO, NO }, },
    { "00000000",                                     { { "00000000",                                     Lexer::Type::uuid         }, NO, NO, NO, NO }, },
    { "a360fc44-315c-4366-b70c-ea7e7520b749",         { { "a360fc44-315c-4366-b70c-ea7e7520b749",         Lexer::Type::uuid         }, NO, NO, NO, NO }, },
    { "a360fc44-315c-4366-b70c-ea7e752",              { { "a360fc44-315c-4366-b70c-ea7e752",              Lexer::Type::uuid         }, NO, NO, NO, NO }, },
    { "a360fc44-315c-4366-b70c",                      { { "a360fc44-315c-4366-b70c",                      Lexer::Type::uuid         }, NO, NO, NO, NO }, },
    { "a360fc44-315c-4366",                           { { "a360fc44-315c-4366",                           Lexer::Type::uuid         }, NO, NO, NO, NO }, },
    { "a360fc44-315c",                                { { "a360fc44-315c",                                Lexer::Type::uuid         }, NO, NO, NO, NO }, },
    { "a360fc44",                                     { { "a360fc44",                                     Lexer::Type::uuid         }, NO, NO, NO, NO }, },

    // Date
    { "2015-W01",                                     { { "2015-W01",                                     Lexer::Type::date         }, NO, NO, NO, NO }, },
    { "2015-02-17",                                   { { "2015-02-17",                                   Lexer::Type::date         }, NO, NO, NO, NO }, },
    { "2013-11-29T22:58:00Z",                         { { "2013-11-29T22:58:00Z",                         Lexer::Type::date         }, NO, NO, NO, NO }, },
    { "20131129T225800Z",                             { { "20131129T225800Z",                             Lexer::Type::date         }, NO, NO, NO, NO }, },
    { "9th",                                          { { "9th",                                          Lexer::Type::date         }, NO, NO, NO, NO }, },
    { "10th",                                         { { "10th",                                         Lexer::Type::date         }, NO, NO, NO, NO }, },
    { "today",                                        { { "today",                                        Lexer::Type::date         }, NO, NO, NO, NO }, },

    // Duration
    { "year",                                         { { "year",                                         Lexer::Type::duration     }, NO, NO, NO, NO }, },
    { "4weeks",                                       { { "4weeks",                                       Lexer::Type::duration     }, NO, NO, NO, NO }, },
    { "PT23H",                                        { { "PT23H",                                        Lexer::Type::duration     }, NO, NO, NO, NO }, },
    { "1second",                                      { { "1second",                                      Lexer::Type::duration     }, NO, NO, NO, NO }, },
    { "1s",                                           { { "1s",                                           Lexer::Type::duration     }, NO, NO, NO, NO }, },
    { "1minute",                                      { { "1minute",                                      Lexer::Type::duration     }, NO, NO, NO, NO }, },
    { "2hour",                                        { { "2hour",                                        Lexer::Type::duration     }, NO, NO, NO, NO }, },
    { "3 days",                                       { { "3 days",                                       Lexer::Type::duration     }, NO, NO, NO, NO }, },
    { "4w",                                           { { "4w",                                           Lexer::Type::duration     }, NO, NO, NO, NO }, },
    { "5mo",                                          { { "5mo",                                          Lexer::Type::duration     }, NO, NO, NO, NO }, },
    { "6 years",                                      { { "6 years",                                      Lexer::Type::duration     }, NO, NO, NO, NO }, },
    { "P1Y",                                          { { "P1Y",                                          Lexer::Type::duration     }, NO, NO, NO, NO }, },
    { "PT1H",                                         { { "PT1H",                                         Lexer::Type::duration     }, NO, NO, NO, NO }, },
    { "P1Y1M1DT1H1M1S",                               { { "P1Y1M1DT1H1M1S",                               Lexer::Type::duration     }, NO, NO, NO, NO }, },

    // Misc
    { "--",                                           { { "--",                                           Lexer::Type::separator    }, NO, NO, NO, NO }, },

    // Expression
    //   due:eom-2w
    //   due < eom + 1w + 1d
    //   ( /pattern/ or 8ad2e3db-914d-4832-b0e6-72fa04f6e331,3b6218f9-726a-44fc-aa63-889ff52be442 )
    { "(1+2)",                                        { { "(",                                            Lexer::Type::op           },
                                                        { "1",                                            Lexer::Type::number       },
                                                        { "+",                                            Lexer::Type::op           },
                                                        { "2",                                            Lexer::Type::number       },
                                                        { ")",                                            Lexer::Type::op           },                }, },
    { "description~pattern",                          { { "description",                                  Lexer::Type::dom          },
                                                        { "~",                                            Lexer::Type::op           },
                                                        { "pattern",                                      Lexer::Type::identifier   },         NO, NO }, },
    { "(+tag)",                                       { { "(",                                            Lexer::Type::op           },
                                                        { "+tag",                                         Lexer::Type::tag          },
                                                        { ")",                                            Lexer::Type::op           },         NO, NO }, },
    { "(name:value)",                                 { { "(",                                            Lexer::Type::op           },
                                                        { "name:value",                                   Lexer::Type::pair         },
                                                        { ")",                                            Lexer::Type::op           },         NO, NO }, },
  };
  #define NUM_TESTS (sizeof (lexerTests) / sizeof (lexerTests[0]))

  for (unsigned int i = 0; i < NUM_TESTS; i++)
  {
    // The isolated test puts the input string directly into the Lexer.
    Lexer isolated (lexerTests[i].input);

    for (int j = 0; j < 5; j++)
    {
      if (lexerTests[i].results[j].token[0])
      {
        // Isolated: "<token>"
        t.ok (isolated.token (token, type),                  "Isolated Lexer::token(...) --> true");
        t.is (token, lexerTests[i].results[j].token,         "  token --> " + token);
        t.is ((int)type, (int)lexerTests[i].results[j].type, "  type --> Lexer::Type::" + Lexer::typeToString (type));
      }
    }

    // The embedded test surrounds the input string with a space.
    Lexer embedded (std::string (" ") + lexerTests[i].input + " ");

    for (int j = 0; j < 5; j++)
    {
      if (lexerTests[i].results[j].token[0])
      {
        // Embedded: "<token>"
        t.ok (embedded.token (token, type),                  "Embedded Lexer::token(...) --> true");
        t.is (token, lexerTests[i].results[j].token,         "  token --> " + token);
        t.is ((int)type, (int)lexerTests[i].results[j].type, "  type --> Lexer::Type::" + Lexer::typeToString (type));
      }
    }
  }

  return 0;
}
Beispiel #23
0
int main()
{
  try
    {
      symbol k("k"),q("q"),p("p"),p1("p1"),p2("p2"),p3("p3"),ms("ms"),l("l"),s("s"),m1s("m1s"),m2s("m2s"),m3s("m3s");
      symbol l1("l1"),l2("l2"),l3("l3"),l4("l4"),t("t"),p4("p4"),p5("p5"),p6("p6"),tp("tp"),v1("v1"),v2("v2"),l5("l5");
      symbol k1("k1"),k2("k2"),k3("k3"),k4("k4"),k5("k5"),ms1("ms1"),ms2("ms2"),ms3("ms3"),ms4("ms4");
      symbol s12("s12"),s23("s23"),s34("s34"),s45("s45"),s51("s51"),s13("s13"),s15("s15"),s56("s56"),s16("s16"),s123("s123"),s234("s234"),s345("s345");
      lst inv_l;
      inv_l.append(p1*p1 == 0);
      inv_l.append( p2*p2 == 0);inv_l.append( p3*p3  ==  0);inv_l.append( p4*p4  ==  0);inv_l.append( p5*p5  ==  0);inv_l.append( p6*p6  ==  0);
      inv_l.append(p1* p2  ==  s12/2);inv_l.append( p2* p3  ==  s23/2);inv_l.append( p3* p4  ==  s34/2);inv_l.append( p4* p5  ==  s45/2);
      inv_l.append(p5* p6  ==  s56/2);inv_l.append( p1* p6  ==  s16/2);inv_l.append( p1* p3  ==  (-s12 + s123 - s23)/2);
      inv_l.append(p2* p4  ==  (-s23 + s234 - s34)/2);
      inv_l.append( p3* p5  ==  (-s34 + s345 - s45)/2);
      inv_l.append(p1* p4  ==  (-s123 + s23 - s234 + s56)/2);
      inv_l.append(p1* p5  ==  (-s16 + s234 - s56)/2);
      inv_l.append( p2* p5  ==  (s16 - s234 + s34 - s345)/2);
      inv_l.append( p2* p6  ==  (-s12 - s16 + s345)/2);
      inv_l.append( p3* p6  ==  (s12 - s123 - s345 + s45)/2);
      inv_l.append( p4* p6  ==  (s123 - s45 - s56)/2);
      
      
      RoMB_loop_by_loop hexag(lst(k1),
                              lst(-pow(p1 + k1,2),-pow(p1 + p2 + k1,2),
                                  -pow(p1 + p2 + p3 + k1,2),
                                  -pow(p1 + p2 + p3 + p4 + k1,2),
                                  -pow(p1+p2+p3+p4+p5+k1,2),-pow(k1,2)),
                              inv_l,
                              lst(1,1,1,1,1,1),true);
      hexag.integrate_map(lst(s12 == -1, s23 == -2, s34 == -3, s45 == -4, s56 == -5, s16 == -6, s123 == -7, s234 == -8, s345 == -9));
/*

 FRESULT for parameters: {s12==-1,s23==-2,s34==-3,s45==-4,s56==-5,s16==-6,s123==-7,s234==-8,s345==-9}
 
  FRESULT anl :           = -0.1955084880526298663-1/240*log(8)*log(6)+947/60480*log(2)^2-1/480*log(6)*log(4)+1/1080*log(3)*log(7)+131/7560*log(9)*log(2)+19/1260*log(9)^2-1/560*log(8)*log(4)+523/60480*log(3)^2-1/1080*log(7)*log(5)+41/4320*log(3)*log(5)-1/48*log(8)*log(5)-1/1080*log(7)*log(4)+22/945*log(6)*log(7)+19/3780*log(3)*log(4)+493/30240*Pi^2+43/1008*eps^(-2)+49/8640*log(5)^2-641/30240*log(2)*log(6)+1/1080*log(9)*log(5)-22/945*log(2)*log(7)+271/60480*log(4)^2-3/112*log(8)*log(3)-19/3780*log(9)*log(4)+1/1080*log(4)*log(5)-61/2520*log(9)*log(7)+61/5040*log(7)^2+1/168*log(3)*log(2)+1/168*log(8)*log(9)+13/3360*log(2)*log(4)-1/30240*(-1132.7960047725738361+576*log(8)-163*log(3)+264*log(9)+533*log(2)-479*log(6)-444*log(7)+271*log(4)-287*log(5))*eps^(-1)+47/1680*log(8)^2-17/1680*log(8)*log(2)+767/60480*log(6)^2-22/945*log(9)*log(6)-13/1890*log(3)*log(9)
   FRESULT num:           = 1.9907333428263254975E-4+(0.032177795803854872908)*eps^(-1)+(0.04265873015873015873)*eps^(-2)
    eps^-2 term: 43/1008 +/- 0
     eps^-1 term: 0.03746018534300839405-2/105*log(8)+163/30240*log(3)-11/1260*log(9)-533/30240*log(2)+479/30240*log(6)+37/2520*log(7)-271/30240*log(4)+41/4320*log(5) +/- 9.022403780167233619E-6
      eps^0 term: -0.1955084880526298663-1/240*log(8)*log(6)+947/60480*log(2)^2-1/480*log(6)*log(4)+1/1080*log(3)*log(7)+131/7560*log(9)*log(2)+19/1260*log(9)^2-1/560*log(8)*log(4)+523/60480*log(3)^2-1/1080*log(7)*log(5)+41/4320*log(3)*log(5)-1/48*log(8)*log(5)-1/1080*log(7)*log(4)+22/945*log(6)*log(7)+19/3780*log(3)*log(4)+493/30240*Pi^2+49/8640*log(5)^2-641/30240*log(2)*log(6)+1/1080*log(9)*log(5)-22/945*log(2)*log(7)+271/60480*log(4)^2-3/112*log(8)*log(3)-19/3780*log(9)*log(4)+1/1080*log(4)*log(5)-61/2520*log(9)*log(7)+61/5040*log(7)^2+1/168*log(3)*log(2)+1/168*log(8)*log(9)+13/3360*log(2)*log(4)+47/1680*log(8)^2-17/1680*log(8)*log(2)+767/60480*log(6)^2-22/945*log(9)*log(6)-13/1890*log(3)*log(9) +/- 1.04620404922048185285E-4
      */

    }
  catch(std::exception &p)
    {
      std::cerr<<"******************************************************************"<<endl;
      std::cerr<<"   >>>ERROR:  "<<p.what()<<endl;
      std::cerr<<"******************************************************************"<<endl;
      return 1;
    }
  return 0;
}
Beispiel #24
0
int main()
{
  try
    {
  
      symbol k("k"),q("q"),p("p"),p1("p1"),p2("p2"),p3("p3"),ms("ms"),l("l"),s("s"),m1s("m1s"),m2s("m2s"),m3s("m3s");
      symbol l1("l1"),l2("l2"),l3("l3"),l4("l4"),t("t"),p4("p4"),p5("p5"),tp("tp"),v1("v1"),v2("v2"),l5("l5");
      symbol k1("k1"),k2("k2"),k3("k3"),k4("k4"),k5("k5"),ms1("ms1"),ms2("ms2"),ms3("ms3"),ms4("ms4");
      symbol s12("s12"),s23("s23"),s34("s34"),s45("s45"),s51("s51"),s13("s13"),s15("s15");

      lst inv_l =  lst(
                       p1*p1 == 0, 
                       p2*p2 == 0, 
                       p3*p3 == 0, 
                       p4*p4 == 0, 
                       p5*p5 == 0, 

                       p1*p2 == s12/2,
                       p1*p3 ==  (-s12-s23+s45)/2,
                       p1*p4 == (-s15+s23-s45)/2,
                       p1*p5 == s15/2,
                       p2* p3 ==s23/2,
                       p2* p4 ==(s15-s23-s34)/2,
                       p2* p5 ==(-s12-s15+s34)/2,
                       p3*p4 == s34/2,
                       p3*p5 == (s12-s34-s45)/2,
                       p4*p5 == s45/2);
#define topo 2
#if topo==1      

  /*                            1+eps normalization
   FRESULT for parameters: {s12==-2,s23==-3,s34==-4,s45==-5,s15==-6,ms==1}
   
    FRESULT anl :           = -0.010071141398715986043
     FRESULT num:           = -0.010071141398715986043
      eps^0 term: -0.010071141398715986043 +/- 7.5387750593540493467E-5
      */
      /*   Euler renormalization
       FRESULT for parameters: {s12==-2,s23==-3,s34==-4,s45==-5,s15==-6,ms==1}
       
        FRESULT anl :           = 0.020204464861409441711
         FRESULT num:           = 0.020204464861409441711
          eps^0 term: 0.020204464861409441711 +/- 2.9955911201888832611E-4
          */
      RoMB_loop_by_loop pent(lst(k1),lst(-pow(p1 + k1,2)+ms,-pow(p1 + p2 + k1,2)+ms,
                                         -pow(p1 + p2 + p3 + k1,2)+ms,-pow(p1 + p2 + p3 + p4 + k1,2)+ms,
                                         -pow(k1,2)+ms),
                             inv_l,
                             lst(1,1,1,1,1),false);
      pent.integrate_map(lst(s12==-2,s23==-3,s34==-4,s45==-5,s15==-6,ms==1));
#elif topo==2      
// M=0 with factor tgamma(1-eps)^2/tgamma(1-2eps)
/*      PJfry
*	1/eps^-2 :(-0.111111,0)
*	1/eps^-1 :(0.0856421,0)
*	1/eps^0 :(0.0513422,0)  -3.28987

*/
      RoMB_loop_by_loop pent(lst(k2,k1),lst(-pow(k1,2),-pow(k1 - k2 ,2),
                                         -pow(k1+p1 + p2,2),-pow(k1 - p4 - p5,2),
                                         -pow(k1-p5,2),-pow(k2,2),-pow(k2+p1,2),-pow(k2+p1+p2,2)),
                             inv_l,
                             lst(1,1,1,1,1,1,1,1),true);
      pent.integrate_map(lst(s12==-2,s23==-4,s34==-5,s45==-6,s15==-0.5,ms==1),0);
      
      
      
      
      /*
        FRESULT for parameters: {s12==-2,s23==-4,s34==-5,s45==-6,s15==-0.5,ms==1}
        
         FRESULT anl :           = 400.22174334151294225-(0.24583333333333333332)*log(4)^2*log(5)*log(2)-(3.3881317890172013563E-21)*Euler*log(5)^2+(7.284483346386982916E-20)*Euler*log(5)*log(6)*log(2)-(0.11210570324758033243)*log(4)*log(6)-(2.1006417091906648409E-19)*Euler*log(5)*log(6)-(8.470329472543003391E-21)*Euler+(1.4484263398048535798E-19)*Euler*log(5)^2*log(2)+(0.34079736377530644382)*log(4)*log(6)*log(2)-(0.17039868188765322194)*log(4)^2*log(2)+eps^(-2)*(-1.3333035413347974529-(0.12916666666666666666)*log(4)*log(6)+(1.9274705288631189937E-20)*Euler+(3.3730734255104582391E-20)*Euler*log(6)+(0.121354166666666666677)*Pi^2+(0.014440566261665527283)*log(4)+(0.054166666666666666667)*log(5)*log(6)+(3.08395284618099039E-19)*Euler^2+(0.24693368307448051649)*log(5)-(1.2046690805394493711E-20)*Euler*log(4)-(0.045833333333333333334)*log(4)*log(5)+(0.16666666666666666667)*log(2)^2-(0.0086643397569993163535)*log(6)-(0.025)*log(6)*log(2)-(1.9274705288631189937E-20)*Euler*log(5)+(0.0625)*log(6)^2-(0.27725887222397812377)*log(2)-(0.4)*log(5)*log(2)+(0.07708333333333333334)*log(4)^2+(0.178125)*log(5)^2+(0.029166666666666666667)*log(4)*log(2)+(7.709882115452475975E-20)*Euler*log(2))+(2.2022856628611808816E-20)*Euler*log(4)^3-(4.336808689942017736E-19)*Euler^2*log(2)-(0.066426604803661425496)*log(4)*log(5)^2+(0.014236111111111111113)*log(4)^4+(2.710505431213761085E-20)*Euler*log(6)-(1.1011428314305904408E-19)*Euler*log(6)*Pi^2-(0.25763888888888888888)*log(5)^3*log(2)+(0.09861111111111111112)*log(5)*log(6)^3+(0.07797905781299384727)*log(6)*log(2)^2+(2.168404344971008868E-19)*Euler*log(4)*log(5)-(3.3881317890172013563E-20)*Euler*log(4)^2+(0.058333333333333333313)*log(4)*log(5)^2*log(2)+(1.4696021634862110883E-19)*Euler*log(6)*log(2)-(1.2493735972000930001E-20)*Euler*log(5)^3-(0.32346868426130781108)*log(4)*log(5)*log(6)+(1.8223154162344101082-(1.9274705288631189937E-20)*Euler*log(5)^2-(0.17906302164465253826)*log(4)*log(6)-(3.252606517456513302E-20)*Euler+(0.275)*log(4)*log(6)*log(2)-(0.14166666666666666667)*log(4)^2*log(2)-(4.9030031577955589404E-19)*Euler^2*log(2)-(0.029166666666666666667)*log(4)*log(5)^2-(4.336808689942017736E-20)*Euler*log(6)+(0.03125)*log(6)*log(2)^2-(2.4093381610788987422E-20)*Euler*log(4)*log(5)+(2.379221434065412508E-20)*Euler*log(6)*log(2)-(0.25833333333333333333)*log(4)*log(5)*log(6)+(0.17641558449668052497)*Pi^2+(0.12916666666666666666)*log(5)*log(6)^2+(0.018016988021932553424)*log(4)-(0.35625)*log(5)^2*log(2)+(0.04043358553266347639)*log(5)*log(6)+(3.8549410577262379875E-20)*Euler*log(4)*log(6)+(3.2766998990673022894E-19)*Euler^2-(0.64791666666666666673)*zeta(3)-(0.11319444444444444446)*log(2)^3+(0.18467412722480867264)*log(5)+(0.09756944444444444444)*log(6)*Pi^2+(4.8186763221577974843E-21)*Euler*log(4)-(0.040433585532663476392)*log(4)*log(5)+(0.27725887222397812372)*log(2)^2-(0.018016988021932553429)*log(6)+(1.541976423090495195E-19)*Euler^3-(0.07509094456066074186)*log(6)*log(2)+(3.1321396094025683648E-20)*Euler*log(5)-(0.2375)*log(4)*log(6)^2+(0.08953151082232626913)*log(6)^2-(2.168404344971008868E-20)*Euler*log(2)^2+(0.12083333333333333333)*log(4)^2*log(5)-(0.14375)*log(6)^2*log(2)-(0.108333333333333333334)*log(5)*log(6)*log(2)-(0.17116138620835925754)*log(2)+(2.0238440553062749435E-19)*Euler^2*log(5)-(0.025)*log(4)*log(2)^2-(0.22395833333333333336)*log(2)*Pi^2+(0.23229166666666666667)*log(5)*Pi^2+(0.029166666666666666667)*log(5)^2*log(6)-(2.4093381610788987422E-20)*Euler*log(4)*log(2)-(0.49386736614896103298)*log(5)*log(2)+(0.08541666666666666667)*log(6)^3+(0.08375528431766005821)*log(4)^2+(3.8549410577262379875E-20)*Euler*Pi^2+(0.128125)*log(5)^3+(0.108333333333333333334)*log(4)*log(5)*log(2)+(0.4)*log(5)*log(2)^2-(0.09409722222222222222)*log(4)*Pi^2+(7.709882115452475975E-20)*Euler*log(5)*log(2)+(0.26642844752772897827)*log(5)^2+(0.0750909445606607419)*log(4)*log(2)+(0.22916666666666666667)*log(4)^2*log(6)-(0.080555555555555555553)*log(4)^3+(1.1594939900192200198E-19)*Euler*log(2))*eps^(-1)-(3.1509625637859972613E-19)*Euler^2*log(5)*log(2)-(1.5246593050577406103E-20)*Euler^2*Pi^2+(0.44166666666666666666)*zeta(3)*log(6)+(0.12361655670603724154)*Pi^2+(0.062586805555555555545)*log(5)^4-(2.5410988417629010172E-20)*Euler*log(4)*log(6)^2-(0.020138888888888888871)*log(6)*log(2)^3+(0.164622455382987011)*log(5)*log(6)^2+(0.3583333333333333334)*log(5)^2*log(2)^2-(0.22152777777777777779)*log(4)*log(6)*Pi^2+(0.10729166666666666671)*log(4)^2*Pi^2-(0.031944444444444444437)*log(4)*log(5)^3+(0.0041628081498616184988)*log(4)-(9.5714723039735938315E-20)*Euler*log(4)*log(5)*log(2)+(3.9954857837891737475E-20)*Euler*log(4)^2*log(2)-(0.53574500830779106205)*log(5)^2*log(2)-(2.5199230180815435087E-19)*Euler*zeta(3)+(0.048045301391820142482)*log(5)*log(6)-(4.7433845046240818988E-20)*Euler*log(4)*log(6)-(0.06249999999999999996)*log(5)^2*log(6)*log(2)+(6.168313523040288406E-19)*Euler^2-(0.9097222222222222222)*zeta(3)*log(5)-(1.0464597017620285435)*zeta(3)-(4.539037806098981942E-19)*Euler^3*log(2)-(0.18580195256676311766)*log(2)^3-(2.710505431213761085E-20)*Euler*log(6)^3+(0.08337179655695074824)*log(5)+(0.12755833531137882431)*log(6)*Pi^2+(2.2022856628611808816E-20)*Euler*log(4)*log(5)^2-(1.3552527156068805425E-20)*Euler*log(4)+(0.012326388888888888894)*log(6)^4-(0.4125)*log(4)*zeta(3)-(0.30416666666666666667)*log(4)*log(5)*log(6)^2+(0.49166666666666666665)*log(4)*log(5)*log(6)*log(2)-(0.066666666666666666677)*log(4)*log(6)^3+(4.7433845046240818988E-20)*Euler*log(6)*log(2)^2+(0.14305555555555555555)*log(4)^3*log(2)-(0.046043413833827636543)*log(4)*log(5)-(2.168404344971008868E-19)*Euler*log(6)^2+(0.1721623299873555105)*log(2)^2-(0.0037002739109881053319)*log(6)-(2.3039296165316969223E-19)*Euler^2*log(2)^2+(1.0062751413381088028E-18)*Euler^3-(2.168404344971008868E-19)*Euler^2*log(4)*log(2)-(0.25)*log(5)*log(6)^2*log(2)+(0.20505604272398455968-(2.8912057932946784908E-20)*Euler+(0.00625)*log(4)+(0.19583333333333333331)*log(5)-(0.018750000000000000007)*log(6)-(0.16875)*log(2))*eps^(-3)-(0.030028313369887589065)*log(6)*log(2)-(0.275)*log(4)*log(6)*log(2)^2+(0.13125)*log(4)^2*log(2)^2+(4.0657581468206416275E-20)*Euler*log(5)*log(6)^2-(8.131516293641283255E-20)*Euler*log(5)-(0.2570420794576463856)*log(4)*log(6)^2-(0.47430555555555555555)*log(5)*log(2)*Pi^2+(0.2350694444444444444)*log(5)^2*Pi^2+(0.22569444444444444447)*log(2)^2*Pi^2+(0.05705379540278641918)*log(6)^2+(1.5814418841144177812E-20)*Euler*log(2)^2+(0.16173434213065390554)*log(4)^2*log(5)+(1.5585406229479126239E-19)*Euler^2*log(6)^2-(0.17328679513998632736)*log(6)^2*log(2)+(7.030373462210692814E-20)*Euler*log(4)*log(6)*log(2)-(0.086643397569993163665)*log(5)*log(6)*log(2)-(0.08580010131103669233)*log(2)+(2.2700482986415249087E-19)*Euler^2*log(5)+(0.09999999999999999998)*log(4)^2*log(6)^2-(0.07509094456066074196)*log(4)*log(2)^2-(6.7762635780344027125E-20)*Euler*log(5)*log(2)^2-(0.32876355855725183764)*log(2)*Pi^2+(8.1950437646853557805E-20)*Euler^4-(1.1858461261560204747E-20)*Euler*log(4)*Pi^2+(0.3258754453049187323)*log(5)*Pi^2+(0.06931471805599453092)*log(5)^2*log(6)+(3.642241673193491458E-20)*Euler*log(4)^2*log(6)-(1.7194768829262296883E-19)*Euler*log(4)*log(2)-(0.37135014200760985115)*log(5)*log(2)+(1.1011428314305904408E-19)*Euler*log(2)^3+(0.08375528431766005824)*log(6)^3+(1.8431436932253575378E-18)*Euler^3*log(6)+(0.056423611111111111103)*log(2)^4-(4.0826988057657276343E-19)*Euler^2*log(4)+(0.112499999999999999984)*log(6)^2*Pi^2+(0.18402777777777777775)*log(5)*log(6)*Pi^2-(0.061111111111111111102)*log(4)^3*log(6)-(0.108333333333333333294)*log(4)*log(5)*log(2)^2+(0.020833333333333333319)*log(4)*log(2)^3-(8.131516293641283255E-20)*Euler^2*log(4)^2-(6.7762635780344027125E-21)*Euler*log(4)^2*log(5)+(0.056052851623790166215)*log(4)^2-(2.6893296075324035765E-19)*Euler^2*log(5)*log(6)-(1.626303258728256651E-19)*Euler^3*log(5)+(4.2986922073155742208E-20)*Euler*Pi^2+(0.66666666666666666706)*zeta(3)*log(2)-(0.4083333333333333333)*log(4)^2*log(6)*log(2)+(0.17352747124434741951)*log(5)^3-(0.23333333333333333333)*log(4)*log(5)^2*log(6)+(0.080867171065326952724)*log(4)*log(5)*log(2)-(1.6940658945086006781E-20)*Euler*log(6)^2*log(2)-(0.13125)*log(6)^3*log(2)+(0.49675547940129413833)*log(5)*log(2)^2-(1.3552527156068805425E-20)*Euler*log(4)*log(2)^2+(0.11874999999999999999)*log(5)^2*log(6)^2+(0.140625)*eps^(-4)+(3.8963515573697815597E-20)*Euler*log(5)*Pi^2-(0.10416666666666666666)*log(4)^3*log(5)-(0.1208194043892682449)*log(4)*Pi^2-(7.284483346386982916E-20)*Euler*log(2)*Pi^2+(8.131516293641283255E-20)*Euler*log(5)*log(2)+(0.18042011616407459749)*log(5)^2+(0.40833333333333333333)*log(4)*log(6)^2*log(2)+(0.028026425811895083111)*log(4)*log(2)+(1.6940658945086006781E-19)*Euler^2*log(5)^2+(0.26570641921464570196)*log(4)^2*log(6)-(1.0164395367051604069E-20)*Euler*log(5)^2*log(6)+(1.084202172485504434E-19)*Euler^2*log(6)*log(2)+(0.31666666666666666664)*log(4)^2*log(5)*log(6)+(1.176528763736223171E-18)*Euler^3*log(4)+(3.0323779511703952139E-19)*Euler^2*log(4)*log(5)-(0.19861111111111111116)*log(6)*log(2)*Pi^2-(0.08760610198743753216)*log(4)^3+(0.19513888888888888883)*log(4)*log(2)*Pi^2-(0.17430555555555555551)*log(4)*log(5)*Pi^2+(0.11666666666666666666)*log(4)^2*log(5)^2-(1.084202172485504434E-19)*Euler^2*log(6)+(1.3044307387716225222E-19)*Euler*log(2)+(0.11249999999999999996)*log(5)*log(6)*log(2)^2-(0.26805555555555555557)*log(5)*log(2)^3+(0.13645833333333333334)*log(6)^2*log(2)^2+(0.09795428240740740744)*Pi^4+(0.033333333333333333352)*log(5)^3*log(6)
          FRESULT num:           = 415.68016240483728552+(5.9729895535000929493)*eps^(-1)+(0.24826188972445505333)*eps^(-2)+(0.37833789689847839715)*eps^(-3)+(0.140625)*eps^(-4)
           eps^-4 term: 0.140625 +/- 0
            eps^-3 term: 0.20505604272398455968-(2.8912057932946784908E-20)*Euler+(0.00625)*log(4)+(0.19583333333333333331)*log(5)-(0.018750000000000000007)*log(6)-(0.16875)*log(2) +/- 5.7595906625256782043E-11
             eps^-2 term: -1.3333035413347974529-(0.12916666666666666666)*log(4)*log(6)+(1.9274705288631189937E-20)*Euler+(3.3730734255104582391E-20)*Euler*log(6)+(0.121354166666666666677)*Pi^2+(0.014440566261665527283)*log(4)+(0.054166666666666666667)*log(5)*log(6)+(3.08395284618099039E-19)*Euler^2+(0.24693368307448051649)*log(5)-(1.2046690805394493711E-20)*Euler*log(4)-(0.045833333333333333334)*log(4)*log(5)+(0.16666666666666666667)*log(2)^2-(0.0086643397569993163535)*log(6)-(0.025)*log(6)*log(2)-(1.9274705288631189937E-20)*Euler*log(5)+(0.0625)*log(6)^2-(0.27725887222397812377)*log(2)-(0.4)*log(5)*log(2)+(0.07708333333333333334)*log(4)^2+(0.178125)*log(5)^2+(0.029166666666666666667)*log(4)*log(2)+(7.709882115452475975E-20)*Euler*log(2) +/- 2.38034674326464079E-6
              eps^-1 term: 1.8223154162344101082-(1.9274705288631189937E-20)*Euler*log(5)^2-(0.17906302164465253826)*log(4)*log(6)-(3.252606517456513302E-20)*Euler+(0.275)*log(4)*log(6)*log(2)-(0.14166666666666666667)*log(4)^2*log(2)-(4.9030031577955589404E-19)*Euler^2*log(2)-(0.029166666666666666667)*log(4)*log(5)^2-(4.336808689942017736E-20)*Euler*log(6)+(0.03125)*log(6)*log(2)^2-(2.4093381610788987422E-20)*Euler*log(4)*log(5)+(2.379221434065412508E-20)*Euler*log(6)*log(2)-(0.25833333333333333333)*log(4)*log(5)*log(6)+(0.17641558449668052497)*Pi^2+(0.12916666666666666666)*log(5)*log(6)^2+(0.018016988021932553424)*log(4)-(0.35625)*log(5)^2*log(2)+(0.04043358553266347639)*log(5)*log(6)+(3.8549410577262379875E-20)*Euler*log(4)*log(6)+(3.2766998990673022894E-19)*Euler^2-(0.64791666666666666673)*zeta(3)-(0.11319444444444444446)*log(2)^3+(0.18467412722480867264)*log(5)+(0.09756944444444444444)*log(6)*Pi^2+(4.8186763221577974843E-21)*Euler*log(4)-(0.040433585532663476392)*log(4)*log(5)+(0.27725887222397812372)*log(2)^2-(0.018016988021932553429)*log(6)+(1.541976423090495195E-19)*Euler^3-(0.07509094456066074186)*log(6)*log(2)+(3.1321396094025683648E-20)*Euler*log(5)-(0.2375)*log(4)*log(6)^2+(0.08953151082232626913)*log(6)^2-(2.168404344971008868E-20)*Euler*log(2)^2+(0.12083333333333333333)*log(4)^2*log(5)-(0.14375)*log(6)^2*log(2)-(0.108333333333333333334)*log(5)*log(6)*log(2)-(0.17116138620835925754)*log(2)+(2.0238440553062749435E-19)*Euler^2*log(5)-(0.025)*log(4)*log(2)^2-(0.22395833333333333336)*log(2)*Pi^2+(0.23229166666666666667)*log(5)*Pi^2+(0.029166666666666666667)*log(5)^2*log(6)-(2.4093381610788987422E-20)*Euler*log(4)*log(2)-(0.49386736614896103298)*log(5)*log(2)+(0.08541666666666666667)*log(6)^3+(0.08375528431766005821)*log(4)^2+(3.8549410577262379875E-20)*Euler*Pi^2+(0.128125)*log(5)^3+(0.108333333333333333334)*log(4)*log(5)*log(2)+(0.4)*log(5)*log(2)^2-(0.09409722222222222222)*log(4)*Pi^2+(7.709882115452475975E-20)*Euler*log(5)*log(2)+(0.26642844752772897827)*log(5)^2+(0.0750909445606607419)*log(4)*log(2)+(0.22916666666666666667)*log(4)^2*log(6)-(0.080555555555555555553)*log(4)^3+(1.1594939900192200198E-19)*Euler*log(2) +/- 4.3702165714070080051E-4
               eps^0 term: 400.22174334151294225-(0.24583333333333333332)*log(4)^2*log(5)*log(2)-(3.3881317890172013563E-21)*Euler*log(5)^2+(7.284483346386982916E-20)*Euler*log(5)*log(6)*log(2)-(0.11210570324758033243)*log(4)*log(6)-(2.1006417091906648409E-19)*Euler*log(5)*log(6)-(8.470329472543003391E-21)*Euler+(1.4484263398048535798E-19)*Euler*log(5)^2*log(2)+(0.34079736377530644382)*log(4)*log(6)*log(2)-(0.17039868188765322194)*log(4)^2*log(2)+(2.2022856628611808816E-20)*Euler*log(4)^3-(4.336808689942017736E-19)*Euler^2*log(2)-(0.066426604803661425496)*log(4)*log(5)^2+(0.014236111111111111113)*log(4)^4+(2.710505431213761085E-20)*Euler*log(6)-(1.1011428314305904408E-19)*Euler*log(6)*Pi^2-(0.25763888888888888888)*log(5)^3*log(2)+(0.09861111111111111112)*log(5)*log(6)^3+(0.07797905781299384727)*log(6)*log(2)^2+(2.168404344971008868E-19)*Euler*log(4)*log(5)-(3.3881317890172013563E-20)*Euler*log(4)^2+(0.058333333333333333313)*log(4)*log(5)^2*log(2)+(1.4696021634862110883E-19)*Euler*log(6)*log(2)-(1.2493735972000930001E-20)*Euler*log(5)^3-(0.32346868426130781108)*log(4)*log(5)*log(6)-(3.1509625637859972613E-19)*Euler^2*log(5)*log(2)-(1.5246593050577406103E-20)*Euler^2*Pi^2+(0.44166666666666666666)*zeta(3)*log(6)+(0.12361655670603724154)*Pi^2+(0.062586805555555555545)*log(5)^4-(2.5410988417629010172E-20)*Euler*log(4)*log(6)^2-(0.020138888888888888871)*log(6)*log(2)^3+(0.164622455382987011)*log(5)*log(6)^2+(0.3583333333333333334)*log(5)^2*log(2)^2-(0.22152777777777777779)*log(4)*log(6)*Pi^2+(0.10729166666666666671)*log(4)^2*Pi^2-(0.031944444444444444437)*log(4)*log(5)^3+(0.0041628081498616184988)*log(4)-(9.5714723039735938315E-20)*Euler*log(4)*log(5)*log(2)+(3.9954857837891737475E-20)*Euler*log(4)^2*log(2)-(0.53574500830779106205)*log(5)^2*log(2)-(2.5199230180815435087E-19)*Euler*zeta(3)+(0.048045301391820142482)*log(5)*log(6)-(4.7433845046240818988E-20)*Euler*log(4)*log(6)-(0.06249999999999999996)*log(5)^2*log(6)*log(2)+(6.168313523040288406E-19)*Euler^2-(0.9097222222222222222)*zeta(3)*log(5)-(1.0464597017620285435)*zeta(3)-(4.539037806098981942E-19)*Euler^3*log(2)-(0.18580195256676311766)*log(2)^3-(2.710505431213761085E-20)*Euler*log(6)^3+(0.08337179655695074824)*log(5)+(0.12755833531137882431)*log(6)*Pi^2+(2.2022856628611808816E-20)*Euler*log(4)*log(5)^2-(1.3552527156068805425E-20)*Euler*log(4)+(0.012326388888888888894)*log(6)^4-(0.4125)*log(4)*zeta(3)-(0.30416666666666666667)*log(4)*log(5)*log(6)^2+(0.49166666666666666665)*log(4)*log(5)*log(6)*log(2)-(0.066666666666666666677)*log(4)*log(6)^3+(4.7433845046240818988E-20)*Euler*log(6)*log(2)^2+(0.14305555555555555555)*log(4)^3*log(2)-(0.046043413833827636543)*log(4)*log(5)-(2.168404344971008868E-19)*Euler*log(6)^2+(0.1721623299873555105)*log(2)^2-(0.0037002739109881053319)*log(6)-(2.3039296165316969223E-19)*Euler^2*log(2)^2+(1.0062751413381088028E-18)*Euler^3-(2.168404344971008868E-19)*Euler^2*log(4)*log(2)-(0.25)*log(5)*log(6)^2*log(2)-(0.030028313369887589065)*log(6)*log(2)-(0.275)*log(4)*log(6)*log(2)^2+(0.13125)*log(4)^2*log(2)^2+(4.0657581468206416275E-20)*Euler*log(5)*log(6)^2-(8.131516293641283255E-20)*Euler*log(5)-(0.2570420794576463856)*log(4)*log(6)^2-(0.47430555555555555555)*log(5)*log(2)*Pi^2+(0.2350694444444444444)*log(5)^2*Pi^2+(0.22569444444444444447)*log(2)^2*Pi^2+(0.05705379540278641918)*log(6)^2+(1.5814418841144177812E-20)*Euler*log(2)^2+(0.16173434213065390554)*log(4)^2*log(5)+(1.5585406229479126239E-19)*Euler^2*log(6)^2-(0.17328679513998632736)*log(6)^2*log(2)+(7.030373462210692814E-20)*Euler*log(4)*log(6)*log(2)-(0.086643397569993163665)*log(5)*log(6)*log(2)-(0.08580010131103669233)*log(2)+(2.2700482986415249087E-19)*Euler^2*log(5)+(0.09999999999999999998)*log(4)^2*log(6)^2-(0.07509094456066074196)*log(4)*log(2)^2-(6.7762635780344027125E-20)*Euler*log(5)*log(2)^2-(0.32876355855725183764)*log(2)*Pi^2+(8.1950437646853557805E-20)*Euler^4-(1.1858461261560204747E-20)*Euler*log(4)*Pi^2+(0.3258754453049187323)*log(5)*Pi^2+(0.06931471805599453092)*log(5)^2*log(6)+(3.642241673193491458E-20)*Euler*log(4)^2*log(6)-(1.7194768829262296883E-19)*Euler*log(4)*log(2)-(0.37135014200760985115)*log(5)*log(2)+(1.1011428314305904408E-19)*Euler*log(2)^3+(0.08375528431766005824)*log(6)^3+(1.8431436932253575378E-18)*Euler^3*log(6)+(0.056423611111111111103)*log(2)^4-(4.0826988057657276343E-19)*Euler^2*log(4)+(0.112499999999999999984)*log(6)^2*Pi^2+(0.18402777777777777775)*log(5)*log(6)*Pi^2-(0.061111111111111111102)*log(4)^3*log(6)-(0.108333333333333333294)*log(4)*log(5)*log(2)^2+(0.020833333333333333319)*log(4)*log(2)^3-(8.131516293641283255E-20)*Euler^2*log(4)^2-(6.7762635780344027125E-21)*Euler*log(4)^2*log(5)+(0.056052851623790166215)*log(4)^2-(2.6893296075324035765E-19)*Euler^2*log(5)*log(6)-(1.626303258728256651E-19)*Euler^3*log(5)+(4.2986922073155742208E-20)*Euler*Pi^2+(0.66666666666666666706)*zeta(3)*log(2)-(0.4083333333333333333)*log(4)^2*log(6)*log(2)+(0.17352747124434741951)*log(5)^3-(0.23333333333333333333)*log(4)*log(5)^2*log(6)+(0.080867171065326952724)*log(4)*log(5)*log(2)-(1.6940658945086006781E-20)*Euler*log(6)^2*log(2)-(0.13125)*log(6)^3*log(2)+(0.49675547940129413833)*log(5)*log(2)^2-(1.3552527156068805425E-20)*Euler*log(4)*log(2)^2+(0.11874999999999999999)*log(5)^2*log(6)^2+(3.8963515573697815597E-20)*Euler*log(5)*Pi^2-(0.10416666666666666666)*log(4)^3*log(5)-(0.1208194043892682449)*log(4)*Pi^2-(7.284483346386982916E-20)*Euler*log(2)*Pi^2+(8.131516293641283255E-20)*Euler*log(5)*log(2)+(0.18042011616407459749)*log(5)^2+(0.40833333333333333333)*log(4)*log(6)^2*log(2)+(0.028026425811895083111)*log(4)*log(2)+(1.6940658945086006781E-19)*Euler^2*log(5)^2+(0.26570641921464570196)*log(4)^2*log(6)-(1.0164395367051604069E-20)*Euler*log(5)^2*log(6)+(1.084202172485504434E-19)*Euler^2*log(6)*log(2)+(0.31666666666666666664)*log(4)^2*log(5)*log(6)+(1.176528763736223171E-18)*Euler^3*log(4)+(3.0323779511703952139E-19)*Euler^2*log(4)*log(5)-(0.19861111111111111116)*log(6)*log(2)*Pi^2-(0.08760610198743753216)*log(4)^3+(0.19513888888888888883)*log(4)*log(2)*Pi^2-(0.17430555555555555551)*log(4)*log(5)*Pi^2+(0.11666666666666666666)*log(4)^2*log(5)^2-(1.084202172485504434E-19)*Euler^2*log(6)+(1.3044307387716225222E-19)*Euler*log(2)+(0.11249999999999999996)*log(5)*log(6)*log(2)^2-(0.26805555555555555557)*log(5)*log(2)^3+(0.13645833333333333334)*log(6)^2*log(2)^2+(0.09795428240740740744)*Pi^4+(0.033333333333333333352)*log(5)^3*log(6) +/- 0.010448924004628639662
               
      
      */
#endif      
       
    }
  catch(std::exception &p)
    {
      std::cerr<<"******************************************************************"<<endl;
      std::cerr<<"   >>>ERROR:  "<<p.what()<<endl;
      std::cerr<<"******************************************************************"<<endl;
      return 1;
    }
  return 0;
}