| |
- polynomial_base.Polynomial(builtins.object)
-
- CircuitPolynomial
class CircuitPolynomial(polynomial_base.Polynomial) |
|
Class for circuit polynomials.
Circuit polynomials in n variables are polynomials such that the Newton
polytope is a simplex, formed by monomial squares, and one exponent is a
non-square and lies in the relative interior. |
|
- Method resolution order:
- CircuitPolynomial
- 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
- circuit_number(self)
- Compute the circuit number, stored in self.theta.
- minimiser(self)
- Computer the minimiser of the polynomial.
- 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__': 'circuit_polynomial'...rcuitPolynomial.non_negative at 0x7f150f4b6bf8>})
- __eq__(self, other)
- Check equality of polynomials.
- __neg__(self)
- Return the negation of this polynomial.
- __sizeof__(self)
- Return bit-size of the instance.
- __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)
- Scale polynomial and round coefficients to integer.
Call:
p.scaleround(factor)
Input:
factor [number] - scale all coefficients by 'factor', then round to integer
Note: This function changes the coefficients in place and sets the 'dirty' flag to 'True'.
- tex(self)
- Return the polynomial as string for LaTeX.
- to_symbolic(self)
- Return the polynomial as symbolic expression in sympy.
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
| |