| |
- gen_random_poly(l, deg, vars_set, seed=123)
- global_ring(...)
- global_ring() -> Ring :
C++ signature :
polybori::BoolePolyRing {lvalue} global_ring()
- ll_red_nf_redsb(...)
- ll_red_nf_redsb( (Polynomial)arg1, (BooleSet)arg2) -> Polynomial :
C++ signature :
polybori::BoolePolynomial ll_red_nf_redsb(polybori::BoolePolynomial,polybori::BooleSet)
- random_set(...)
- random_set( (Monomial)arg1, (int)arg2) -> BooleSet :
C++ signature :
polybori::BooleSet random_set(polybori::BooleMonomial,unsigned int)
- set_random_seed(...)
- set_random_seed( (int)arg1) -> None :
C++ signature :
void set_random_seed(unsigned int)
- sparse_random_system(number_of_polynomials, variables_per_polynomial, degree, random_seed=None)
- generates a system, which is sparse in the sense, that each polynomial
contains only a small subset of variables. In each variable that occurrs in a polynomial it is dense in the terms up to the given degree (every term occurs with probability 1/2).
The system will be satisfiable by at least one solution.
>>> from polybori import *
>>> r=Ring(10)
>>> s=sparse_random_system(number_of_polynomials = 20, variables_per_polynomial = 3, degree=2, random_seed=123)
>>> [p.deg() for p in s]
[2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]
>>> groebner_basis(s)
[x(0), x(3), x(4) + 1, x(5), x(7), x(9), x(6) + 1, x(2), x(1), x(8) + 1]
- sparse_random_system_data_file_content(number_of_variables, **kwds)
- >>> sparse_random_system_data_file_content(10, number_of_polynomials = 5, variables_per_polynomial = 3, degree=2, random_seed=123)
"declare_ring(['x'+str(i) for in xrange(10)])\nideal=\\\n[x0*x3 + x0 + x3*x9 + x3,\n x0*x2 + x2 + x5,\n x0*x4 + x4*x8 + x4,\n x0*x1 + x0*x7,\n x2*x5 + x2 + x5 + x9]\n\n"
|