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

`PolyBoRi's interface to libpolybori*
This file makes interfaces to PolyBoRi's runtime libraries available in Python.
It is smart in such a way, that it may also detect and use Sage's Cython based
interface, where availables. If that's not the case (if if the environment
variables PBORI_NOSAGE is set) it falls back to PolyBoRi's boost_python-based
interface.
AUTHOR:
The PolyBoRi Team, 2007-2012
Examples:
>>> from polybori.frontend import *
>>> r=declare_ring(["x0","x1","x2","y0","y1","y2"], globals())
>>> x0>x1
True
>>> x0>x1*x2
True
>>> y0>y1
True
>>> y0>y1*y2
True
>>> r = r.clone(ordering=dlex)
>>> r(x0) > r(x1)
True
>>> r(x0) > r(x1*x2)
False
>>> r = r.clone(ordering=dp_asc)
>>> r(x0) > r(x1)
False
>>> r(x0) > r(x1*x2)
False
>>> r = r.clone(ordering=block_dlex, blocks=[3])
>>> r(x0) > r(x1)
True
>>> r(x0) > r(x1*x2)
False
>>> r(x0) > r(y0*y1*y2)
True
>>> r = r.clone(ordering=block_dp_asc)
>>> r(x0) > r(x1)
False
>>> r(x0) > r(y0)
False
>>> r(x0) > r(x1*x2)
False
>>> r = r.clone(ordering=block_dp_asc, blocks=[3])
>>> r(x0) > r(y0)
True
>>> r(x0) > r(y0*y1)
True
>>> r = r.clone(names=["z17", "z7"])
>>> [r.variable(idx) for idx in xrange(3)]
[z17, z7, x2]
>>> r = r.clone(names="abcde")
>>> [r.variable(idx) for idx in xrange(6)]
[a, b, c, d, e, y2]`

Modules

``

re | warnings |  |

Functions

``

add_up_polynomials(polys, init)
  `Adds up the polynomials in polys (which should be a BoolePolynomialVector or a sequence of ???`

contained_vars(...)
  `contained_vars( (BooleSet)arg1) -> BooleSet :
  C++ signature :
  polybori::BooleSet contained_vars(polybori::BooleSet)`

count_double(...)
  `count_double( (BooleSet)arg1) -> float :
  C++ signature :
  double count_double(polybori::BooleSet)`

easy_linear_factors(...)
  `easy_linear_factors( (Polynomial)arg1) -> BoolePolynomialVector :
  C++ signature :
  std::vector<polybori::BoolePolynomial, std::allocator<polybori::BoolePolynomial> > easy_linear_factors(polybori::BoolePolynomial)`

fix_booleset(set_type)

gauss_on_polys(l)

if_then_else(...)
  `if_then_else( (object)arg1, (BooleSet)arg2, (BooleSet)arg3) -> BooleSet :
  if-then else operator
  C++ signature :
  polybori::BooleSet if_then_else(int,polybori::BooleSet,polybori::BooleSet)
  if_then_else( (Variable)arg1, (BooleSet)arg2, (BooleSet)arg3) -> BooleSet :
  if-then else operator
  C++ signature :
  polybori::BooleSet if_then_else(polybori::BooleVariable,polybori::BooleSet,polybori::BooleSet)`

interpolate(...)
  `interpolate( (BooleSet)arg1, (BooleSet)arg2) -> Polynomial :
  C++ signature :
  polybori::BoolePolynomial interpolate(polybori::BooleSet,polybori::BooleSet)`

interpolate_smallest_lex(...)
  `interpolate_smallest_lex( (BooleSet)arg1, (BooleSet)arg2) -> Polynomial :
  C++ signature :
  polybori::BoolePolynomial interpolate_smallest_lex(polybori::BooleSet,polybori::BooleSet)`

ll_red_nf_noredsb(...)
  `ll_red_nf_noredsb( (Polynomial)arg1, (BooleSet)arg2) -> Polynomial :
  C++ signature :
  polybori::BoolePolynomial ll_red_nf_noredsb(polybori::BoolePolynomial,polybori::BooleSet)`

ll_red_nf_noredsb_single_recursive_call(...)
  `ll_red_nf_noredsb_single_recursive_call( (Polynomial)arg1, (BooleSet)arg2) -> Polynomial :
  C++ signature :
  polybori::BoolePolynomial ll_red_nf_noredsb_single_recursive_call(polybori::BoolePolynomial,polybori::BooleSet)`

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)`

map_every_x_to_x_plus_one(...)
  `map_every_x_to_x_plus_one( (Polynomial)arg1) -> Polynomial :
  C++ signature :
  polybori::BoolePolynomial map_every_x_to_x_plus_one(polybori::BoolePolynomial)`

mapping(...)
  `mapping( (Polynomial)arg1, (Monomial)arg2, (Monomial)arg3) -> Polynomial :
  C++ signature :
  polybori::BoolePolynomial mapping(polybori::BoolePolynomial,polybori::BooleMonomial,polybori::BooleMonomial)`

mod_mon_set(...)
  `mod_mon_set( (BooleSet)arg1, (BooleSet)arg2) -> BooleSet :
  C++ signature :
  polybori::BooleSet mod_mon_set(polybori::BooleSet,polybori::BooleSet)
  mod_mon_set( (BooleSet)arg1, (BooleSet)arg2) -> BooleSet :
  C++ signature :
  polybori::BooleSet mod_mon_set(polybori::BooleSet,polybori::BooleSet)`

mod_var_set(...)
  `mod_var_set( (BooleSet)arg1, (BooleSet)arg2) -> BooleSet :
  C++ signature :
  polybori::BooleSet mod_var_set(polybori::BooleSet,polybori::BooleSet)`

monomial_python_div(self, arg)

mult_fast_sim_C(...)
  `mult_fast_sim_C( (BoolePolynomialVector)arg1, (Ring)arg2) -> Polynomial :
  C++ signature :
  polybori::BoolePolynomial mult_fast_sim_C(std::vector<polybori::BoolePolynomial, std::allocator<polybori::BoolePolynomial> >,polybori::BoolePolyRing)`

nf3(...)
  `nf3( (ReductionStrategy)arg1, (Polynomial)arg2, (Monomial)arg3) -> Polynomial :
  C++ signature :
  polybori::BoolePolynomial nf3(polybori::groebner::ReductionStrategy,polybori::BoolePolynomial,polybori::BooleMonomial)`

parallel_reduce(...)
  `parallel_reduce( (BoolePolynomialVector)arg1, (GroebnerStrategy)arg2, (object)arg3, (float)arg4) -> BoolePolynomialVector :
  C++ signature :
  std::vector<polybori::BoolePolynomial, std::allocator<polybori::BoolePolynomial> > parallel_reduce(std::vector<polybori::BoolePolynomial, std::allocator<polybori::BoolePolynomial> >,polybori::groebner::GroebnerStrategy {lvalue},int,double)`

random_set(...)
  `random_set( (Monomial)arg1, (int)arg2) -> BooleSet :
  C++ signature :
  polybori::BooleSet random_set(polybori::BooleMonomial,unsigned int)`

recursively_insert(...)
  `recursively_insert( (CCuddNavigator)arg1, (object)arg2, (BooleSet)arg3) -> BooleSet :
  C++ signature :
  polybori::BooleSet recursively_insert(polybori::CCuddNavigator,int,polybori::BooleSet)`

replace_init_proc(cls)

set_random_seed(...)
  `set_random_seed( (int)arg1) -> None :
  C++ signature :
  void set_random_seed(unsigned int)`

spoly(...)
  `spoly( (Polynomial)arg1, (Polynomial)arg2) -> Polynomial :
  Compute s-Polynomial between two Polynomials
  C++ signature :
  polybori::BoolePolynomial spoly(polybori::BoolePolynomial,polybori::BoolePolynomial)`

substitute_variables(...)
  `substitute_variables( (Ring)arg1, (BoolePolynomialVector)arg2, (Polynomial)arg3) -> Polynomial :
  C++ signature :
  polybori::BoolePolynomial substitute_variables(polybori::BoolePolyRing,std::vector<polybori::BoolePolynomial, std::allocator<polybori::BoolePolynomial> >,polybori::BoolePolynomial)`

test_iterate_lex(...)
  `test_iterate_lex( (Polynomial)arg1) -> int :
  C++ signature :
  unsigned long test_iterate_lex(polybori::BoolePolynomial {lvalue})`

test_iterate_lex_reversed(...)
  `test_iterate_lex_reversed( (Polynomial)arg1) -> int :
  C++ signature :
  unsigned long test_iterate_lex_reversed(polybori::BoolePolynomial {lvalue})`

test_iterate_ordered(...)
  `test_iterate_ordered( (Polynomial)arg1) -> int :
  C++ signature :
  unsigned long test_iterate_ordered(polybori::BoolePolynomial {lvalue})`

test_iterate_reference_ordered(...)
  `test_iterate_reference_ordered( (Polynomial)arg1) -> int :
  C++ signature :
  unsigned long test_iterate_reference_ordered(polybori::BoolePolynomial {lvalue})`

testvalidstrat(...)
  `testvalidstrat( (GroebnerStrategy)arg1) -> None :
  C++ signature :
  void testvalidstrat(polybori::groebner::GroebnerStrategy)`

to_snake_case(s)

top_index(...)
  `top_index( (BooleSet)arg1) -> int :
  C++ signature :
  int top_index(polybori::BooleSet)`

translate_indices(...)
  `translate_indices( (Polynomial)arg1, (IntVector)arg2) -> Polynomial :
  C++ signature :
  polybori::BoolePolynomial translate_indices(polybori::BoolePolynomial,std::vector<int, std::allocator<int> >)`

variable_python_div(self, arg)

variety_lex_groebner_basis(...)
  `variety_lex_groebner_basis( (BooleSet)arg1, (Monomial)arg2) -> BoolePolynomialVector :
  C++ signature :
  std::vector<polybori::BoolePolynomial, std::allocator<polybori::BoolePolynomial> > variety_lex_groebner_basis(polybori::BooleSet,polybori::BooleMonomial)`

variety_lex_leading_terms(...)
  `variety_lex_leading_terms( (BooleSet)arg1, (Monomial)arg2) -> BooleSet :
  C++ signature :
  polybori::BooleSet variety_lex_leading_terms(polybori::BooleSet,polybori::BooleMonomial)`

warn_snake_case(a, snaked)

weakringref_call(self)

Data

``

block_dlex = polybori.dynamic.PyPolyBoRi.OrderCode.block_dlex
block_dp_asc = polybori.dynamic.PyPolyBoRi.OrderCode.block_dp_asc
compatibility_mode = False
dlex = polybori.dynamic.PyPolyBoRi.OrderCode.dlex
dp_asc = polybori.dynamic.PyPolyBoRi.OrderCode.dp_asc
k = 4
lp = polybori.dynamic.PyPolyBoRi.OrderCode.lp
modules = {'StringIO': <module 'StringIO' from '/usr/lib/python2.7/StringIO.pyc'>, 'UserDict': <module 'UserDict' from '/usr/lib/python2.7/UserDict.pyc'>, '__builtin__': <module '__builtin__' (built-in)>, '__future__': <module '__future__' from '/usr/lib/python2.7/__future__.pyc'>, '__main__': <module '__main__' from 'doc/genpythondoc.py'>, '_abcoll': <module '_abcoll' from '/usr/lib/python2.7/_abcoll.pyc'>, '_codecs': <module '_codecs' (built-in)>, '_collections': <module '_collections' (built-in)>, '_hashlib': <module '_hashlib' from '/usr/lib/python2.7/lib-dynload/_hashlib.i386-linux-gnu.so'>, '_heapq': <module '_heapq' (built-in)>, ...}
snake_pattern = <_sre.SRE_Pattern object>