Skip to content

Commit

Permalink
change position of the new polytope module
Browse files Browse the repository at this point in the history
  • Loading branch information
Apostolos Chalkis committed Nov 12, 2023
1 parent bebef71 commit 7cc37b7
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions R-proj/src/polytopes_modules.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<double>::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 <RcppEigen.h>
using SpMat=Eigen::SparseMatrix<double> ;
class sparse_constraint_problem {
Expand All @@ -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<double>::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 ;

Expand Down

0 comments on commit 7cc37b7

Please sign in to comment.