#include "scv.h" //Pini - This file is linked later. void _scv_pop_constraint(); // Simple example to show use of SCV constraint solver to find // integer solutions to pythagorean theorem: // a*a + b*b == c*c // create a constraint class template struct my_constraint : public scv_constraint_base { scv_smart_ptr > a; scv_smart_ptr > b; scv_smart_ptr > c; SCV_CONSTRAINT_CTOR(my_constraint) { SCV_CONSTRAINT ( a() * a() + b() * b() == c() * c()); SCV_CONSTRAINT( a() > 0 && b() > 0 ); } }; int sc_main (int argc, char** argv) { int cnt = 30; if (argc > 1) cnt = atoi(argv[1]); if (cnt < 1) cnt = 1; if (cnt > 10000000) cnt = 10000000; cout << "count: " << cnt << endl; my_constraint<10> c("constraint"); for (int i=0; i