![]() System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, Directory : /usr/local/lib/python3.6/dist-packages/sympy/polys/benchmarks/ |
Upload File : |
"""Benchmark of the Groebner bases algorithms. """ from sympy.polys.rings import ring from sympy.polys.domains import QQ from sympy.polys.groebnertools import groebner R, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12 = ring("x1:13", QQ) V = R.gens E = [(x1, x2), (x2, x3), (x1, x4), (x1, x6), (x1, x12), (x2, x5), (x2, x7), (x3, x8), (x3, x10), (x4, x11), (x4, x9), (x5, x6), (x6, x7), (x7, x8), (x8, x9), (x9, x10), (x10, x11), (x11, x12), (x5, x12), (x5, x9), (x6, x10), (x7, x11), (x8, x12)] F3 = [ x**3 - 1 for x in V ] Fg = [ x**2 + x*y + y**2 for x, y in E ] F_1 = F3 + Fg F_2 = F3 + Fg + [x3**2 + x3*x4 + x4**2] def time_vertex_color_12_vertices_23_edges(): assert groebner(F_1, R) != [1] def time_vertex_color_12_vertices_24_edges(): assert groebner(F_2, R) == [1]