From 7cc37b7f49b144b4d40b73d90e3372020d30986e Mon Sep 17 00:00:00 2001 From: Apostolos Chalkis Date: Sat, 11 Nov 2023 17:01:58 -0700 Subject: [PATCH] change position of the new polytope module --- R-proj/src/polytopes_modules.cpp | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/R-proj/src/polytopes_modules.cpp b/R-proj/src/polytopes_modules.cpp index 510898ddd..253a11dfe 100644 --- a/R-proj/src/polytopes_modules.cpp +++ b/R-proj/src/polytopes_modules.cpp @@ -59,6 +59,20 @@ class VPinterVP { unsigned int dimension; int type; }; + +class PolytopeIntersectEllipsoid { +public: + PolytopeIntersectEllipsoid() {} + PolytopeIntersectEllipsoid(Rcpp::NumericMatrix _A, Rcpp::NumericVector _b, Rcpp::NumericMatrix _E) : A(_A), b(_b), E(_E), vol(std::numeric_limits::signaling_NaN()), dimension(_A.ncol()), type(6) {} + PolytopeIntersectEllipsoid(Rcpp::NumericMatrix _A, Rcpp::NumericVector _b, Rcpp::NumericMatrix _E, double volume) : A(_A), b(_b), E(_E), vol(volume), dimension(_A.ncol()), type(6) {} + Rcpp::NumericMatrix E; + Rcpp::NumericMatrix A; + Rcpp::NumericVector b; + double vol; + unsigned int dimension; + int type; +}; + #include using SpMat=Eigen::SparseMatrix ; class sparse_constraint_problem { @@ -81,19 +95,6 @@ class sparse_constraint_problem { int type; }; -class PolytopeIntersectEllipsoid { -public: - PolytopeIntersectEllipsoid() {} - PolytopeIntersectEllipsoid(Rcpp::NumericMatrix _A, Rcpp::NumericVector _b, Rcpp::NumericMatrix _E) : A(_A), b(_b), E(_E), vol(std::numeric_limits::signaling_NaN()), dimension(_A.ncol()), type(6) {} - PolytopeIntersectEllipsoid(Rcpp::NumericMatrix _A, Rcpp::NumericVector _b, Rcpp::NumericMatrix _E, double volume) : A(_A), b(_b), E(_E), vol(volume), dimension(_A.ncol()), type(6) {} - Rcpp::NumericMatrix E; - Rcpp::NumericMatrix A; - Rcpp::NumericVector b; - double vol; - unsigned int dimension; - int type; -}; - RCPP_MODULE(polytopes){ using namespace Rcpp ;