VariableGenerator#

class VariableGenerator#

Methods

__init__

__init__

array

array

matrix

matrix

scalar

scalar

Attributes

variables

variables property

__init__(self) None#

__init__

array(
self,
type: str | VariableType,
shape: tuple[int, ...] | int,
bounds: tuple[float | None, ...] = (None, None),
name: str = '',
) PolyArray#
array(self, type: str | VariableType, *shape: int) PolyArray

array

Overloading:

1. array(self, type: Union[str, amplify.VariableType], shape: Union[tuple[int, ...], int], bounds: tuple[Optional[float], ...] = (None, None), name: str = '') -> amplify.PolyArray

Args:
  • type (str | amplify.VariableType):

  • shape (tuple[int, ...] | int):

  • bounds (tuple[Optional[float], ...]): Defaults to (None, None).

  • name (str): Defaults to ''.

Returns:

amplify.PolyArray:

2. array(self, type: Union[str, amplify.VariableType], *shape: int) -> amplify.PolyArray

Args:
  • type (str | amplify.VariableType):

  • *shape (int):

Returns:

amplify.PolyArray:

matrix(
self,
type: str | VariableType,
shape: int | tuple[int, ...],
bounds: tuple[float | None, ...] = (None, None),
name: str = '',
) Matrix#
matrix(self, type: str | VariableType, *shape: int) Matrix

matrix

Overloading:

1. matrix(self, type: Union[str, amplify.VariableType], shape: Union[int, tuple[int, ...]], bounds: tuple[Optional[float], ...] = (None, None), name: str = '') -> amplify.Matrix

Args:
  • type (str | amplify.VariableType):

  • shape (int | tuple[int, ...]):

  • bounds (tuple[Optional[float], ...]): Defaults to (None, None).

  • name (str): Defaults to ''.

Returns:

amplify.Matrix:

2. matrix(self, type: Union[str, amplify.VariableType], *shape: int) -> amplify.Matrix

Args:
  • type (str | amplify.VariableType):

  • *shape (int):

Returns:

amplify.Matrix:

scalar(self, type: str | VariableType, bounds: tuple = (None, None), name: str = '') Poly#

scalar

パラメータ:
戻り値の型:

Poly

property variables#

variables property

戻り値の型:

list[Variable]