Matrix

class Matrix

Methods

__init__

evaluate

evaluate

to_poly

to_poly

Attributes

constant

constant property

linear

linear property

quadratic

quadratic property

variable_array

variable_array property

__add__(self, arg: Constraint | ConstraintList, /) Model

__add__

Parameters:

arg (Constraint | ConstraintList)

Return type:

Model

__eq__(self, arg: object, /) bool

__eq__

Parameters:

arg (object)

Return type:

bool

__init__(*args, **kwargs)
__ne__(self, arg: object, /) bool

__ne__

Parameters:

arg (object)

Return type:

bool

__radd__(self, arg: Constraint | ConstraintList, /) Model

__radd__

Parameters:

arg (Constraint | ConstraintList)

Return type:

Model

__repr__(self) str

__repr__

Return type:

str

__str__(self) str

__str__

Return type:

str

evaluate(self, values: Values) float
evaluate(self, values: Values, default: float) float

evaluate

Overload 1.

Args:
  • values (amplify.Values)

Returns:

float:

Overload 2.

Args:
  • values (amplify.Values)

  • default (float)

Returns:

float:

to_poly(self) Poly

to_poly

Return type:

Poly

property constant

constant property

Return type:

float

property linear

linear property

Return type:

ndarray

property quadratic

quadratic property

Return type:

ndarray

property variable_array

variable_array property

Return type:

PolyArray[Dim]