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__

戻り値の型:

Iterator

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

__next__

戻り値の型:

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__

戻り値の型:

bool

__eq__(self, arg: object, /) bool

__eq__

パラメータ:

arg (object)

戻り値の型:

bool

__float__(self) float

__float__

戻り値の型:

float

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

__iadd__

パラメータ:

arg (Poly | float)

戻り値の型:

Poly

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

__iand__

パラメータ:

arg (Poly | bool)

戻り値の型:

Poly

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

__imul__

パラメータ:

arg (Poly | float)

戻り値の型:

Poly

__index__(self) int

__index__

戻り値の型:

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__

戻り値の型:

int

__invert__(self) Poly

__invert__

戻り値の型:

Poly

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

__ior__

パラメータ:

arg (Poly | bool)

戻り値の型:

Poly

__ipow__(self, arg: int, /) Poly

__ipow__

パラメータ:

arg (int)

戻り値の型:

Poly

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

__isub__

パラメータ:

arg (Poly | float)

戻り値の型:

Poly

__iter__(self) Iterator

__iter__

戻り値の型:

Iterator

__itruediv__(self, arg: float, /) Poly

__itruediv__

パラメータ:

arg (float)

戻り値の型:

Poly

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

__ixor__

パラメータ:

arg (Poly | bool)

戻り値の型:

Poly

__len__(self) int

__len__

戻り値の型:

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__

パラメータ:

arg (object)

戻り値の型:

bool

__neg__(self) Poly

__neg__

戻り値の型:

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__

戻り値の型:

Poly

__pow__(self, arg: int, /) Poly

__pow__

パラメータ:

arg (int)

戻り値の型:

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__

戻り値の型:

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__

戻り値の型:

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

戻り値の型:

dict[tuple[int, ...], float]

as_variable(self) Variable

as_variable

戻り値の型:

Variable

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

alias of as_dict()

戻り値の型:

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

戻り値の型:

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

戻り値の型:

bool

is_number(self) bool

is_number

戻り値の型:

bool

is_quadratic(self) bool

is_quadratic

戻り値の型:

bool

is_variable(self) bool

is_variable

戻り値の型:

bool

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

substitute

パラメータ:

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

戻り値の型:

Poly

property id

id property

戻り値の型:

int

property lower_bound

lower_bound property

戻り値の型:

float | None

property name

name property

戻り値の型:

str

property type

type property

戻り値の型:

VariableType

property upper_bound

upper_bound property

戻り値の型:

float | None

property variables

variables property

戻り値の型:

list[Variable]