AGE_polynomial
index
/home/hennich/.tmp/POEM/python/AGE_polynomial.py

Class for Circuit Polynomials, intended for SONC.

 
Modules
       
cvxpy
numpy
polynomial_base
sympy
sys

 
Classes
       
polynomial_base.Polynomial(builtins.object)
AGEPolynomial

 
class AGEPolynomial(polynomial_base.Polynomial)
    Class for multivariate polynomials in sparse notation, focus on optimisation.
 
 
Method resolution order:
AGEPolynomial
polynomial_base.Polynomial
builtins.object

Methods defined here:
__init__(self, *args, **kwargs)
Create a new multivariate polynomial object for optimisation.
 
Call:
        p = Polynomial(A, b)
        p = Polynomial(s)
        p = Polynomial(shape, variables, degree, terms[, inner])
        p = Polynomial(nr)
Input:
        There are different possible inputs:
        ---
        A - (n x t)-matrix or list of lists, representiong the exponents
        b - array-like of length t
        ---
        s - string, which represents the polynomial, variables as 'x0' or 'x(0)'
        ---
        shape - string, describes Newton polytope, can be 'simplex'/'standard_simplex'/'general'
        variables - int, maximal number of variables
        degree - int, maximal degree
        terms - int, number of terms
        inner [optional, default 0] - minimal number of interior points
        ---
        nr - number, which tells the rowid of the database
        ---
 
Additional keywords
        seed [default None] - seed for the random number generator
        dirty [default True] - flag, whether the input is in an unclean state
                USE ONLY IF YOU KNOW WHAT YOU ARE DOING.
        matlab_instance [default newly created] - bridge to matlab, to avoid starting multiple instances
        orthant [default (0,...,0)] - restriction to some orthants, one entry for each variable
                0 - unknown sign
                1/-1 - positive/negative half space
__sizeof__(self)
__sizeof__() -> int
size of object in memory, in bytes
non_negative(self)
Check, whether polynomial is non-negative.

Methods inherited from polynomial_base.Polynomial:
__add__(self, other)
Return the sum of this polynomial with another one.
__call__(self, x, dtype='float')
Evaluate the polynomial at point x.
__dict__ = mappingproxy({'__module__': 'AGE_polynomial', '_....__sizeof__ at 0x7f3362c13158>, '__doc__': None})
__eq__(self, other)
Check equality of polynomials.
__neg__(self)
Return the negation of this polynomial.
__str__(self)
Return the polynomial as string.
__sub__(self, other)
Return the difference between this polynomial and another one.
clean(self)
Bring polynomial into clean state.
copy(self)
Return a copy of itself.
derive(self, index)
Compute the derivative with respect to the given index.
 
Call:
        res = p.derive(index)
Input:
        index [integer] - index of variable, by which we derive p, starting with zero
Output:
        res - Polynomial, derivative of p by x_index
pip(self)
Return the polynomial in PIP-format.
prime(self, variables=None)
Compute full derivative of the polynomial.
 
Call:
        pprime = p.prime([variables])
Input:
        variables [optional, default: all occurring] - number of variables, by which we derive
Output:
        pprime - Polynomial, derivative of p
scaleround(self, factor)
symbolic(self)
Return the polynomial as symbolic expression in sympy.
tex(self)
Return the polynomial as string for LaTeX.

Data descriptors inherited from polynomial_base.Polynomial:
__weakref__
list of weak references to the object (if defined)

Data and other attributes inherited from polynomial_base.Polynomial:
__hash__ = None

 
Data
        symlog = <numpy.lib.function_base.vectorize object>
x = x