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
__add__(self, arg: Constraint | ConstraintList, /) Model

__add__

Overloading:

1. __add__(self, arg: Union[amplify.Poly, float], /) -> amplify.Poly

Args:
  • arg (amplify.Poly | float):

Returns:

amplify.Poly:

2. __add__(self, arg: numpy.ndarray, /) -> amplify.PolyArray

Args:
  • arg (numpy.ndarray):

Returns:

amplify.PolyArray:

3. __add__(self, arg: Union[amplify.Constraint, amplify.ConstraintList], /) -> amplify.Model

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

Returns:

amplify.Model:

__and__(self, arg: Poly | bool, /) Poly¶
__and__(self, arg: ndarray[Any, dtype[bool_]], /) PolyArray

__and__

Overloading:

1. __and__(self, arg: Union[amplify.Poly, bool], /) -> amplify.Poly

Args:
  • arg (amplify.Poly | bool):

Returns:

amplify.Poly:

2. __and__(self, arg: numpy.ndarray[Any, numpy.dtype[numpy.bool_]], /) -> amplify.PolyArray

Args:
  • arg (numpy.ndarray):

Returns:

amplify.PolyArray:

__bool__(self) bool¶

__bool__

戻り値の型:

bool

__eq__(self, arg: Poly | float, /) bool¶

__eq__

パラメータ:

arg (Poly | float) --

戻り値の型:

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__

パラメータ:

arg (float) --

__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

__mul__

Overloading:

1. __mul__(self, arg: Union[amplify.Poly, float], /) -> amplify.Poly

Args:
  • arg (amplify.Poly | float):

Returns:

amplify.Poly:

2. __mul__(self, arg: numpy.ndarray, /) -> amplify.PolyArray

Args:
  • arg (numpy.ndarray):

Returns:

amplify.PolyArray:

__ne__(self, arg: Poly | float, /) bool¶

__ne__

パラメータ:

arg (Poly | float) --

戻り値の型:

bool

__neg__(self) Poly¶

__neg__

戻り値の型:

Poly

__or__(self, arg: Poly | bool, /) Poly¶
__or__(self, arg: ndarray[Any, dtype[bool_]], /) PolyArray

__or__

Overloading:

1. __or__(self, arg: Union[amplify.Poly, bool], /) -> amplify.Poly

Args:
  • arg (amplify.Poly | bool):

Returns:

amplify.Poly:

2. __or__(self, arg: numpy.ndarray[Any, numpy.dtype[numpy.bool_]], /) -> amplify.PolyArray

Args:
  • arg (numpy.ndarray):

Returns:

amplify.PolyArray:

__pos__(self) Poly¶

__pos__

戻り値の型:

Poly

__pow__(self, arg: int, /) Poly¶

__pow__

パラメータ:

arg (int) --

戻り値の型:

Poly

__radd__(self, arg: float, /) Poly¶
__radd__(self, arg: ndarray, /) PolyArray
__radd__(self, arg: Constraint | ConstraintList, /) Model

__radd__

Overloading:

1. __radd__(self, arg: float, /) -> amplify.Poly

Args:
  • arg (float):

Returns:

amplify.Poly:

2. __radd__(self, arg: numpy.ndarray, /) -> amplify.PolyArray

Args:
  • arg (numpy.ndarray):

Returns:

amplify.PolyArray:

3. __radd__(self, arg: Union[amplify.Constraint, amplify.ConstraintList], /) -> amplify.Model

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

Returns:

amplify.Model:

__rand__(self, arg: bool, /) Poly¶
__rand__(self, arg: ndarray[Any, dtype[bool_]], /) PolyArray

__rand__

Overloading:

1. __rand__(self, arg: bool, /) -> amplify.Poly

Args:
  • arg (bool):

Returns:

amplify.Poly:

2. __rand__(self, arg: numpy.ndarray[Any, numpy.dtype[numpy.bool_]], /) -> amplify.PolyArray

Args:
  • arg (numpy.ndarray):

Returns:

amplify.PolyArray:

__repr__(self) str¶

__repr__

戻り値の型:

str

__rmul__(self, arg: float, /) Poly¶
__rmul__(self, arg: ndarray, /) PolyArray

__rmul__

Overloading:

1. __rmul__(self, arg: float, /) -> amplify.Poly

Args:
  • arg (float):

Returns:

amplify.Poly:

2. __rmul__(self, arg: numpy.ndarray, /) -> amplify.PolyArray

Args:
  • arg (numpy.ndarray):

Returns:

amplify.PolyArray:

__ror__(self, arg: bool, /) Poly¶
__ror__(self, arg: ndarray[Any, dtype[bool_]], /) PolyArray

__ror__

Overloading:

1. __ror__(self, arg: bool, /) -> amplify.Poly

Args:
  • arg (bool):

Returns:

amplify.Poly:

2. __ror__(self, arg: numpy.ndarray[Any, numpy.dtype[numpy.bool_]], /) -> amplify.PolyArray

Args:
  • arg (numpy.ndarray):

Returns:

amplify.PolyArray:

__rsub__(self, arg: float, /) Poly¶
__rsub__(self, arg: ndarray, /) PolyArray

__rsub__

Overloading:

1. __rsub__(self, arg: float, /) -> amplify.Poly

Args:
  • arg (float):

Returns:

amplify.Poly:

2. __rsub__(self, arg: numpy.ndarray, /) -> amplify.PolyArray

Args:
  • arg (numpy.ndarray):

Returns:

amplify.PolyArray:

__rxor__(self, arg: bool, /) Poly¶
__rxor__(self, arg: ndarray[Any, dtype[bool_]], /) PolyArray

__rxor__

Overloading:

1. __rxor__(self, arg: bool, /) -> amplify.Poly

Args:
  • arg (bool):

Returns:

amplify.Poly:

2. __rxor__(self, arg: numpy.ndarray[Any, numpy.dtype[numpy.bool_]], /) -> amplify.PolyArray

Args:
  • arg (numpy.ndarray):

Returns:

amplify.PolyArray:

__str__(self) str¶

__str__

戻り値の型:

str

__sub__(self, arg: Poly | float, /) Poly¶
__sub__(self, arg: ndarray, /) PolyArray

__sub__

Overloading:

1. __sub__(self, arg: Union[amplify.Poly, float], /) -> amplify.Poly

Args:
  • arg (amplify.Poly | float):

Returns:

amplify.Poly:

2. __sub__(self, arg: numpy.ndarray, /) -> amplify.PolyArray

Args:
  • arg (numpy.ndarray):

Returns:

amplify.PolyArray:

__truediv__(self, arg: float, /) Poly¶
__truediv__(self, arg: ndarray, /) PolyArray

__truediv__

Overloading:

1. __truediv__(self, arg: float, /) -> amplify.Poly

Args:
  • arg (float):

Returns:

amplify.Poly:

2. __truediv__(self, arg: numpy.ndarray, /) -> amplify.PolyArray

Args:
  • arg (numpy.ndarray):

Returns:

amplify.PolyArray:

__xor__(self, arg: Poly | bool, /) Poly¶
__xor__(self, arg: ndarray[Any, dtype[bool_]], /) PolyArray

__xor__

Overloading:

1. __xor__(self, arg: Union[amplify.Poly, bool], /) -> amplify.Poly

Args:
  • arg (amplify.Poly | bool):

Returns:

amplify.Poly:

2. __xor__(self, arg: numpy.ndarray[Any, numpy.dtype[numpy.bool_]], /) -> amplify.PolyArray

Args:
  • arg (numpy.ndarray):

Returns:

amplify.PolyArray:

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 | None) Poly

decode

Overloading:

1. decode(self, values: amplify.Values) -> float

Args:
  • values (amplify.Values):

Returns:

float:

2. decode(self, values: amplify.Values, default: float) -> float

Args:
  • values (amplify.Values):

  • default (float):

Returns:

float:

3. decode(self, values: amplify.Values, default: Optional[None]) -> amplify.Poly

Args:
  • values (amplify.Values):

  • default (None | 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 | None) Poly

evaluate

Overloading:

1. evaluate(self, values: amplify.Values) -> float

Args:
  • values (amplify.Values):

Returns:

float:

2. evaluate(self, values: amplify.Values, default: float) -> float

Args:
  • values (amplify.Values):

  • default (float):

Returns:

float:

3. evaluate(self, values: amplify.Values, default: Optional[None]) -> amplify.Poly

Args:
  • values (amplify.Values):

  • default (None | 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: dict[Poly, Poly | float | int]) Poly¶

substitute

パラメータ:

mapping (dict[Poly, Union[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]