00001 00002 #include <basix/double.hpp> 00003 #include <basix/int.hpp> 00004 #include <basix/vector.hpp> 00005 #include <basix/port.hpp> 00006 #include <basix/literal.hpp> 00007 #include <numerix/integer.hpp> 00008 #include <numerix/modular.hpp> 00009 #include <numerix/modular_integer.hpp> 00010 #include <numerix/rational.hpp> 00011 #include <numerix/floating.hpp> 00012 #include <numerix/kernel.hpp> 00013 #include <realroot/polynomial.hpp> 00014 #include <realroot/polynomial_glue.hpp> 00015 #include <realroot/ring_sparse_glue.hpp> 00016 #include <shape/axel_glue.hpp> 00017 #include <shape/algebraic_curve_glue.hpp> 00018 #include <shape/algebraic_surface_glue.hpp> 00019 #include <basix/alias.hpp> 00020 #include <basix/glue.hpp> 00021 00022 #define double_literal(x) as_double (as_string (x)) 00023 #define int_literal(x) as_int (as_string (x)) 00024 #define is_generic_literal is<literal> 00025 #define gen_literal_apply(f,v) gen (as<generic> (f), v) 00026 #define gen_literal_access(f,v) access (as<generic> (f), v) 00027 #define set_of_generic set_of(generic) 00028 #define set_of_double set_of(double) 00029 #define set_of_integer set_of(integer) 00030 #define set_of_rational set_of(rational) 00031 #define set_of_bigfloat set_of(bigfloat) 00032 #define set_of_complex_bigfloat set_of(complex_bigfloat) 00033 00034 namespace mmx { 00035 static alias<shape_axel> 00036 GLUE_1 (const alias<shape_axel> &arg_1, const shape_algebraic_surface &arg_2) { 00037 return alias_write (arg_1, arg_2); 00038 } 00039 00040 static shape_algebraic_curve 00041 GLUE_2 (const shape_algebraic_surface &arg_1, const shape_algebraic_surface &arg_2) { 00042 return shape_algebraic_surface_intersection (arg_1, arg_2); 00043 } 00044 00045 static shape_algebraic_surface 00046 GLUE_3 (const ring<rational, Sparse, DegRevLex>::Polynomial &arg_1) { 00047 return shape_algebraic_surface (arg_1); 00048 } 00049 00050 void 00051 glue_algebraic_surface () { 00052 static bool done = false; 00053 if (done) return; 00054 done = true; 00055 call_glue (string ("glue_double")); 00056 call_glue (string ("glue_string")); 00057 call_glue (string ("glue_basix_vector_generic")); 00058 call_glue (string ("glue_ring_sparse_rational")); 00059 call_glue (string ("glue_algebraic_curve")); 00060 define_type<shape_algebraic_surface > (lit ("AlgebraicSurface")); 00061 define ("<<", GLUE_1); 00062 define ("*", GLUE_2); 00063 define ("surface_algebraic", GLUE_3); 00064 } 00065 }