hopsy.Problem#

class hopsy.Problem#

Attributes

A

Left-hand side operator A of the polytope-defining inequality Axb.

b

Right-hand side of the polytope-defining inequality Axb.

model

The model object defines the target distribution inside the polytope via its log_density().

original_A

If the Problem has been transformed, e.g., rounded, then sometimes one wants to reconstruct the original problem.

original_b

When the Problem has been transformed, e.g., rounded, then sometimes one wants to reconstruct the original problem.

shift

For preconditioning (e.g. polytope rounding) one may wish to transform the polytope defined by Axb as ATybAs where x = Ty + s.

starting_point

A single starting point as part of the problem.

transformation

For preconditioning (e.g. polytope rounding) one may wish to transform the polytope defined by Axb as ATybAs where x = Ty + s.

Methods

slacks(point)

Given a point` computes polytope slacks, i.e., b - A * x.