clamp

clamp(
poly: Poly,
bounds: tuple[float | None, float | None],
label: str = '',
*,
penalty_formulation: Literal['Default', 'IntegerVariable', 'RealVariable', 'Relaxation', 'LinearRelaxation', 'QuadraticRelaxation'] | PenaltyFormulation = PenaltyFormulation.Default,
) Constraint
clamp(
array: PolyArray[_Dim],
bounds: tuple[float | None, float | None],
label: str = '',
*,
penalty_formulation: Literal['Default', 'IntegerVariable', 'RealVariable', 'Relaxation', 'LinearRelaxation', 'QuadraticRelaxation'] | PenaltyFormulation = PenaltyFormulation.Default,
axis: Literal[None] = None,
) Constraint
clamp(
array: PolyArray[Dim],
bounds: tuple[float | None, float | None],
label: str = '',
*,
penalty_formulation: Literal['Default', 'IntegerVariable', 'RealVariable', 'Relaxation', 'LinearRelaxation', 'QuadraticRelaxation'] | PenaltyFormulation = PenaltyFormulation.Default,
axis: int | tuple[int, ...],
) Constraint | ConstraintList
clamp(
array: PolyArray[Dim1],
right: tuple[float | None, float | None],
label: str = '',
*,
penalty_formulation: Literal['Default', 'IntegerVariable', 'RealVariable', 'Relaxation', 'LinearRelaxation', 'QuadraticRelaxation'] | PenaltyFormulation = PenaltyFormulation.Default,
axis: int | tuple[int],
) Constraint
clamp(
array: PolyArray[Dim2],
right: tuple[float | None, float | None],
label: str = '',
*,
penalty_formulation: Literal['Default', 'IntegerVariable', 'RealVariable', 'Relaxation', 'LinearRelaxation', 'QuadraticRelaxation'] | PenaltyFormulation = PenaltyFormulation.Default,
axis: tuple[int, int],
) Constraint
clamp(
array: PolyArray[Dim2],
right: tuple[float | None, float | None],
label: str = '',
*,
penalty_formulation: Literal['Default', 'IntegerVariable', 'RealVariable', 'Relaxation', 'LinearRelaxation', 'QuadraticRelaxation'] | PenaltyFormulation = PenaltyFormulation.Default,
axis: int | tuple[int],
) ConstraintList
clamp(
array: PolyArray[Dim3],
right: tuple[float | None, float | None],
label: str = '',
*,
penalty_formulation: Literal['Default', 'IntegerVariable', 'RealVariable', 'Relaxation', 'LinearRelaxation', 'QuadraticRelaxation'] | PenaltyFormulation = PenaltyFormulation.Default,
axis: tuple[int, int, int],
) Constraint
clamp(
array: PolyArray[Dim3],
right: tuple[float | None, float | None],
label: str = '',
*,
penalty_formulation: Literal['Default', 'IntegerVariable', 'RealVariable', 'Relaxation', 'LinearRelaxation', 'QuadraticRelaxation'] | PenaltyFormulation = PenaltyFormulation.Default,
axis: int | tuple[int] | tuple[int, int],
) ConstraintList
clamp(
array: PolyArray[Dim4],
right: tuple[float | None, float | None],
label: str = '',
*,
penalty_formulation: Literal['Default', 'IntegerVariable', 'RealVariable', 'Relaxation', 'LinearRelaxation', 'QuadraticRelaxation'] | PenaltyFormulation = PenaltyFormulation.Default,
axis: tuple[int, int, int, int],
) Constraint
clamp(
array: PolyArray[Dim4],
right: tuple[float | None, float | None],
label: str = '',
*,
penalty_formulation: Literal['Default', 'IntegerVariable', 'RealVariable', 'Relaxation', 'LinearRelaxation', 'QuadraticRelaxation'] | PenaltyFormulation = PenaltyFormulation.Default,
axis: int | tuple[int] | tuple[int, int] | tuple[int, int, int],
) ConstraintList
clamp(
array: PolyArray[_Dim],
right: tuple[float | None, float | None],
label: str = '',
*,
penalty_formulation: Literal['Default', 'IntegerVariable', 'RealVariable', 'Relaxation', 'LinearRelaxation', 'QuadraticRelaxation'] | PenaltyFormulation = PenaltyFormulation.Default,
axis: tuple[()],
) ConstraintList

clamp

Overload 1.

Args:
  • poly (amplify.Poly)

  • bounds (tuple[float | None, float | None])

  • label (str): Defaults to ''.

  • penalty_formulation (typing.Literal['Default', 'IntegerVariable', 'RealVariable', 'Relaxation', 'LinearRelaxation', 'QuadraticRelaxation'] | amplify.PenaltyFormulation): Defaults to PenaltyFormulation.Default.

Returns:

amplify.Constraint:

Overload 2.

Args:
  • array (amplify.PolyArray[_Dim])

  • bounds (tuple[float | None, float | None])

  • label (str): Defaults to ''.

  • penalty_formulation (typing.Literal['Default', 'IntegerVariable', 'RealVariable', 'Relaxation', 'LinearRelaxation', 'QuadraticRelaxation'] | amplify.PenaltyFormulation): Defaults to PenaltyFormulation.Default.

  • axis (typing.Literal[None]): Defaults to None.

Returns:

amplify.Constraint:

Overload 3.

Args:
  • array (amplify.PolyArray[Dim])

  • bounds (tuple[float | None, float | None])

  • label (str): Defaults to ''.

  • penalty_formulation (typing.Literal['Default', 'IntegerVariable', 'RealVariable', 'Relaxation', 'LinearRelaxation', 'QuadraticRelaxation'] | amplify.PenaltyFormulation): Defaults to PenaltyFormulation.Default.

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

Returns:

amplify.Constraint | amplify.ConstraintList:

Overload 4.

Args:
  • array (amplify.PolyArray[Dim1])

  • right (tuple[float | None, float | None])

  • label (str): Defaults to ''.

  • penalty_formulation (typing.Literal['Default', 'IntegerVariable', 'RealVariable', 'Relaxation', 'LinearRelaxation', 'QuadraticRelaxation'] | amplify.PenaltyFormulation): Defaults to PenaltyFormulation.Default.

  • axis (int | tuple[int])

Returns:

amplify.Constraint:

Overload 5.

Args:
  • array (amplify.PolyArray[Dim2])

  • right (tuple[float | None, float | None])

  • label (str): Defaults to ''.

  • penalty_formulation (typing.Literal['Default', 'IntegerVariable', 'RealVariable', 'Relaxation', 'LinearRelaxation', 'QuadraticRelaxation'] | amplify.PenaltyFormulation): Defaults to PenaltyFormulation.Default.

  • axis (tuple[int, int])

Returns:

amplify.Constraint:

Overload 6.

Args:
  • array (amplify.PolyArray[Dim2])

  • right (tuple[float | None, float | None])

  • label (str): Defaults to ''.

  • penalty_formulation (typing.Literal['Default', 'IntegerVariable', 'RealVariable', 'Relaxation', 'LinearRelaxation', 'QuadraticRelaxation'] | amplify.PenaltyFormulation): Defaults to PenaltyFormulation.Default.

  • axis (int | tuple[int])

Returns:

amplify.ConstraintList:

Overload 7.

Args:
  • array (amplify.PolyArray[Dim3])

  • right (tuple[float | None, float | None])

  • label (str): Defaults to ''.

  • penalty_formulation (typing.Literal['Default', 'IntegerVariable', 'RealVariable', 'Relaxation', 'LinearRelaxation', 'QuadraticRelaxation'] | amplify.PenaltyFormulation): Defaults to PenaltyFormulation.Default.

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

Returns:

amplify.Constraint:

Overload 8.

Args:
  • array (amplify.PolyArray[Dim3])

  • right (tuple[float | None, float | None])

  • label (str): Defaults to ''.

  • penalty_formulation (typing.Literal['Default', 'IntegerVariable', 'RealVariable', 'Relaxation', 'LinearRelaxation', 'QuadraticRelaxation'] | amplify.PenaltyFormulation): Defaults to PenaltyFormulation.Default.

  • axis (int | tuple[int] | tuple[int, int])

Returns:

amplify.ConstraintList:

Overload 9.

Args:
  • array (amplify.PolyArray[Dim4])

  • right (tuple[float | None, float | None])

  • label (str): Defaults to ''.

  • penalty_formulation (typing.Literal['Default', 'IntegerVariable', 'RealVariable', 'Relaxation', 'LinearRelaxation', 'QuadraticRelaxation'] | amplify.PenaltyFormulation): Defaults to PenaltyFormulation.Default.

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

Returns:

amplify.Constraint:

Overload 10.

Args:
  • array (amplify.PolyArray[Dim4])

  • right (tuple[float | None, float | None])

  • label (str): Defaults to ''.

  • penalty_formulation (typing.Literal['Default', 'IntegerVariable', 'RealVariable', 'Relaxation', 'LinearRelaxation', 'QuadraticRelaxation'] | amplify.PenaltyFormulation): Defaults to PenaltyFormulation.Default.

  • axis (int | tuple[int] | tuple[int, int] | tuple[int, int, int])

Returns:

amplify.ConstraintList:

Overload 11.

Args:
  • array (amplify.PolyArray[_Dim])

  • right (tuple[float | None, float | None])

  • label (str): Defaults to ''.

  • penalty_formulation (typing.Literal['Default', 'IntegerVariable', 'RealVariable', 'Relaxation', 'LinearRelaxation', 'QuadraticRelaxation'] | amplify.PenaltyFormulation): Defaults to PenaltyFormulation.Default.

  • axis (tuple[()])

Returns:

amplify.ConstraintList: