polybori.randompoly | index ../../../../lib/python2.7/dist-packages/polybori/randompoly.py

Functions

``

gen_random_poly(ring, l, deg, vars_set, seed=123)

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(ring, 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(r, 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]
  >>> sorted(groebner_basis(s), reverse=True)
  [x(0), x(1), x(2), x(3), x(4) + 1, x(5), x(6) + 1, x(7), x(8) + 1, x(9)]`

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) # doctest: +ELLIPSIS
  "declare_ring(['x'+str(i) for in xrange(10)])\nideal=\\\n[...]\n\n"`