C++ PolytopeWalk Utils

class LeverageScore

Public Functions

VectorXd generate(const SparseMatrixXd &A, const SparseMatrixXd &W, const VectorXd &x, const double ERR, const int k)

get the Leverage Score approximate calculation

Parameters:
  • A – polytope matrix (Ax = b)

  • W – Weight Matrix for slack

  • x – polytope vector (Ax = b)

  • ERR – error term

  • k – last k values have inequality constraint

Returns:

Vector

MatrixXd sparseFullWalkRun(int niter, SparseMatrixXd A, VectorXd b, int k, SparseRandomWalk *walk, FacialReduction *fr, SparseCenter *init, int burnin = 0, int thin = 1, int seed = -1)

runs full preprocessing, walk, and post-processing steps in sparse formulation

Parameters:
  • niter – number of steps

  • A – polytope matrix (Ax <= b)

  • b – polytope vector (Ax <= b)

  • k – last k coordinates >= 0

  • walk – sparse random walk implementation

  • fr – facial reduction algorithm

  • init – initialization algorithm

  • burnin – how many to exclude

  • thin – thinning parameter

  • seed – seed for reproducibility

Returns:

(niter - burnin)//thin by d (dimension of x) matrix

MatrixXd denseFullWalkRun(int niter, SparseMatrixXd A, VectorXd b, int k, RandomWalk *walk, FacialReduction *fr, DenseCenter *init, int burnin = 0, int thin = 1, int seed = -1)

runs full preprocessing, walk, and post-processing steps in dense formulation

Parameters:
  • niter – number of steps

  • A – polytope matrix (Ax = b)

  • b – polytope vector (Ax = b)

  • k – values >= 0 constraint

  • walk – dense random walk implementation

  • fr – facial reduction algorithm

  • init – initialization algorithm

  • burnin – how many to exclude

  • thin – thinning parameter

  • seed – seed for reproducibility

Returns:

(niter - burnin)//thin by d (dimension of x) matrix