PolyΒΆ

class PolyΒΆ

Methods

__init__

__init__

as_dict

as_dict

as_variable

as_variable

asdict

alias of as_dict()

decode

decode

degree

degree

evaluate

evaluate

is_linear

is_linear

is_number

is_number

is_quadratic

is_quadratic

is_variable

is_variable

substitute

substitute

Attributes

id

id property

lower_bound

lower_bound property

name

name property

type

type property

upper_bound

upper_bound property

variables

variables property

class IteratorΒΆ
__init__(*args, **kwargs)ΒΆ
__iter__(self) IteratorΒΆ

__iter__

Return type:

Iterator

__next__(self) tuple[tuple[Poly, ...], float]ΒΆ

__next__

Return type:

tuple[tuple[Poly, …], float]

__add__(self, arg: Poly | float, /) PolyΒΆ
__add__(self, arg: ndarray[], /) PolyArray[Dim]
__add__(self, arg: Constraint | ConstraintList, /) Model

__add__

Overload 1.

Args:
  • arg (amplify.Poly | float)

Returns:

amplify.Poly:

Overload 2.

Args:
  • arg (ndarray)

Returns:

amplify.PolyArray[Dim]:

Overload 3.

Args:
  • arg (amplify.Constraint | amplify.ConstraintList)

Returns:

amplify.Model:

__and__(self, arg: Poly | bool, /) PolyΒΆ
__and__(self, arg: ndarray[dtype=bool], /) PolyArray[Dim]

__and__

Overload 1.

Args:
  • arg (amplify.Poly | bool)

Returns:

amplify.Poly:

Overload 2.

Args:
  • arg (ndarray)

Returns:

amplify.PolyArray[Dim]:

__bool__(self) boolΒΆ

__bool__

Return type:

bool

__eq__(self, arg: object, /) boolΒΆ

__eq__

Parameters:

arg (object)

Return type:

bool

__float__(self) floatΒΆ

__float__

Return type:

float

__iadd__(self, arg: Poly | float, /) PolyΒΆ

__iadd__

Parameters:

arg (Poly | float)

Return type:

Poly

__iand__(self, arg: Poly | bool, /) PolyΒΆ

__iand__

Parameters:

arg (Poly | bool)

Return type:

Poly

__imul__(self, arg: Poly | float, /) PolyΒΆ

__imul__

Parameters:

arg (Poly | float)

Return type:

Poly

__index__(self) intΒΆ

__index__

Return type:

int

__init__(self) NoneΒΆ
__init__(self, arg: float, /) None
__init__(self, arg: Variable, /) None

__init__

Overload 2.

Args:
  • arg (float)

Overload 3.

Args:
  • arg (amplify.Variable)

__int__(self) intΒΆ

__int__

Return type:

int

__invert__(self) PolyΒΆ

__invert__

Return type:

Poly

__ior__(self, arg: Poly | bool, /) PolyΒΆ

__ior__

Parameters:

arg (Poly | bool)

Return type:

Poly

__ipow__(self, arg: int, /) PolyΒΆ

__ipow__

Parameters:

arg (int)

Return type:

Poly

__isub__(self, arg: Poly | float, /) PolyΒΆ

__isub__

Parameters:

arg (Poly | float)

Return type:

Poly

__iter__(self) IteratorΒΆ

__iter__

Return type:

Iterator

__itruediv__(self, arg: float, /) PolyΒΆ

__itruediv__

Parameters:

arg (float)

Return type:

Poly

__ixor__(self, arg: Poly | bool, /) PolyΒΆ

__ixor__

Parameters:

arg (Poly | bool)

Return type:

Poly

__len__(self) intΒΆ

__len__

Return type:

int

__mul__(self, arg: Poly | float, /) PolyΒΆ
__mul__(self, arg: ndarray[], /) PolyArray[Dim]

__mul__

Overload 1.

Args:
  • arg (amplify.Poly | float)

Returns:

amplify.Poly:

Overload 2.

Args:
  • arg (ndarray)

Returns:

amplify.PolyArray[Dim]:

__ne__(self, arg: object, /) boolΒΆ

__ne__

Parameters:

arg (object)

Return type:

bool

__neg__(self) PolyΒΆ

__neg__

Return type:

Poly

__or__(self, arg: Poly | bool, /) PolyΒΆ
__or__(self, arg: ndarray[dtype=bool], /) PolyArray[Dim]

__or__

Overload 1.

Args:
  • arg (amplify.Poly | bool)

Returns:

amplify.Poly:

Overload 2.

Args:
  • arg (ndarray)

Returns:

amplify.PolyArray[Dim]:

__pos__(self) PolyΒΆ

__pos__

Return type:

Poly

__pow__(self, arg: int, /) PolyΒΆ

__pow__

Parameters:

arg (int)

Return type:

Poly

__radd__(self, arg: float, /) PolyΒΆ
__radd__(self, arg: ndarray[], /) PolyArray[Dim]
__radd__(self, arg: Constraint | ConstraintList, /) Model

__radd__

Overload 1.

Args:
  • arg (float)

Returns:

amplify.Poly:

Overload 2.

Args:
  • arg (ndarray)

Returns:

amplify.PolyArray[Dim]:

Overload 3.

Args:
  • arg (amplify.Constraint | amplify.ConstraintList)

Returns:

amplify.Model:

__rand__(self, arg: bool, /) PolyΒΆ
__rand__(self, arg: ndarray[dtype=bool], /) PolyArray[Dim]

__rand__

Overload 1.

Args:
  • arg (bool)

Returns:

amplify.Poly:

Overload 2.

Args:
  • arg (ndarray)

Returns:

amplify.PolyArray[Dim]:

__repr__(self) strΒΆ

__repr__

Return type:

str

__rmul__(self, arg: float, /) PolyΒΆ
__rmul__(self, arg: ndarray[], /) PolyArray[Dim]

__rmul__

Overload 1.

Args:
  • arg (float)

Returns:

amplify.Poly:

Overload 2.

Args:
  • arg (ndarray)

Returns:

amplify.PolyArray[Dim]:

__ror__(self, arg: bool, /) PolyΒΆ
__ror__(self, arg: ndarray[dtype=bool], /) PolyArray[Dim]

__ror__

Overload 1.

Args:
  • arg (bool)

Returns:

amplify.Poly:

Overload 2.

Args:
  • arg (ndarray)

Returns:

amplify.PolyArray[Dim]:

__rsub__(self, arg: float, /) PolyΒΆ
__rsub__(self, arg: ndarray[], /) PolyArray[Dim]

__rsub__

Overload 1.

Args:
  • arg (float)

Returns:

amplify.Poly:

Overload 2.

Args:
  • arg (ndarray)

Returns:

amplify.PolyArray[Dim]:

__rxor__(self, arg: bool, /) PolyΒΆ
__rxor__(self, arg: ndarray[dtype=bool], /) PolyArray[Dim]

__rxor__

Overload 1.

Args:
  • arg (bool)

Returns:

amplify.Poly:

Overload 2.

Args:
  • arg (ndarray)

Returns:

amplify.PolyArray[Dim]:

__str__(self) strΒΆ

__str__

Return type:

str

__sub__(self, arg: Poly | float, /) PolyΒΆ
__sub__(self, arg: ndarray[], /) PolyArray[Dim]

__sub__

Overload 1.

Args:
  • arg (amplify.Poly | float)

Returns:

amplify.Poly:

Overload 2.

Args:
  • arg (ndarray)

Returns:

amplify.PolyArray[Dim]:

__truediv__(self, arg: float, /) PolyΒΆ
__truediv__(self, arg: ndarray[], /) PolyArray[Dim]

__truediv__

Overload 1.

Args:
  • arg (float)

Returns:

amplify.Poly:

Overload 2.

Args:
  • arg (ndarray)

Returns:

amplify.PolyArray[Dim]:

__xor__(self, arg: Poly | bool, /) PolyΒΆ
__xor__(self, arg: ndarray[dtype=bool], /) PolyArray[Dim]

__xor__

Overload 1.

Args:
  • arg (amplify.Poly | bool)

Returns:

amplify.Poly:

Overload 2.

Args:
  • arg (ndarray)

Returns:

amplify.PolyArray[Dim]:

as_dict(self) dict[tuple[int, ...], float]ΒΆ

as_dict

Return type:

dict[tuple[int, …], float]

as_variable(self) VariableΒΆ

as_variable

Return type:

Variable

asdict(self) dict[tuple[int, ...], float]ΒΆ

alias of as_dict()

Return type:

dict[tuple[int, …], float]

decode(self, values: Values) floatΒΆ
decode(self, values: Values, default: float) float
decode(self, values: Values, default: None) Poly

decode

Overload 1.

Args:
  • values (amplify.Values)

Returns:

float:

Overload 2.

Args:
  • values (amplify.Values)

  • default (float)

Returns:

float:

Overload 3.

Args:
  • values (amplify.Values)

  • default (None)

Returns:

amplify.Poly:

degree(self) intΒΆ

degree

Return type:

int

evaluate(self, values: Values) floatΒΆ
evaluate(self, values: Values, default: float) float
evaluate(self, values: Values, default: None) Poly

evaluate

Overload 1.

Args:
  • values (amplify.Values)

Returns:

float:

Overload 2.

Args:
  • values (amplify.Values)

  • default (float)

Returns:

float:

Overload 3.

Args:
  • values (amplify.Values)

  • default (None)

Returns:

amplify.Poly:

is_linear(self) boolΒΆ

is_linear

Return type:

bool

is_number(self) boolΒΆ

is_number

Return type:

bool

is_quadratic(self) boolΒΆ

is_quadratic

Return type:

bool

is_variable(self) boolΒΆ

is_variable

Return type:

bool

substitute(
self,
mapping: Mapping[Poly, Poly | float | int] | Mapping[Variable, Poly | float | int],
) PolyΒΆ

substitute

Parameters:

mapping (Mapping[Poly, Poly | float | int] | Mapping[Variable, Poly | float | int])

Return type:

Poly

property idΒΆ

id property

Return type:

int

property lower_boundΒΆ

lower_bound property

Return type:

float | None

property nameΒΆ

name property

Return type:

str

property typeΒΆ

type property

Return type:

VariableType

property upper_boundΒΆ

upper_bound property

Return type:

float | None

property variablesΒΆ

variables property

Return type:

list[Variable]