clamp¶
- clamp(
- poly: Poly,
- bounds: tuple[float | None, float | None],
- label: str = '',
- *,
- penalty_formulation: Literal['Default', 'IntegerVariable', 'RealVariable', 'Relaxation', 'LinearRelaxation', 'QuadraticRelaxation'] | PenaltyFormulation = PenaltyFormulation.Default,
- 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,
- 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, ...],
- 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],
- 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],
- 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],
- 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],
- 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],
- 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],
- 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],
- 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[()],
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: