VariableGenerator

class VariableGenerator

Methods

__init__

__init__

array

array

matrix

matrix

scalar

scalar

Attributes

variables

variables property

__init__(self) None

__init__

array(
self,
type: Literal['Binary', 'Ising', 'Integer', 'Real'] | VariableType,
shape: tuple[()],
bounds: tuple[float | None, ...] = (None, None),
name: str = '',
) PolyArray[Dim0]
array(
self,
type: Literal['Binary', 'Ising', 'Integer', 'Real'] | VariableType,
shape: tuple[int] | int,
bounds: tuple[float | None, ...] = (None, None),
name: str = '',
) PolyArray[Dim1]
array(
self,
type: Literal['Binary', 'Ising', 'Integer', 'Real'] | VariableType,
shape: tuple[int, int],
bounds: tuple[float | None, ...] = (None, None),
name: str = '',
) PolyArray[Dim2]
array(
self,
type: Literal['Binary', 'Ising', 'Integer', 'Real'] | VariableType,
shape: tuple[int, int, int],
bounds: tuple[float | None, ...] = (None, None),
name: str = '',
) PolyArray[Dim3]
array(
self,
type: Literal['Binary', 'Ising', 'Integer', 'Real'] | VariableType,
shape: tuple[int, int, int, int],
bounds: tuple[float | None, ...] = (None, None),
name: str = '',
) PolyArray[Dim4]
array(
self,
type: Literal['Binary', 'Ising', 'Integer', 'Real'] | VariableType,
arg0: int,
) PolyArray[Dim1]
array(
self,
type: Literal['Binary', 'Ising', 'Integer', 'Real'] | VariableType,
arg0: int,
arg1: int,
) PolyArray[Dim2]
array(
self,
type: Literal['Binary', 'Ising', 'Integer', 'Real'] | VariableType,
arg0: int,
arg1: int,
arg2: int,
) PolyArray[Dim3]
array(
self,
type: Literal['Binary', 'Ising', 'Integer', 'Real'] | VariableType,
arg0: int,
arg1: int,
arg2: int,
arg3: int,
) PolyArray[Dim4]
array(
self,
type: Literal['Binary', 'Ising', 'Integer', 'Real'] | VariableType,
shape: tuple[int, int, int, int, int, typing_extensions.Unpack[tuple[int, ...]]],
bounds: tuple[float | None, ...] = (None, None),
name: str = '',
) PolyArray[Dim]
array(
self,
type: Literal['Binary', 'Ising', 'Integer', 'Real'] | VariableType,
*shape: int,
) PolyArray[Dim]

array

Overload 1.

Args:
  • type (typing.Literal['Binary', 'Ising', 'Integer', 'Real'] | amplify.VariableType)

  • shape (tuple[()])

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

  • name (str): Defaults to ''.

Returns:

amplify.PolyArray[Dim0]:

Overload 2.

Args:
  • type (typing.Literal['Binary', 'Ising', 'Integer', 'Real'] | amplify.VariableType)

  • shape (tuple[int] | int)

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

  • name (str): Defaults to ''.

Returns:

amplify.PolyArray[Dim1]:

Overload 3.

Args:
  • type (typing.Literal['Binary', 'Ising', 'Integer', 'Real'] | amplify.VariableType)

  • shape (tuple[int, int])

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

  • name (str): Defaults to ''.

Returns:

amplify.PolyArray[Dim2]:

Overload 4.

Args:
  • type (typing.Literal['Binary', 'Ising', 'Integer', 'Real'] | amplify.VariableType)

  • shape (tuple[int, int, int])

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

  • name (str): Defaults to ''.

Returns:

amplify.PolyArray[Dim3]:

Overload 5.

Args:
  • type (typing.Literal['Binary', 'Ising', 'Integer', 'Real'] | amplify.VariableType)

  • shape (tuple[int, int, int, int])

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

  • name (str): Defaults to ''.

Returns:

amplify.PolyArray[Dim4]:

Overload 6.

Args:
  • type (typing.Literal['Binary', 'Ising', 'Integer', 'Real'] | amplify.VariableType)

  • arg0 (int)

Returns:

amplify.PolyArray[Dim1]:

Overload 7.

Args:
  • type (typing.Literal['Binary', 'Ising', 'Integer', 'Real'] | amplify.VariableType)

  • arg0 (int)

  • arg1 (int)

Returns:

amplify.PolyArray[Dim2]:

Overload 8.

Args:
  • type (typing.Literal['Binary', 'Ising', 'Integer', 'Real'] | amplify.VariableType)

  • arg0 (int)

  • arg1 (int)

  • arg2 (int)

Returns:

amplify.PolyArray[Dim3]:

Overload 9.

Args:
  • type (typing.Literal['Binary', 'Ising', 'Integer', 'Real'] | amplify.VariableType)

  • arg0 (int)

  • arg1 (int)

  • arg2 (int)

  • arg3 (int)

Returns:

amplify.PolyArray[Dim4]:

Overload 10.

Args:
  • type (typing.Literal['Binary', 'Ising', 'Integer', 'Real'] | amplify.VariableType)

  • shape (tuple[int, int, int, int, int, typing_extensions.Unpack[tuple[int, ...]]])

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

  • name (str): Defaults to ''.

Returns:

amplify.PolyArray[Dim]:

Overload 11.

Args:
  • type (typing.Literal['Binary', 'Ising', 'Integer', 'Real'] | amplify.VariableType)

  • *shape (int)

Returns:

amplify.PolyArray[Dim]:

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

matrix

Overload 1.

Args:
  • type (typing.Literal['Binary', 'Ising', 'Integer', 'Real'] | amplify.VariableType)

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

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

  • name (str): Defaults to ''.

Returns:

amplify.Matrix:

Overload 2.

Args:
  • type (typing.Literal['Binary', 'Ising', 'Integer', 'Real'] | amplify.VariableType)

  • *shape (int)

Returns:

amplify.Matrix:

scalar(
self,
type: Literal['Binary', 'Ising', 'Integer', 'Real'] | VariableType,
bounds: tuple[float | None, ...] = (None, None),
name: str = '',
) Poly

scalar

パラメータ:
  • type (Literal['Binary', 'Ising', 'Integer', 'Real'] | amplify.VariableType)

  • bounds (tuple[float | None, ...]) -- Defaults to (None, None).

  • name (str) -- Defaults to ''.

戻り値の型:

Poly

property variables

variables property

戻り値の型:

list[Variable]