Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eigen implementation #29

Merged
merged 26 commits into from
Mar 23, 2020
Merged

Conversation

panagiotisrep
Copy link
Contributor

@panagiotisrep panagiotisrep commented Jun 18, 2019

Edit library to use Eigen

Previous implementation stored the points as std::vectors instead of Eigen::vectors. This change simplifies code development, as vectors and matrix operations from linear algebra are straightforward with Eigen data structures and its overloaded operators. Efficiently-wise, these operations are already optimized and we don't waste time transforming std::vectors to Eigen::vectors, when we want to call Eigen functions.

These three experiments demonstrate the efficiency of the changes (for the tests, random H-polytopes where created using the existing random H polytope generator, each with dimension d and 4*d facets). The times are in seconds, unless specified otherwise.

  • The first experiment is sampling 200k points, with random directions Hit & Run and walk length 1.
dimension std::vector Eigen
25 1.009355 0.7246635
50 2.479661 1.241152
75 4.747787 2.022221
100 7.764008 2.72889
125 11.93755 3.83849
150 16.85804 5.506322
175 22.6125 6.964348
200 29.18962 8.015872
  • Next, computing the volume using the cooling balls algorithm and billiard walk, with walk length 5:
dimension std::vector Eigen
25 0.460875 secs 0.2541442 secs
50 4.918885 secs 1.878829 secs
100 1.457848 mins 25.09328 secs
125 4.470907 mins 58.05041 secs
150 2.200887 mins
  • and again volume, with coordinate directions Hit & Run, with default walk length. As expected, with cdhr, there is no big difference.
dimension std::vector Eigen
25 0.302784 secs 0.2373805 secs
50 2.229054 secs 2.368777 secs
100 35.75031 secs 38.21298 secs
125 1.693295 mins 1.568712 mins
150 3.868966 mins 3.258222 mins

…std::vector. Made required code updates in polytopes.h, rounding.h,ballintersectconvex.h and updated CMakeLists.txt to include the directory with Eigen.
@vissarion vissarion requested review from TolisChal and vissarion July 18, 2019 11:08
Copy link
Member

@vissarion vissarion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR. My main comment is about copying the matrix (see comments in the code). Also, could you please update the copyright notes, i.e. you can add a
//Contributed and/or modified by ..., as part of Google Summer of Code 2019 program.

include/convex_bodies/ballintersectconvex.h Outdated Show resolved Hide resolved
include/convex_bodies/polytopes.h Outdated Show resolved Hide resolved
include/convex_bodies/polytopes.h Outdated Show resolved Hide resolved
include/rounding.h Outdated Show resolved Hide resolved
When accessing the data of class Point don't copy the whole vector, but use the [] operator (changes requested during the pull request).
clean existing code, make changes in leftover files with previous implementation
And change code to ude Eigen

# Conflicts:
#	R-proj/src/sample_points.cpp
#	include/cartesian_geom/point.h
#	include/convex_bodies/ballintersectconvex.h
#	include/convex_bodies/polytopes.h
#	include/solve_lp.h
- avoid creating copies
- code cleanup
- more coherent coding, using Eigen and eradicating std::vector
- Vectorize when possible the operations in line_intersect functions
- Change the matrix in HPolytope to be RowMajor
- change uses of std::vector to Eigen vector
- Change the matrix in HPolytope NOT to be RowMajor (seemed slower, needs more testing)
- enabled no debug macro for Eigen in /test/CmakeList
- added 2 tests, to compute volume with rdhr and with BiW
Error in creating Point
@vissarion
Copy link
Member

Thanks for this PR. I will review asap. Could you please specify which compiler and which flags you used for your timings.

@panagiotisrep
Copy link
Contributor Author

panagiotisrep commented Feb 18, 2020

Thanks for this PR. I will review asap. Could you please specify which compiler and which flags you used for your timings.

I used the existing flags, with g++ (Debian 8.3.0-6) and the current R interface (with R version 3.6.2) to time the experiments.

I did however, add the macro "EIGEN_NO_DEBUG" in the CMakeLists in folder /test. This macro skips several checks, which Eigen performs during runtime. Without it, the new implementation would be much slower than the previous. Judging from the timings, these checks should be skipped by default in RccpEigen.

test/CMakeLists.txt Outdated Show resolved Hide resolved
- Use eigen function noalias() to avoid creating temporary copies when multiplying matrices
- in getDirection() (samplers.h) don't use std::vector, only Eigen::Vector
- fix bug in point.h, in constructor
@vissarion vissarion force-pushed the develop branch 5 times, most recently from 9b01ec6 to c267f17 Compare February 27, 2020 13:45
include/rounding.h Outdated Show resolved Hide resolved
include/rounding.h Outdated Show resolved Hide resolved
Copy link
Member

@vissarion vissarion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@panagiotisrep thanks for answering the first comments.

I have a few more done after a second parsing. Most are minor and there is one regarding copying a matrix in the reflection on v- and z- polytopes.

@@ -28,7 +28,12 @@ NT esti_ratio(PolyBall1 &Pb1, PolyBall2 &Pb2, const NT &ratio, const NT &error,
bool print = var.verbose;
NT min_val = std::numeric_limits<NT>::lowest(), max_val = std::numeric_limits<NT>::max(), val, lambda;
size_t totCount = Ntot, countIn = Ntot * ratio;
std::vector<NT> last_W(W), lamdas(Pb1.num_of_hyperplanes()), Av(Pb1.num_of_hyperplanes());
std::vector<NT> last_W(W);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since last_W size does not change why not using std::array

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think std::array is a fixed size array and cannot allocate memory dynamically; we don't know W, right?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok thanks

include/cartesian_geom/point.h Outdated Show resolved Hide resolved
include/cartesian_geom/point.h Show resolved Hide resolved
include/cartesian_geom/point.h Outdated Show resolved Hide resolved
include/cartesian_geom/point.h Outdated Show resolved Hide resolved
include/samplers/simplex_samplers.h Outdated Show resolved Hide resolved
include/volume/cooling_balls.h Show resolved Hide resolved
include/volume/cooling_hpoly.h Outdated Show resolved Hide resolved
include/volume/copulas.h Outdated Show resolved Hide resolved
include/volume/exact_vols.h Show resolved Hide resolved
@vissarion vissarion merged commit bbab7ce into GeomScale:develop Mar 23, 2020
@vissarion vissarion added this to the 1.1.0 milestone Jun 1, 2020
vissarion pushed a commit that referenced this pull request Oct 26, 2020
* Changed class point to store coefficients to Eigen vector instead of  std::vector. Made required code updates in polytopes.h, rounding.h,ballintersectconvex.h and updated CMakeLists.txt to include the directory with Eigen.

* fixed bug

* fix for quicker access to data

When accessing the data of class Point don't copy the whole vector, but use the [] operator (changes requested during the pull request).

* Eigen

clean existing code, make changes in leftover files with previous implementation

* Optimizations

- avoid creating copies
- code cleanup
- more coherent coding, using Eigen and eradicating std::vector

* Optimizations

- Vectorize when possible the operations in line_intersect functions
- Change the matrix in HPolytope to be RowMajor

* Major

- change uses of std::vector to Eigen vector
- Change the matrix in HPolytope NOT to be RowMajor (seemed slower, needs more testing)
- enabled no debug macro for Eigen in /test/CmakeList
- added 2 tests, to compute volume with rdhr and with BiW

* Bug

Error in creating Point

* bug

* use cooling balls in test

* edit initialization

* edit /test/CMakeLists.txt

* Optimizations

- Use eigen function noalias() to avoid creating temporary copies when multiplying matrices
- in getDirection() (samplers.h) don't use std::vector, only Eigen::Vector
- fix bug in point.h, in constructor

* leftovers from merge

- make changes in code from last merge
- delete tests I had previously added

* cleanup - requested changes

* update copyrights

* bug

* bug

* requested changes

* use += *= operators with points

* use += *= operators with points
vissarion added a commit that referenced this pull request Nov 13, 2020
* fix example errors and logical checks in sample_points(). Fix errors in InnerBall tests.

* add Hpolytope converter from Rcpp::Reference.

* comment out te converter in Rvolume.cpp

* Reduce if statements in Rvolume to one and fix  bug in generate points on sphere function

* Add an example of volume computation

* Update README.md

* Update README.md

* Update README.md

* return 2d facets for inner ball in zonotopes. Shift polytope in SOB algo to origin, improve ball membership and boundary oracles.

* Rvolume: define the input variables, add wrappers to Rvolume function. Add modules for H,V-polytopes and zonotopes. All the exported classes have a field int 'type' in order to declare the representation of the polytope.

* modify the generators R functions. Create rcpp function sample_points.

* modify sample_points.

* add innerball.cpp, sample_points.cpp

* create rcpp funtions for exact volume computations, copulas, sliceofsimplex. Modify R functions for rounding, and random rotate.

* create rd files for all the rcpp functions and the polytopes modules as well. Delete temp folder.

* write the roxygen comments for the documentation. Change inputs for both R and rcpp internal functions of rounding and rotating. Change the roxygen comments accordingly.

* create the updated .Rd files and the pdf of the documentation

* add generators for H and V random polytopes. Update the documentation and fix bugs in sample_points and exact_vol functions. Make adjustments in the test functions.

* add boundary oracles for V-polytopes and zonotopes that use the feasible basis from the first LP for the second one in each HnR step.

* fix bug in rounding.cpp. Add Rd files by hand for polytope classes. Fix bugs from devtools::check().

* use switch instead of if-else if. Enable the c++ tests.

* use std::numeric_limits::max() and lowest().

* create Rd files for the exposed c++ classes. Use switch in poly_gen. Use break inside case:

* update the Rd files of the C++ classes and of the exposed classes through modules. Fix bugs in arbitrary simplex sampler. Fix bugs in examples, and  in the SOB function in volume.h in cran header.

* update the roxygen comments for the documentation.

* use walk_step instead of walk_length.Update the documentation.

* use var.cdhr_walk and var.rdhr_walk for the type of HnR.

* include volume.h

* solve a Note from the devtools::build_win(). Update the cran-comments.md in cran_gen folder.

* disable skinny_cube_20 for rounding test

* fix rounding test

* fix rounding test

* change the cran-comments.md file and add the correct date to description file.

* update the cran version readme and add the cran-comments.md file into inst folder in cran package. Update fileToMatrix documentation.

* update the cran version readme.

* modify description and update documentation

* fix urls in cran readme.md and remove cran-comments from the inst folder.

* fix c++ tests for cg algo.

* fix c++ tests

* update the documentation and the description file.

* fix tests for CG algo in H-rep.

* fix c++ tests

* Add pararellism to CI

* relax V-poly tests

* Update config.yml to execute tests in parallel

* Fix problem with parallel build

* fix cg test for zonotopes

* replace Eigen::Random() in rotating.cpp. Modify the return value of rotating and rand_rotate() in order to return the matrix of the linear map as well. Use wrappers in ExtractMatPoly.h and modigy poly_gen.cpp and R generator functions accordingly. Update the documentation and add ' in mis-spells in description file to avoid the cran Notes.

* fix namespace and add innerball implementation for the intersection of two V-polytopes and modify InnerBall.cpp, sample_points.cpp and volume.cpp accordingly. Add operater == to point.h.

* remove single quotes from description and change the varsion to 1.0.0

* change description.

* edit description file to declare contributors. Change \dontrun{} with \donttest{} in Rd files and modify polytope_modules.cpp to declare copyrights.

* add COPYRIGHTS file, add copyright and modification declarations in external/minimum_ellipsoid header files.

* move lp_solve to externals and modify makevars and lpsolve makefile accordingly, as well as the R script grcran.R

* Fixing references in description file

* generate new documentation.

* add AUTHORS file in inst folder and a reference in description files. This file contains the contributors of other packages. We update the documentation

* improve AUTHORS file, update documentation pdf, fix a bug in lp_solve.h for the membership of zonotope

* new header file for rotating and fix bugs of solaris building in minimum_ellipsoid in external.

* fix non-external bugs from solaris

* remove .Rhistory file

* Change \` with \' in COPYRIGHTS

* commit the version 1.0.2 with ficed bugs and cran violations.

* update NEWS file for version 1.0.2

* Update NEWS.md

* Delete R documentation pdf

* fix bug foe ine files, when the coefficients are seperated by tab.

* fix point == operator.

* remove unused flags from makevars, fix error in lp_MPS.c, set version 1.0.3

* fix cran warning in lpkit.h

* modify NEWS.md file

* change date in description file

* fix cg algo's c++ tests

* add new computation of V-polytope inscribed ball, by coomputing an inscribed cube first.

* implement functions is_feasible() and ComputeInnerBall() in intersection of VP class. Use them in Rcpp functions.

* remove unused comments and add a reference in point.h

* python wrapper for volesti (volestipy)

* added short readme

* use liblpsolve55.so (somwhere on machine) + clean setup.py

* nothing really

* updated readme

* updated readme

* updated readme

* some small cleanup, nothing substantial.

* removed dead code

* Update README.md

* Fix some pass by value parameters and useless imports and README in python interface

* Passing volume constants by reference (#50)

Passing volume constants by reference

* removed some typos form readme, added sequence of balls volume, bumped minor release (#52)

* Create CONTRIBUTING.md

* Create CODE_OF_CONDUCT.md (#53)

* Update issue templates

* split polytope classes and lp oracles functions in differetnt header files. Use pre-malloc in lp oracles.

* add new algo

* change the names of functions and inputs

* remove printing and fix includes of header files in cran version

* add boost header files for the new algo and fix the c++ interface

* improve the R documentation

* fix the R tests and improve R documentation

* fix R tests and bugs in examples of R functions. Fix a bug in c++ tests.

* update description, README.md, NEWS.md files for the new version and input variables' names in round_polytope R function.

* fix c++ tests

* change version and improve c++ code in new volume functions.

* implement the PR comments: declare const, improve names of functions and geeral coding

* define constants and add max number of iterations to check if the annealing fails. Update sample_points rd file. Fix bug in c++ generator.

* update description file and fix windows bug in ball_annealing.h

* fix template declarations and minor improvements in ratio_estimation.h

* minor improvments in exact_vol.h

* implment acceleration of rdhr for both volume and sampling.

* resolve PR in ball anealing and increase cdhr sliding window

* add billiard walk for volume

* add billiard to sample_points interface and fix documentation of R function of volume.

* improve rounding in R interface and documentation for sample_points and volume R functions.

* fix c++ interface and c++ tests

* update descriion file in R-proj

* update rd files

* fix bugs in Rd files and update the NEWS.md file

* improve the initialization of delta (ball_walk) and diameter. fix errors in doxumentation and update Rd files

* improve initialization of diameter for billiard walk. Fix C++ tests' bugs.

* remove volume.h file from cran version.

* use const variables and remove useless comments.

* reduce c++ cg volume test

* improve c++ interface and fix c++ tests

* Merge copula functions and new compute indicators R function (#56)

* merge two copulas functions into one.

* add compute_indicators R function.

* develop compute_indicator R function and copula.cpp in R-proj

* improve roxygen comments in compute_indicator R function and copula.cpp in R-proj

* fix bugs in copulas.cpp

* fix bugs in compute_indicators.R

* fix R tests for copulas and set to lowercase the inputvariables in the new functions

* improve compute_indicators.R

* Exact volume (#57)

* merge two copulas functions into one.

* add compute_indicators R function.

* develop compute_indicator R function and copula.cpp in R-proj

* improve roxygen comments in compute_indicator R function and copula.cpp in R-proj

* fix bugs in copulas.cpp

* fix bugs in compute_indicators.R

* fix R tests for copulas and set to lowercase the inputvariables in the new functions

* improve compute_indicators.R

* add volume field in R module polytope classes

* add volume declaration for known polytopes in R interface

* modify exact_vol.cpp in R interface

* set NaN the volume initialization in Rcpp modules of polytopes, update NEWS.md file

* modify namespace

* Improve interfaces, generators and bug fixes (#58)

* use cdhr in rounding, improve t-test iterations, change diameter of H-polytopes, minor modifications in both interfaces.

* improve c++ interface, add c++ test for cooling bodies with billiard walk

* improve new c++ test

* add random generators

* update R random generators

* update Rd files

* update R volume interface

* fix generators in both c++ and R interfaces, improve exact_volume check in c++ interface

* fix bug in hpoly zonotope volume approximation

* improve c++ documentation (help command)

* fix c++ tests

* fix c++ tests

* improve cpp generator interface

* improve cpp generator interface

* Zonotope approximation (#59)

* use cdhr in rounding, improve t-test iterations, change diameter of H-polytopes, minor mpdifications in both interfaces.

* improve c++ interface, add c++ test for cooling bodies with billiard walk

* improve new c++ test

* add random generators

* update R random generators

* update Rd files

* update R volume interface

* fix generators in both c++ and R interfaces, improve exact_volume check in c++ interface

* fix bug in hpoly zonotope volume approximation

* improve c++ documentation (help command)

* add zonotope_approximation in R interface. improve R volume and sample_points documentation

* fix c++ tests

* fix bug in zonotope approximation

Co-authored-by: Vissarion Fisikopoulos <[email protected]>

* Fix tests and issue #8 (#60)

* modify c++ tests

* improve input variable names in R functions

* check for negative error parameter in both interfaces

* update Rd files

* Update README.md

* Various improvements (tests, documentation, names) (#61)

* modify c++ tests

* improve input variable names in R functions

* check for negative error parameter in both interfaces

* update Rd files

* update compute_indicators

* update rotating R functions

* update sample_points.cpp

* update volume.cpp and Rd files

* update zonotope_approximation functons and the Rd files

* fix examples, tests, documentation errors

* update rounding and fix a bug in sample_points gaussian sampling, update Rd files, fix cran errors

* add the option to set seed for the random polytope generator

* fix cran check errors

* add boundary sampling in R interface

* add references in rounding functions and fix bug in vol.cpp

* README: folder name changed from R-prog to R-proj (#63)

* Folder name changed from R-prog to R-proj

* Delete .Rhistory

* Delete .Rhistory

* Delete RcppExports.cpp

* Readme correction and -help error in generator (#64)

* add mode and starting point as inputs in samlpe_points()

* fix #65

* add direct_sampling R function

* improve comp_diam() function in polytopes

* Update README.md

Closes #67

* Update README.md

* Fix bug in hpolytope print function (#68)

* Update readme, add `doc` directory and tutorials (#70)

* Use eigen types as internal structures (#29)

* Changed class point to store coefficients to Eigen vector instead of  std::vector. Made required code updates in polytopes.h, rounding.h,ballintersectconvex.h and updated CMakeLists.txt to include the directory with Eigen.

* fixed bug

* fix for quicker access to data

When accessing the data of class Point don't copy the whole vector, but use the [] operator (changes requested during the pull request).

* Eigen

clean existing code, make changes in leftover files with previous implementation

* Optimizations

- avoid creating copies
- code cleanup
- more coherent coding, using Eigen and eradicating std::vector

* Optimizations

- Vectorize when possible the operations in line_intersect functions
- Change the matrix in HPolytope to be RowMajor

* Major

- change uses of std::vector to Eigen vector
- Change the matrix in HPolytope NOT to be RowMajor (seemed slower, needs more testing)
- enabled no debug macro for Eigen in /test/CmakeList
- added 2 tests, to compute volume with rdhr and with BiW

* Bug

Error in creating Point

* bug

* use cooling balls in test

* edit initialization

* edit /test/CMakeLists.txt

* Optimizations

- Use eigen function noalias() to avoid creating temporary copies when multiplying matrices
- in getDirection() (samplers.h) don't use std::vector, only Eigen::Vector
- fix bug in point.h, in constructor

* leftovers from merge

- make changes in code from last merge
- delete tests I had previously added

* cleanup - requested changes

* update copyrights

* bug

* bug

* requested changes

* use += *= operators with points

* use += *= operators with points

* Fix non const parameters in rand_exp_range (#71)

Remove const from function parameter

* update input variable names in sample_points(), direct_sampling() and vpolytope-intersection R class

* change 'algo' to 'settings' in volume function. remove unused methods in c++ polytope classes

* update R tests and NEWS.md file

* update zonotope_approximation input variables

* delete cran package files

* Fix seed in gen_rand_hpoly (#74)

* update input variable names in sample_points(), direct_sampling() and vpolytope-intersection R class
* change 'algo' to 'settings' in volume function. remove unused methods in c++ polytope classes
* update R tests and NEWS.md file
* update zonotope_approximation input variables
* delete cran package files
* fix seed in rand_hpoly_generator

* new volume structure SoB plus random walks

* Use billiard walk in SOB algorithm (#75)

* fix seed in rand_hpoly_generator

* enable SOB algorithm with billiard walk

* enable SOB algorithm with billiard walk in c++ interface

* correct input list algo in Rcpp volume.cpp

* Update readme, add `doc` directory and tutorials (#70)

* Cleanup SoB volume algorithm

* New volume function example

* Optimization: move random generators creation outside of random walk helpers

* Expose rnd seed in highest level

* Random number generator struct

* RNG interface with fixed seed

* Design simpler Walk interface

* Ball walk for GC algorithm

* RDHR walk for GC algorithm

* CDHR walk for GC algorithm

* Update delta for ball walk and removing unused paremeter passing in gaussing cooling algorithm

* Fixing the scope of several variables in gaussian cooling

* Fixing the scope of variables and using const where possible in gausian annealing

* New design for cooling balls algorithm

* Improvements in rounding and rotating R functions (#76)

* add seed in rotate_polytope and update Rd files

* update R rounding function to return the linear map

* fix rounding in V-poly

* overloading rotating() function and remove unused comments

* Fix line_intersect function

* Add const refs, missing includes, const vars for tolerance, fix some code styling

* Remove unnecessary constructors in random walks, put const refs

* Fix non const parameters in rand_exp_range (#71)

Remove const from function parameter

* update input variable names in sample_points(), direct_sampling() and vpolytope-intersection R class

* change 'algo' to 'settings' in volume function. remove unused methods in c++ polytope classes

* update R tests and NEWS.md file

* update zonotope_approximation input variables

* delete cran package files

* Fix seed in gen_rand_hpoly (#74)

* update input variable names in sample_points(), direct_sampling() and vpolytope-intersection R class
* change 'algo' to 'settings' in volume function. remove unused methods in c++ polytope classes
* update R tests and NEWS.md file
* update zonotope_approximation input variables
* delete cran package files
* fix seed in rand_hpoly_generator

* Use billiard walk in SOB algorithm (#75)

* fix seed in rand_hpoly_generator

* enable SOB algorithm with billiard walk

* enable SOB algorithm with billiard walk in c++ interface

* Const references and styling for cooling balls algorithm

* Tests for sob algo using hpoly

* Benchmarks and tests (sob and gc algorithms)

* Tests for CB algorithms and various walks (expect to fail at this stage)

* Fix walk initialization for CB algorithm

* Fix tests for CB algorithm and hpolytopes

* Fixes in cooling gaussian algorithm and tests

* Fix accuracy of CDHR in CG

* Update delta after walk construction

* Tests for CG/vpolytopes

* Implementation of cb algorithm with H-polytopes in MMC for zonotopes  (#1)

* correct input list algo in Rcpp volume.cpp

* Improvements in rounding and rotating R functions (#76)

* add seed in rotate_polytope and update Rd files

* update R rounding function to return the linear map

* fix rounding in V-poly

* overloading rotating() function and remove unused comments

* implement zonotope volume computation with cb algorithm and hpoly in MMC

* fix all bugs in new cooling_hpoly algorithm and improve test function

* all tests for zonotopes with c algortihm passed successfully

* Fixing tests

* Passing walks as objects to volume with runtime arguments

* New rounding implementation ans volume approximation for V-poytopes intersection (#2)

* correct input list algo in Rcpp volume.cpp

* Improvements in rounding and rotating R functions (#76)

* add seed in rotate_polytope and update Rd files

* update R rounding function to return the linear map

* fix rounding in V-poly

* overloading rotating() function and remove unused comments

* implement zonotope volume computation with cb algorithm and hpoly in MMC

* fix all bugs in new cooling_hpoly algorithm and improve test function

* all tests for zonotopes with c algortihm passed successfully

* implmentation of diameter computation of all convex bodies except Vpoly-intersection

* add Vpolyintersection diameter computation and volume approximation

* new implmentation of rounding

* add rounding in zonotope volume approximation with Hpoly in MMC

* dispatching in ratio estimation

* update ratio estimation functions

* implmemrnt dispatching for diameter computation

* improve ratio estimation code structure

* Rcpp functions with the new structure (#3)

* correct input list algo in Rcpp volume.cpp

* Improvements in rounding and rotating R functions (#76)

* add seed in rotate_polytope and update Rd files

* update R rounding function to return the linear map

* fix rounding in V-poly

* overloading rotating() function and remove unused comments

* implement zonotope volume computation with cb algorithm and hpoly in MMC

* fix all bugs in new cooling_hpoly algorithm and improve test function

* all tests for zonotopes with c algortihm passed successfully

* implmentation of diameter computation of all convex bodies except Vpoly-intersection

* add Vpolyintersection diameter computation and volume approximation

* new implmentation of rounding

* add rounding in zonotope volume approximation with Hpoly in MMC

* dispatching in ratio estimation

* update ratio estimation functions

* implmemrnt dispatching for diameter computation

* improve ratio estimation code structure

* update declaration of parameters in random walks

* update parameter declaretion for both ball and billiard walks

* modify Rcpp expose for volume and sampling C++ functions

* modify Rcpp rounding function

* update rounding, sampling, volume rcpp dunctions: typedefs and includes

* modify zonotope approximation Rcpp function. minor changes to Rcpp volume and sampling functions

* fix compiler errors

* update d files

* fix compiler errors in c++ tests

* add seed in rounding and direct_sampling Rcpp functions

* add a second volume function to use fixed seed in Rcpp interface

* Restructuring volume algorithms and random walks

* Improvements and corrections in Rcpp functions (#4)

* correct input list algo in Rcpp volume.cpp

* Improvements in rounding and rotating R functions (#76)

* add seed in rotate_polytope and update Rd files

* update R rounding function to return the linear map

* fix rounding in V-poly

* overloading rotating() function and remove unused comments

* implement zonotope volume computation with cb algorithm and hpoly in MMC

* fix all bugs in new cooling_hpoly algorithm and improve test function

* all tests for zonotopes with c algortihm passed successfully

* implmentation of diameter computation of all convex bodies except Vpoly-intersection

* add Vpolyintersection diameter computation and volume approximation

* new implmentation of rounding

* add rounding in zonotope volume approximation with Hpoly in MMC

* dispatching in ratio estimation

* update ratio estimation functions

* implmemrnt dispatching for diameter computation

* improve ratio estimation code structure

* update declaration of parameters in random walks

* update parameter declaretion for both ball and billiard walks

* modify Rcpp expose for volume and sampling C++ functions

* modify Rcpp rounding function

* update rounding, sampling, volume rcpp dunctions: typedefs and includes

* modify zonotope approximation Rcpp function. minor changes to Rcpp volume and sampling functions

* fix compiler errors

* update d files

* fix compiler errors in c++ tests

* add seed in rounding and direct_sampling Rcpp functions

* add a second volume function to use fixed seed in Rcpp interface

* fix rcpp interface

* Removing old implementation files and renaming

* Improvements in rounding and rotating R functions (#76)

* add seed in rotate_polytope and update Rd files

* update R rounding function to return the linear map

* fix rounding in V-poly

* Remove duplicate seed from rcpp

* Enable tests for CB algorithm with V-cubes

* Removing unused variables, setting const refs where needed

* Add simple github actions CI for gcc and clang (#80)

* Fix CRAN interface (#81)

* pass cran check

* fix billiard initialization, rounding shifting and seeding

* add seed to copula computations

* cran actions

* Improvements on cran tests and R interface (#83)

* fix windows errors in cran checks

* update Rd files, fix bugs in direct_sampling and boundary sampling

* improve R tests, update description file and fix seeding in cooling hpoly

* re order template classes in volume functions

* remove skiping for 32-bit in R tests

* fix declaration of random walks for uniform sampling

* fix the default value of the ball walk radius, fix zonotope c++ test

* fix c++ tests

* fix c++ tests

* fix memory leak in cg algorithm. update R examples and tests

* remove unused comments

* update dicumentation and Rd files

* fix error in lpsolve, seeding in vpolytopeintersection and c++ tests

* fix vpolytope-intersection c++ test

* Update/restructure Readme (#84)



* Update README

* Update README

* Sdpa format (#36)

* expose Spectrahedron interface to R

- create class spectrahedron
- expose function to write sdpa format files in R

* expose read_sdpa function to R and documentation

* R documentation and examples

- fix examples
- add data for example
- add roxygen comments

* tests for sdpa format manager

- add copyrights headers
- add test that writes and reads a sdpa format file
- add the test in test/CMakeLists.txt

* add example code for sdpa files

- create folder examples in root
- add an example main to read / write sdpa format files

* fix file format

* fix file encoding

* use soft wrap with lines

* create folder spectrahedra

- move in new folder spectrahedron.h, LMI.h
- update CMakeLists.txt in folder examples, tests
- update Makevars in R-prog/src and in cran_gen
- add documentation for sdpa file example

* examples/spectrahedra documentation

* examples/spectrahedra documentation

fix headers

* rename R modules

- rename module in polytopes_modules.cpp to "polytopes"
- rename module in spectrahedron_module.cpp to "spectrahedron"
- fix dates in copyrights headers in files
- add a newline in end of file spectrahedron.h

* make LMI::getMatrices() return std::vector const &

Also fix parameters documentation in R for functions

- readSDPAFormatFile
- loadSDPAFormatFile
- writeSDPAFormatFile

* rename typedefs in spectrahedron.cpp

- rename SPECTRAHEDRON typedef to Spectrahedron
- remove unneeded class _Spectrahedron in spectrahedron.cpp

* Activate tests in github actions (and clang sanitizer) (#85)

* Use actions with -fsanitize=memory

* Use actions with -fsanitize=memory

* Use actions with -fsanitize=memory

* actions for R

* fix clang++ segmentation fault (#87)

* fix clang++ segmentation fault

There was a problem with clang when accessing elements of vector spectrahedron.getLMI().getMatrices()

- getMatrices() returns std::vector const &. The fix was to make Spectrahedron class method getLMI() return LMI const &
- also make LMI constructor take parameter const &, not just &

* fix #include paths

* Fix deprecated ftime in lpsolve and update README (#89)

* CRAN version 1.1.2 (#118)

* fix review comments on R package

* update R interface in volume and sample_points

* update Rcpp modules and S4 classes

* replace modules with R classes

* update R documentation

* fix R tests

* fix R bugs

* add hpoly new generator, fix bugs in rounding with biw

* update the Rd files

* fix c++ tests and a bug in volume.coo

* fix c++ test

* update polytope random generators in R, update rd files

* fix bugs in R interface

* seperate sdp functions

* Squash commits into one

* Revert "Max ball param in generate_samples and rounding (#115)"

This reverts commit 1bd54f2.

* Remove std::cout

* Max ball param in generate_samples and rounding (#115)

* Update volestipy.pyx

* Update bindings.cpp

* Update bindings.h

* Update setup.py

* Update bindings.h

* Update setup.py

* Update setup_old.py

* Update bindings.cpp

* Update setup.py

* Update setup.py

* Update volestipy.pyx

* Update test1.py

* Create test1_old.py

* Update test1.py

* Update volestipy.pyx

* Update bindings.cpp

* Update bindings.h

* Update volestipy.pyx

* Update bindings.cpp

* Update bindings.h

* Update bindings.h

* Update bindings.cpp

* Update bindings.h

* Update bindings.cpp

* Update volestipy.pyx

* Update volestipy.pyx

* Update bindings.cpp

* Update bindings.h

* Update bindings.h

* Update bindings.cpp

* Update volestipy.pyx

* Update bindings.h

* Update bindings.cpp

* Update bindings.h

* Update setup.py

* Update bindings.cpp

* Update bindings.h

* Update bindings.cpp

* Update volestipy.pyx

* Update bindings.cpp

* Update bindings.h

* Update bindings.cpp

* Update volestipy.pyx

* Update volume_cb_hpolytope.cpp

* Update test1.py

* Update bindings.cpp

* Update test1.py

* Update volestipy.pyx

* Update bindings.cpp

* Update bindings.h

* Update bindings.cpp

* Update volestipy.pyx

* Update volestipy.pyx

* Update bindings.cpp

* Update bindings.h

* Create .gitignore

* Delete test1_old.py

* Delete setup_old.py

* Delete bindings_old.h

* Delete bindings_old.cpp

* Delete volestipy_old.pyx

* Update volestipy.pyx

* Update bindings.cpp

* Update bindings.h

* Update .gitignore

* Update volume_cb_hpolytope.cpp

* Update test1.py

* Update test2.py

* Update bindings.h

* Update setup.py

* Update credits.md

* on .gitignore: files on test/Testing/Temporary/ were removed from the .gitignore file

* first attempt - not working - for rounding

* rounding function: does not work; trying to figure it out

* round_val now works; still new_A and new_b need to be included

* Create metabolic_net_pipeline.ipynb

* Update metabolic_net_pipeline.ipynb

* Update metabolic_net_pipeline.ipynb

* Update metabolic_net_pipeline.ipynb

* Update metabolic_net_pipeline.ipynb

* Update metabolic_net_pipeline.ipynb

* Update volestipy.pyx

* Update bindings.cpp

* Create test_rounding.py

* Create test1.py

* Create test2.py

* Delete test2.py

* Update test1.py

* Create metabolic_net_pipeline-checkpoint.ipynb

* Update setup.py

* Update .gitignore

* Delete test1.py

git rm test1.py

* Delete test2.py

git rm test2.py

* Update bindings.h

new class for the preprocessing and the get_full_dimensional_polytope() function in the bindings.h

* Update bindings.cpp

new class for the preprocessing and the get_full_dimensional_polytope() function in the bindings.cpp

* Update volestipy.pyx

new class for the preprocessing and the get_full_dimensional_polytope() function in the volestipy.pyx

* Update bindings.h

working on the lowDimHPolytopeCPP class - just a draft with the main ideas, not a stable version

* Update bindings.cpp

working on the lowDimHPolytopeCPP class - just a draft with the main ideas, not a stable version

* Update volestipy.pyx

working on the lowDimHPolytopeCPP class - just a draft with the main ideas, not a stable version

* Update bindings.h

set member variables for lowDimHPolytopeCPP class

* Update bindings.cpp

remove unessecary vars

* Update volestipy.pyx

remove unecessary vars in self.full_dim_polytope

* Update bindings.h

build the instructor for the full_dimensional_polytope() function

* Update bindings.cpp

1st draft for the get_full_dimensional_polytope() function

* Update volestipy.pyx

1st draft for the python interface of the get_full_dimensional_polytope() function

* Update bindings.h

using transpose matrices for N and A_full
removing the "extra" from the shift and b_full vectors as it is not needed

* Update bindings.cpp

2nd draft for the lowDimHPolytopeCPP class.
we changed the N and A_full matrices to transpose to feed them in the cpp file like this.
we removed the _extra from the vectors

* Update volestipy.pyx

2nd draft for the lowDimHPolytopeCPP class.
changed "_extra" vectors when needed.
first draft that actually compiles

* Create test_get_full_dim_polytope.py

test file for the get_full_dimensional_polytope function
not ready yet

* Update test_get_full_dim_polytope.py

changed the Aeq

* Update test_get_full_dim_polytope.py

final test for the get_full_dimensional_polytope() function

* Update bindings.cpp

print the N transpose and the full A transpose matrices from the C++ code

* Update volestipy.pyx

Attention! What C++ returns is the transpose matrix.
Thus, the [i,j] element of the full A is the [j,i] of what C++ returns. That is what we fixed here

* Update test_get_full_dim_polytope.py

print all the outputs of the get_full_dimensional_polytope() function

* Update bindings.cpp

remove test prints

* Update volestipy.pyx

remove test printing statements
add all the output in the return statement on the get_full_dim_polytope()
improved comments

* Delete metabolic_net_pipeline.ipynb

remove the jupyter notebook

* Delete metabolic_net_pipeline-checkpoint.ipynb

remove the hidden directory for the jupyter notebook

* Update volestipy.pyx

Exceptions for the low_dim_polytope_cpp constructor added.
Deletion of the A_full and the b_full variables after the initialization of the object.

* Update bindings.h

CheBall was removed from the case of the lowDimHPolytopeCPP

* Update volestipy.pyx

just some functions of gurobipy

* Update volestipy.pyx

first draft for the pre_process() python function

* Create test_preprocess.py

a test file for the pre_process() function

* Update volestipy.pyx

correct obj function. Aeq line was replaced by a such from A.

* Update volestipy.pyx

make dependencies more readable

* Update volestipy.pyx

test sparse function

* Update test_preprocess.py

change dimensions

* Update volestipy.pyx

loop for all the lines of A and models for each of those and its minus

* Update test_preprocess.py

change the dimensions

* Update volestipy.pyx

draft to check whether it works fine!

* Update volestipy.pyx

change name in model.addConstr from "c2" to "c" in all the constraints described, fixed the solutions
remove unecessary print statements

* Update test_preprocess.py

add print statement for the results of the pre_process() function

* Update test_preprocess.py

build Aeq in a way to be more like to a stoichiometric matrix

* Update volestipy.pyx

add model.update() and model.display() function every time we add constraints or change the objective function

* Update volestipy.pyx

correct typo in comment

* Update volestipy.pyx

add model.update() after the obj function for the minus A[i,]

* Update volestipy.pyx

add print statements

* Update volestipy.pyx

attempt to solve the issue with the solutions

* Update volestipy.pyx

addMConstrs

* Update volestipy.pyx

setMObjective()

* Update volestipy.pyx

correct objectives()

* Update volestipy.pyx

make minus obj function as it should be

* Update volestipy.pyx

remove print not needed statements
make code more readable

* Update test_preprocess.py

change permission in test

* Update test_preprocess.py

add import volestipy in test_preprocess.py

* Update volestipy.pyx

remove solutions and their corresponding print statements
add new line in the end of the file

* Update volestipy.pyx

correct comment

* add bigg file of e.coli in .mat format

* add a BIGG file in .json format

* add function to read bigg files in .json format; keep the Aeq

* develop the read json format bigg file function

* add test file for reading json bigg files

* add function for reading json bigg files

* new directory for the bigg example files

* improved function for reading json bigg files; Aeq is now m*n

* print metabolites and reaction in the test for json

* add function to read .mat bigg files

* one test file for reading both json and mat bigg files

* remove unecessary print statements

* comment in the head of the file describing its purpose

* update documentation on how to install volestipy

* improved documentation for the dependencies

* remember to explain how to get lpsolve

* remember to explain how to get lpsolve

* remember to explain how to get lpsolve

* remember to explain how to get lpsolve

* test with RECON1 for the pre-processing step were performed successfully

* export .npy files with the outcome of the pre_process function so the user can load them any time

* change the input file to e_coli_core

* print files with the output of get_full_dim() and rounding() ; start function for inner ball

* small changes to check data types

* convertions to numpy arrays

* complete read-preprocess-get_full_dim steps

* add data types in .gitignore file

* add a test with all the steps of the pipeline

* draft for max ball

* test for computing max ball

* include get_max_ball() function

* remove last empty lines

* add emppty last line

* lp_solve replaced by lpsolve

* rounding step included in the full pipeline test

* add comput_max_ball in the pipeline

* fixed type for the r variable; sre_parse related issue

* remove unecessary library

* clean up a bit

* Update volestipy.pyx

empty last line

* Update bindings.cpp

add empty last line

* improve rounding

* fix svd rounding

* add max_ball arguments in the rounding function

* add max_ball if statement in rounding funcion

* fix cheball in rounding

* change variable name

* add max ball in rounding function

* add semicolomn

* add extra variable inner_point_for_c to feed the .cpp with the inner point

* change test file to include the max ball output as parameter to the rounding function

* replace integer zero values in the bydefault inner point list, with fload zeros; this way we fixed bug according to which the inner_point_for_c was waiting for double but got long

* replace if statement for max ball in rounding

* add arguments in generate_samples() for the case that max_ball has been included

* add cases for running generate_samples depending max ball input

* feed sampling with max_ball params

* add part for generate samples

* change sampling function to support max ball and L params

* change the way set_L and max_ball bool vars are set

* python interface initialization

* add accelerated_billiard variable

* remove wrong '=' sign

* remove const from end of void set_InnerBall functions

* include sampling on rounded polytope using max ball function

* max ball on rounded polytope

* change by default number_of_points_to_burn

* complete test pipeline

* function for mapping sampled points to the initial polytope added

* remove blank lines

* remove blank line

* clean code; split long lines

* add blank last line

* add features till get full dimensional polytope

* before plotiing

* plol it

* histogram added

* reaction 35 for plotting

* add print statement for dimension

* testing recon1

* testing for recon1

* notebook checkpoints

* add returning min and max fluxes vectors in pre-processing

* ignore png files

* return float numpy types from read function

* add tests for e coli and plot samples

* e coli full example

* further chechpoints

Co-authored-by: Tolis <[email protected]>

* Regenerate R docs

* Update date field and add redirection to examples

* Reorder initializations

* Correct example

* Add high dimensional test

* Add high-dimensional example

* Add example for random H-polytope with Gaussian centered at the Chebyshev center

Co-authored-by: tolischal <[email protected]>
Co-authored-by: Vissarion Fysikopoulos <[email protected]>
Co-authored-by: Vissarion Fisikopoulos <[email protected]>
Co-authored-by: pedrozudo <[email protected]>
Co-authored-by: Sharat-Bhat <[email protected]>
Co-authored-by: KunalKatiyar <[email protected]>
Co-authored-by: Vaibhav Thakkar <[email protected]>
Co-authored-by: Panagiotis Repouskos <[email protected]>
Co-authored-by: hariszaf <[email protected]>
papachristoumarios added a commit to papachristoumarios/volume_approximation that referenced this pull request Feb 26, 2021
* fix example errors and logical checks in sample_points(). Fix errors in InnerBall tests.

* add Hpolytope converter from Rcpp::Reference.

* comment out te converter in Rvolume.cpp

* Reduce if statements in Rvolume to one and fix  bug in generate points on sphere function

* Add an example of volume computation

* Update README.md

* Update README.md

* Update README.md

* return 2d facets for inner ball in zonotopes. Shift polytope in SOB algo to origin, improve ball membership and boundary oracles.

* Rvolume: define the input variables, add wrappers to Rvolume function. Add modules for H,V-polytopes and zonotopes. All the exported classes have a field int 'type' in order to declare the representation of the polytope.

* modify the generators R functions. Create rcpp function sample_points.

* modify sample_points.

* add innerball.cpp, sample_points.cpp

* create rcpp funtions for exact volume computations, copulas, sliceofsimplex. Modify R functions for rounding, and random rotate.

* create rd files for all the rcpp functions and the polytopes modules as well. Delete temp folder.

* write the roxygen comments for the documentation. Change inputs for both R and rcpp internal functions of rounding and rotating. Change the roxygen comments accordingly.

* create the updated .Rd files and the pdf of the documentation

* add generators for H and V random polytopes. Update the documentation and fix bugs in sample_points and exact_vol functions. Make adjustments in the test functions.

* add boundary oracles for V-polytopes and zonotopes that use the feasible basis from the first LP for the second one in each HnR step.

* fix bug in rounding.cpp. Add Rd files by hand for polytope classes. Fix bugs from devtools::check().

* use switch instead of if-else if. Enable the c++ tests.

* use std::numeric_limits::max() and lowest().

* create Rd files for the exposed c++ classes. Use switch in poly_gen. Use break inside case:

* update the Rd files of the C++ classes and of the exposed classes through modules. Fix bugs in arbitrary simplex sampler. Fix bugs in examples, and  in the SOB function in volume.h in cran header.

* update the roxygen comments for the documentation.

* use walk_step instead of walk_length.Update the documentation.

* use var.cdhr_walk and var.rdhr_walk for the type of HnR.

* include volume.h

* solve a Note from the devtools::build_win(). Update the cran-comments.md in cran_gen folder.

* disable skinny_cube_20 for rounding test

* fix rounding test

* fix rounding test

* change the cran-comments.md file and add the correct date to description file.

* update the cran version readme and add the cran-comments.md file into inst folder in cran package. Update fileToMatrix documentation.

* update the cran version readme.

* modify description and update documentation

* fix urls in cran readme.md and remove cran-comments from the inst folder.

* fix c++ tests for cg algo.

* fix c++ tests

* update the documentation and the description file.

* fix tests for CG algo in H-rep.

* fix c++ tests

* Add pararellism to CI

* relax V-poly tests

* Update config.yml to execute tests in parallel

* Fix problem with parallel build

* fix cg test for zonotopes

* replace Eigen::Random() in rotating.cpp. Modify the return value of rotating and rand_rotate() in order to return the matrix of the linear map as well. Use wrappers in ExtractMatPoly.h and modigy poly_gen.cpp and R generator functions accordingly. Update the documentation and add ' in mis-spells in description file to avoid the cran Notes.

* fix namespace and add innerball implementation for the intersection of two V-polytopes and modify InnerBall.cpp, sample_points.cpp and volume.cpp accordingly. Add operater == to point.h.

* remove single quotes from description and change the varsion to 1.0.0

* change description.

* edit description file to declare contributors. Change \dontrun{} with \donttest{} in Rd files and modify polytope_modules.cpp to declare copyrights.

* add COPYRIGHTS file, add copyright and modification declarations in external/minimum_ellipsoid header files.

* move lp_solve to externals and modify makevars and lpsolve makefile accordingly, as well as the R script grcran.R

* Fixing references in description file

* generate new documentation.

* add AUTHORS file in inst folder and a reference in description files. This file contains the contributors of other packages. We update the documentation

* improve AUTHORS file, update documentation pdf, fix a bug in lp_solve.h for the membership of zonotope

* new header file for rotating and fix bugs of solaris building in minimum_ellipsoid in external.

* fix non-external bugs from solaris

* remove .Rhistory file

* Change \` with \' in COPYRIGHTS

* commit the version 1.0.2 with ficed bugs and cran violations.

* update NEWS file for version 1.0.2

* Update NEWS.md

* Delete R documentation pdf

* fix bug foe ine files, when the coefficients are seperated by tab.

* fix point == operator.

* remove unused flags from makevars, fix error in lp_MPS.c, set version 1.0.3

* fix cran warning in lpkit.h

* modify NEWS.md file

* change date in description file

* fix cg algo's c++ tests

* add new computation of V-polytope inscribed ball, by coomputing an inscribed cube first.

* implement functions is_feasible() and ComputeInnerBall() in intersection of VP class. Use them in Rcpp functions.

* remove unused comments and add a reference in point.h

* python wrapper for volesti (volestipy)

* added short readme

* use liblpsolve55.so (somwhere on machine) + clean setup.py

* nothing really

* updated readme

* updated readme

* updated readme

* some small cleanup, nothing substantial.

* removed dead code

* Update README.md

* Fix some pass by value parameters and useless imports and README in python interface

* Passing volume constants by reference (GeomScale#50)

Passing volume constants by reference

* removed some typos form readme, added sequence of balls volume, bumped minor release (GeomScale#52)

* Create CONTRIBUTING.md

* Create CODE_OF_CONDUCT.md (GeomScale#53)

* Update issue templates

* split polytope classes and lp oracles functions in differetnt header files. Use pre-malloc in lp oracles.

* add new algo

* change the names of functions and inputs

* remove printing and fix includes of header files in cran version

* add boost header files for the new algo and fix the c++ interface

* improve the R documentation

* fix the R tests and improve R documentation

* fix R tests and bugs in examples of R functions. Fix a bug in c++ tests.

* update description, README.md, NEWS.md files for the new version and input variables' names in round_polytope R function.

* fix c++ tests

* change version and improve c++ code in new volume functions.

* implement the PR comments: declare const, improve names of functions and geeral coding

* define constants and add max number of iterations to check if the annealing fails. Update sample_points rd file. Fix bug in c++ generator.

* update description file and fix windows bug in ball_annealing.h

* fix template declarations and minor improvements in ratio_estimation.h

* minor improvments in exact_vol.h

* implment acceleration of rdhr for both volume and sampling.

* resolve PR in ball anealing and increase cdhr sliding window

* add billiard walk for volume

* add billiard to sample_points interface and fix documentation of R function of volume.

* improve rounding in R interface and documentation for sample_points and volume R functions.

* fix c++ interface and c++ tests

* update descriion file in R-proj

* update rd files

* fix bugs in Rd files and update the NEWS.md file

* improve the initialization of delta (ball_walk) and diameter. fix errors in doxumentation and update Rd files

* improve initialization of diameter for billiard walk. Fix C++ tests' bugs.

* remove volume.h file from cran version.

* use const variables and remove useless comments.

* reduce c++ cg volume test

* improve c++ interface and fix c++ tests

* Merge copula functions and new compute indicators R function (GeomScale#56)

* merge two copulas functions into one.

* add compute_indicators R function.

* develop compute_indicator R function and copula.cpp in R-proj

* improve roxygen comments in compute_indicator R function and copula.cpp in R-proj

* fix bugs in copulas.cpp

* fix bugs in compute_indicators.R

* fix R tests for copulas and set to lowercase the inputvariables in the new functions

* improve compute_indicators.R

* Exact volume (GeomScale#57)

* merge two copulas functions into one.

* add compute_indicators R function.

* develop compute_indicator R function and copula.cpp in R-proj

* improve roxygen comments in compute_indicator R function and copula.cpp in R-proj

* fix bugs in copulas.cpp

* fix bugs in compute_indicators.R

* fix R tests for copulas and set to lowercase the inputvariables in the new functions

* improve compute_indicators.R

* add volume field in R module polytope classes

* add volume declaration for known polytopes in R interface

* modify exact_vol.cpp in R interface

* set NaN the volume initialization in Rcpp modules of polytopes, update NEWS.md file

* modify namespace

* Improve interfaces, generators and bug fixes (GeomScale#58)

* use cdhr in rounding, improve t-test iterations, change diameter of H-polytopes, minor modifications in both interfaces.

* improve c++ interface, add c++ test for cooling bodies with billiard walk

* improve new c++ test

* add random generators

* update R random generators

* update Rd files

* update R volume interface

* fix generators in both c++ and R interfaces, improve exact_volume check in c++ interface

* fix bug in hpoly zonotope volume approximation

* improve c++ documentation (help command)

* fix c++ tests

* fix c++ tests

* improve cpp generator interface

* improve cpp generator interface

* Zonotope approximation (GeomScale#59)

* use cdhr in rounding, improve t-test iterations, change diameter of H-polytopes, minor mpdifications in both interfaces.

* improve c++ interface, add c++ test for cooling bodies with billiard walk

* improve new c++ test

* add random generators

* update R random generators

* update Rd files

* update R volume interface

* fix generators in both c++ and R interfaces, improve exact_volume check in c++ interface

* fix bug in hpoly zonotope volume approximation

* improve c++ documentation (help command)

* add zonotope_approximation in R interface. improve R volume and sample_points documentation

* fix c++ tests

* fix bug in zonotope approximation

Co-authored-by: Vissarion Fisikopoulos <[email protected]>

* Fix tests and issue GeomScale#8 (GeomScale#60)

* modify c++ tests

* improve input variable names in R functions

* check for negative error parameter in both interfaces

* update Rd files

* Update README.md

* Various improvements (tests, documentation, names) (GeomScale#61)

* modify c++ tests

* improve input variable names in R functions

* check for negative error parameter in both interfaces

* update Rd files

* update compute_indicators

* update rotating R functions

* update sample_points.cpp

* update volume.cpp and Rd files

* update zonotope_approximation functons and the Rd files

* fix examples, tests, documentation errors

* update rounding and fix a bug in sample_points gaussian sampling, update Rd files, fix cran errors

* add the option to set seed for the random polytope generator

* fix cran check errors

* add boundary sampling in R interface

* add references in rounding functions and fix bug in vol.cpp

* README: folder name changed from R-prog to R-proj (GeomScale#63)

* Folder name changed from R-prog to R-proj

* Delete .Rhistory

* Delete .Rhistory

* Delete RcppExports.cpp

* Readme correction and -help error in generator (GeomScale#64)

* add mode and starting point as inputs in samlpe_points()

* fix GeomScale#65

* add direct_sampling R function

* improve comp_diam() function in polytopes

* Update README.md

Closes GeomScale#67

* Update README.md

* Fix bug in hpolytope print function (GeomScale#68)

* Update readme, add `doc` directory and tutorials (GeomScale#70)

* Use eigen types as internal structures (GeomScale#29)

* Changed class point to store coefficients to Eigen vector instead of  std::vector. Made required code updates in polytopes.h, rounding.h,ballintersectconvex.h and updated CMakeLists.txt to include the directory with Eigen.

* fixed bug

* fix for quicker access to data

When accessing the data of class Point don't copy the whole vector, but use the [] operator (changes requested during the pull request).

* Eigen

clean existing code, make changes in leftover files with previous implementation

* Optimizations

- avoid creating copies
- code cleanup
- more coherent coding, using Eigen and eradicating std::vector

* Optimizations

- Vectorize when possible the operations in line_intersect functions
- Change the matrix in HPolytope to be RowMajor

* Major

- change uses of std::vector to Eigen vector
- Change the matrix in HPolytope NOT to be RowMajor (seemed slower, needs more testing)
- enabled no debug macro for Eigen in /test/CmakeList
- added 2 tests, to compute volume with rdhr and with BiW

* Bug

Error in creating Point

* bug

* use cooling balls in test

* edit initialization

* edit /test/CMakeLists.txt

* Optimizations

- Use eigen function noalias() to avoid creating temporary copies when multiplying matrices
- in getDirection() (samplers.h) don't use std::vector, only Eigen::Vector
- fix bug in point.h, in constructor

* leftovers from merge

- make changes in code from last merge
- delete tests I had previously added

* cleanup - requested changes

* update copyrights

* bug

* bug

* requested changes

* use += *= operators with points

* use += *= operators with points

* Fix non const parameters in rand_exp_range (GeomScale#71)

Remove const from function parameter

* update input variable names in sample_points(), direct_sampling() and vpolytope-intersection R class

* change 'algo' to 'settings' in volume function. remove unused methods in c++ polytope classes

* update R tests and NEWS.md file

* update zonotope_approximation input variables

* delete cran package files

* Fix seed in gen_rand_hpoly (GeomScale#74)

* update input variable names in sample_points(), direct_sampling() and vpolytope-intersection R class
* change 'algo' to 'settings' in volume function. remove unused methods in c++ polytope classes
* update R tests and NEWS.md file
* update zonotope_approximation input variables
* delete cran package files
* fix seed in rand_hpoly_generator

* new volume structure SoB plus random walks

* Use billiard walk in SOB algorithm (GeomScale#75)

* fix seed in rand_hpoly_generator

* enable SOB algorithm with billiard walk

* enable SOB algorithm with billiard walk in c++ interface

* correct input list algo in Rcpp volume.cpp

* Update readme, add `doc` directory and tutorials (GeomScale#70)

* Cleanup SoB volume algorithm

* New volume function example

* Optimization: move random generators creation outside of random walk helpers

* Expose rnd seed in highest level

* Random number generator struct

* RNG interface with fixed seed

* Design simpler Walk interface

* Ball walk for GC algorithm

* RDHR walk for GC algorithm

* CDHR walk for GC algorithm

* Update delta for ball walk and removing unused paremeter passing in gaussing cooling algorithm

* Fixing the scope of several variables in gaussian cooling

* Fixing the scope of variables and using const where possible in gausian annealing

* New design for cooling balls algorithm

* Improvements in rounding and rotating R functions (GeomScale#76)

* add seed in rotate_polytope and update Rd files

* update R rounding function to return the linear map

* fix rounding in V-poly

* overloading rotating() function and remove unused comments

* Fix line_intersect function

* Add const refs, missing includes, const vars for tolerance, fix some code styling

* Remove unnecessary constructors in random walks, put const refs

* Fix non const parameters in rand_exp_range (GeomScale#71)

Remove const from function parameter

* update input variable names in sample_points(), direct_sampling() and vpolytope-intersection R class

* change 'algo' to 'settings' in volume function. remove unused methods in c++ polytope classes

* update R tests and NEWS.md file

* update zonotope_approximation input variables

* delete cran package files

* Fix seed in gen_rand_hpoly (GeomScale#74)

* update input variable names in sample_points(), direct_sampling() and vpolytope-intersection R class
* change 'algo' to 'settings' in volume function. remove unused methods in c++ polytope classes
* update R tests and NEWS.md file
* update zonotope_approximation input variables
* delete cran package files
* fix seed in rand_hpoly_generator

* Use billiard walk in SOB algorithm (GeomScale#75)

* fix seed in rand_hpoly_generator

* enable SOB algorithm with billiard walk

* enable SOB algorithm with billiard walk in c++ interface

* Const references and styling for cooling balls algorithm

* Tests for sob algo using hpoly

* Benchmarks and tests (sob and gc algorithms)

* Tests for CB algorithms and various walks (expect to fail at this stage)

* Fix walk initialization for CB algorithm

* Fix tests for CB algorithm and hpolytopes

* Fixes in cooling gaussian algorithm and tests

* Fix accuracy of CDHR in CG

* Update delta after walk construction

* Tests for CG/vpolytopes

* Implementation of cb algorithm with H-polytopes in MMC for zonotopes  (#1)

* correct input list algo in Rcpp volume.cpp

* Improvements in rounding and rotating R functions (GeomScale#76)

* add seed in rotate_polytope and update Rd files

* update R rounding function to return the linear map

* fix rounding in V-poly

* overloading rotating() function and remove unused comments

* implement zonotope volume computation with cb algorithm and hpoly in MMC

* fix all bugs in new cooling_hpoly algorithm and improve test function

* all tests for zonotopes with c algortihm passed successfully

* Fixing tests

* Passing walks as objects to volume with runtime arguments

* New rounding implementation ans volume approximation for V-poytopes intersection (#2)

* correct input list algo in Rcpp volume.cpp

* Improvements in rounding and rotating R functions (GeomScale#76)

* add seed in rotate_polytope and update Rd files

* update R rounding function to return the linear map

* fix rounding in V-poly

* overloading rotating() function and remove unused comments

* implement zonotope volume computation with cb algorithm and hpoly in MMC

* fix all bugs in new cooling_hpoly algorithm and improve test function

* all tests for zonotopes with c algortihm passed successfully

* implmentation of diameter computation of all convex bodies except Vpoly-intersection

* add Vpolyintersection diameter computation and volume approximation

* new implmentation of rounding

* add rounding in zonotope volume approximation with Hpoly in MMC

* dispatching in ratio estimation

* update ratio estimation functions

* implmemrnt dispatching for diameter computation

* improve ratio estimation code structure

* Rcpp functions with the new structure (#3)

* correct input list algo in Rcpp volume.cpp

* Improvements in rounding and rotating R functions (GeomScale#76)

* add seed in rotate_polytope and update Rd files

* update R rounding function to return the linear map

* fix rounding in V-poly

* overloading rotating() function and remove unused comments

* implement zonotope volume computation with cb algorithm and hpoly in MMC

* fix all bugs in new cooling_hpoly algorithm and improve test function

* all tests for zonotopes with c algortihm passed successfully

* implmentation of diameter computation of all convex bodies except Vpoly-intersection

* add Vpolyintersection diameter computation and volume approximation

* new implmentation of rounding

* add rounding in zonotope volume approximation with Hpoly in MMC

* dispatching in ratio estimation

* update ratio estimation functions

* implmemrnt dispatching for diameter computation

* improve ratio estimation code structure

* update declaration of parameters in random walks

* update parameter declaretion for both ball and billiard walks

* modify Rcpp expose for volume and sampling C++ functions

* modify Rcpp rounding function

* update rounding, sampling, volume rcpp dunctions: typedefs and includes

* modify zonotope approximation Rcpp function. minor changes to Rcpp volume and sampling functions

* fix compiler errors

* update d files

* fix compiler errors in c++ tests

* add seed in rounding and direct_sampling Rcpp functions

* add a second volume function to use fixed seed in Rcpp interface

* Restructuring volume algorithms and random walks

* Improvements and corrections in Rcpp functions (#4)

* correct input list algo in Rcpp volume.cpp

* Improvements in rounding and rotating R functions (GeomScale#76)

* add seed in rotate_polytope and update Rd files

* update R rounding function to return the linear map

* fix rounding in V-poly

* overloading rotating() function and remove unused comments

* implement zonotope volume computation with cb algorithm and hpoly in MMC

* fix all bugs in new cooling_hpoly algorithm and improve test function

* all tests for zonotopes with c algortihm passed successfully

* implmentation of diameter computation of all convex bodies except Vpoly-intersection

* add Vpolyintersection diameter computation and volume approximation

* new implmentation of rounding

* add rounding in zonotope volume approximation with Hpoly in MMC

* dispatching in ratio estimation

* update ratio estimation functions

* implmemrnt dispatching for diameter computation

* improve ratio estimation code structure

* update declaration of parameters in random walks

* update parameter declaretion for both ball and billiard walks

* modify Rcpp expose for volume and sampling C++ functions

* modify Rcpp rounding function

* update rounding, sampling, volume rcpp dunctions: typedefs and includes

* modify zonotope approximation Rcpp function. minor changes to Rcpp volume and sampling functions

* fix compiler errors

* update d files

* fix compiler errors in c++ tests

* add seed in rounding and direct_sampling Rcpp functions

* add a second volume function to use fixed seed in Rcpp interface

* fix rcpp interface

* Removing old implementation files and renaming

* Improvements in rounding and rotating R functions (GeomScale#76)

* add seed in rotate_polytope and update Rd files

* update R rounding function to return the linear map

* fix rounding in V-poly

* Remove duplicate seed from rcpp

* Enable tests for CB algorithm with V-cubes

* Removing unused variables, setting const refs where needed

* Add simple github actions CI for gcc and clang (GeomScale#80)

* Fix CRAN interface (GeomScale#81)

* pass cran check

* fix billiard initialization, rounding shifting and seeding

* add seed to copula computations

* cran actions

* Improvements on cran tests and R interface (GeomScale#83)

* fix windows errors in cran checks

* update Rd files, fix bugs in direct_sampling and boundary sampling

* improve R tests, update description file and fix seeding in cooling hpoly

* re order template classes in volume functions

* remove skiping for 32-bit in R tests

* fix declaration of random walks for uniform sampling

* fix the default value of the ball walk radius, fix zonotope c++ test

* fix c++ tests

* fix c++ tests

* fix memory leak in cg algorithm. update R examples and tests

* remove unused comments

* update dicumentation and Rd files

* fix error in lpsolve, seeding in vpolytopeintersection and c++ tests

* fix vpolytope-intersection c++ test

* Update/restructure Readme (GeomScale#84)

* Update README

* Update README

* Sdpa format (GeomScale#36)

* expose Spectrahedron interface to R

- create class spectrahedron
- expose function to write sdpa format files in R

* expose read_sdpa function to R and documentation

* R documentation and examples

- fix examples
- add data for example
- add roxygen comments

* tests for sdpa format manager

- add copyrights headers
- add test that writes and reads a sdpa format file
- add the test in test/CMakeLists.txt

* add example code for sdpa files

- create folder examples in root
- add an example main to read / write sdpa format files

* fix file format

* fix file encoding

* use soft wrap with lines

* create folder spectrahedra

- move in new folder spectrahedron.h, LMI.h
- update CMakeLists.txt in folder examples, tests
- update Makevars in R-prog/src and in cran_gen
- add documentation for sdpa file example

* examples/spectrahedra documentation

* examples/spectrahedra documentation

fix headers

* rename R modules

- rename module in polytopes_modules.cpp to "polytopes"
- rename module in spectrahedron_module.cpp to "spectrahedron"
- fix dates in copyrights headers in files
- add a newline in end of file spectrahedron.h

* make LMI::getMatrices() return std::vector const &

Also fix parameters documentation in R for functions

- readSDPAFormatFile
- loadSDPAFormatFile
- writeSDPAFormatFile

* rename typedefs in spectrahedron.cpp

- rename SPECTRAHEDRON typedef to Spectrahedron
- remove unneeded class _Spectrahedron in spectrahedron.cpp

* Activate tests in github actions (and clang sanitizer) (GeomScale#85)

* Use actions with -fsanitize=memory

* Use actions with -fsanitize=memory

* Use actions with -fsanitize=memory

* actions for R

* fix clang++ segmentation fault (GeomScale#87)

* fix clang++ segmentation fault

There was a problem with clang when accessing elements of vector spectrahedron.getLMI().getMatrices()

- getMatrices() returns std::vector const &. The fix was to make Spectrahedron class method getLMI() return LMI const &
- also make LMI constructor take parameter const &, not just &

* fix #include paths

* Fix deprecated ftime in lpsolve and update README (GeomScale#89)

* CRAN version 1.1.2 (GeomScale#118)

* fix review comments on R package

* update R interface in volume and sample_points

* update Rcpp modules and S4 classes

* replace modules with R classes

* update R documentation

* fix R tests

* fix R bugs

* add hpoly new generator, fix bugs in rounding with biw

* update the Rd files

* fix c++ tests and a bug in volume.coo

* fix c++ test

* update polytope random generators in R, update rd files

* fix bugs in R interface

* seperate sdp functions

* Squash commits into one

* Revert "Max ball param in generate_samples and rounding (GeomScale#115)"

This reverts commit 1bd54f2.

* Remove std::cout

* Max ball param in generate_samples and rounding (GeomScale#115)

* Update volestipy.pyx

* Update bindings.cpp

* Update bindings.h

* Update setup.py

* Update bindings.h

* Update setup.py

* Update setup_old.py

* Update bindings.cpp

* Update setup.py

* Update setup.py

* Update volestipy.pyx

* Update test1.py

* Create test1_old.py

* Update test1.py

* Update volestipy.pyx

* Update bindings.cpp

* Update bindings.h

* Update volestipy.pyx

* Update bindings.cpp

* Update bindings.h

* Update bindings.h

* Update bindings.cpp

* Update bindings.h

* Update bindings.cpp

* Update volestipy.pyx

* Update volestipy.pyx

* Update bindings.cpp

* Update bindings.h

* Update bindings.h

* Update bindings.cpp

* Update volestipy.pyx

* Update bindings.h

* Update bindings.cpp

* Update bindings.h

* Update setup.py

* Update bindings.cpp

* Update bindings.h

* Update bindings.cpp

* Update volestipy.pyx

* Update bindings.cpp

* Update bindings.h

* Update bindings.cpp

* Update volestipy.pyx

* Update volume_cb_hpolytope.cpp

* Update test1.py

* Update bindings.cpp

* Update test1.py

* Update volestipy.pyx

* Update bindings.cpp

* Update bindings.h

* Update bindings.cpp

* Update volestipy.pyx

* Update volestipy.pyx

* Update bindings.cpp

* Update bindings.h

* Create .gitignore

* Delete test1_old.py

* Delete setup_old.py

* Delete bindings_old.h

* Delete bindings_old.cpp

* Delete volestipy_old.pyx

* Update volestipy.pyx

* Update bindings.cpp

* Update bindings.h

* Update .gitignore

* Update volume_cb_hpolytope.cpp

* Update test1.py

* Update test2.py

* Update bindings.h

* Update setup.py

* Update credits.md

* on .gitignore: files on test/Testing/Temporary/ were removed from the .gitignore file

* first attempt - not working - for rounding

* rounding function: does not work; trying to figure it out

* round_val now works; still new_A and new_b need to be included

* Create metabolic_net_pipeline.ipynb

* Update metabolic_net_pipeline.ipynb

* Update metabolic_net_pipeline.ipynb

* Update metabolic_net_pipeline.ipynb

* Update metabolic_net_pipeline.ipynb

* Update metabolic_net_pipeline.ipynb

* Update volestipy.pyx

* Update bindings.cpp

* Create test_rounding.py

* Create test1.py

* Create test2.py

* Delete test2.py

* Update test1.py

* Create metabolic_net_pipeline-checkpoint.ipynb

* Update setup.py

* Update .gitignore

* Delete test1.py

git rm test1.py

* Delete test2.py

git rm test2.py

* Update bindings.h

new class for the preprocessing and the get_full_dimensional_polytope() function in the bindings.h

* Update bindings.cpp

new class for the preprocessing and the get_full_dimensional_polytope() function in the bindings.cpp

* Update volestipy.pyx

new class for the preprocessing and the get_full_dimensional_polytope() function in the volestipy.pyx

* Update bindings.h

working on the lowDimHPolytopeCPP class - just a draft with the main ideas, not a stable version

* Update bindings.cpp

working on the lowDimHPolytopeCPP class - just a draft with the main ideas, not a stable version

* Update volestipy.pyx

working on the lowDimHPolytopeCPP class - just a draft with the main ideas, not a stable version

* Update bindings.h

set member variables for lowDimHPolytopeCPP class

* Update bindings.cpp

remove unessecary vars

* Update volestipy.pyx

remove unecessary vars in self.full_dim_polytope

* Update bindings.h

build the instructor for the full_dimensional_polytope() function

* Update bindings.cpp

1st draft for the get_full_dimensional_polytope() function

* Update volestipy.pyx

1st draft for the python interface of the get_full_dimensional_polytope() function

* Update bindings.h

using transpose matrices for N and A_full
removing the "extra" from the shift and b_full vectors as it is not needed

* Update bindings.cpp

2nd draft for the lowDimHPolytopeCPP class.
we changed the N and A_full matrices to transpose to feed them in the cpp file like this.
we removed the _extra from the vectors

* Update volestipy.pyx

2nd draft for the lowDimHPolytopeCPP class.
changed "_extra" vectors when needed.
first draft that actually compiles

* Create test_get_full_dim_polytope.py

test file for the get_full_dimensional_polytope function
not ready yet

* Update test_get_full_dim_polytope.py

changed the Aeq

* Update test_get_full_dim_polytope.py

final test for the get_full_dimensional_polytope() function

* Update bindings.cpp

print the N transpose and the full A transpose matrices from the C++ code

* Update volestipy.pyx

Attention! What C++ returns is the transpose matrix.
Thus, the [i,j] element of the full A is the [j,i] of what C++ returns. That is what we fixed here

* Update test_get_full_dim_polytope.py

print all the outputs of the get_full_dimensional_polytope() function

* Update bindings.cpp

remove test prints

* Update volestipy.pyx

remove test printing statements
add all the output in the return statement on the get_full_dim_polytope()
improved comments

* Delete metabolic_net_pipeline.ipynb

remove the jupyter notebook

* Delete metabolic_net_pipeline-checkpoint.ipynb

remove the hidden directory for the jupyter notebook

* Update volestipy.pyx

Exceptions for the low_dim_polytope_cpp constructor added.
Deletion of the A_full and the b_full variables after the initialization of the object.

* Update bindings.h

CheBall was removed from the case of the lowDimHPolytopeCPP

* Update volestipy.pyx

just some functions of gurobipy

* Update volestipy.pyx

first draft for the pre_process() python function

* Create test_preprocess.py

a test file for the pre_process() function

* Update volestipy.pyx

correct obj function. Aeq line was replaced by a such from A.

* Update volestipy.pyx

make dependencies more readable

* Update volestipy.pyx

test sparse function

* Update test_preprocess.py

change dimensions

* Update volestipy.pyx

loop for all the lines of A and models for each of those and its minus

* Update test_preprocess.py

change the dimensions

* Update volestipy.pyx

draft to check whether it works fine!

* Update volestipy.pyx

change name in model.addConstr from "c2" to "c" in all the constraints described, fixed the solutions
remove unecessary print statements

* Update test_preprocess.py

add print statement for the results of the pre_process() function

* Update test_preprocess.py

build Aeq in a way to be more like to a stoichiometric matrix

* Update volestipy.pyx

add model.update() and model.display() function every time we add constraints or change the objective function

* Update volestipy.pyx

correct typo in comment

* Update volestipy.pyx

add model.update() after the obj function for the minus A[i,]

* Update volestipy.pyx

add print statements

* Update volestipy.pyx

attempt to solve the issue with the solutions

* Update volestipy.pyx

addMConstrs

* Update volestipy.pyx

setMObjective()

* Update volestipy.pyx

correct objectives()

* Update volestipy.pyx

make minus obj function as it should be

* Update volestipy.pyx

remove print not needed statements
make code more readable

* Update test_preprocess.py

change permission in test

* Update test_preprocess.py

add import volestipy in test_preprocess.py

* Update volestipy.pyx

remove solutions and their corresponding print statements
add new line in the end of the file

* Update volestipy.pyx

correct comment

* add bigg file of e.coli in .mat format

* add a BIGG file in .json format

* add function to read bigg files in .json format; keep the Aeq

* develop the read json format bigg file function

* add test file for reading json bigg files

* add function for reading json bigg files

* new directory for the bigg example files

* improved function for reading json bigg files; Aeq is now m*n

* print metabolites and reaction in the test for json

* add function to read .mat bigg files

* one test file for reading both json and mat bigg files

* remove unecessary print statements

* comment in the head of the file describing its purpose

* update documentation on how to install volestipy

* improved documentation for the dependencies

* remember to explain how to get lpsolve

* remember to explain how to get lpsolve

* remember to explain how to get lpsolve

* remember to explain how to get lpsolve

* test with RECON1 for the pre-processing step were performed successfully

* export .npy files with the outcome of the pre_process function so the user can load them any time

* change the input file to e_coli_core

* print files with the output of get_full_dim() and rounding() ; start function for inner ball

* small changes to check data types

* convertions to numpy arrays

* complete read-preprocess-get_full_dim steps

* add data types in .gitignore file

* add a test with all the steps of the pipeline

* draft for max ball

* test for computing max ball

* include get_max_ball() function

* remove last empty lines

* add emppty last line

* lp_solve replaced by lpsolve

* rounding step included in the full pipeline test

* add comput_max_ball in the pipeline

* fixed type for the r variable; sre_parse related issue

* remove unecessary library

* clean up a bit

* Update volestipy.pyx

empty last line

* Update bindings.cpp

add empty last line

* improve rounding

* fix svd rounding

* add max_ball arguments in the rounding function

* add max_ball if statement in rounding funcion

* fix cheball in rounding

* change variable name

* add max ball in rounding function

* add semicolomn

* add extra variable inner_point_for_c to feed the .cpp with the inner point

* change test file to include the max ball output as parameter to the rounding function

* replace integer zero values in the bydefault inner point list, with fload zeros; this way we fixed bug according to which the inner_point_for_c was waiting for double but got long

* replace if statement for max ball in rounding

* add arguments in generate_samples() for the case that max_ball has been included

* add cases for running generate_samples depending max ball input

* feed sampling with max_ball params

* add part for generate samples

* change sampling function to support max ball and L params

* change the way set_L and max_ball bool vars are set

* python interface initialization

* add accelerated_billiard variable

* remove wrong '=' sign

* remove const from end of void set_InnerBall functions

* include sampling on rounded polytope using max ball function

* max ball on rounded polytope

* change by default number_of_points_to_burn

* complete test pipeline

* function for mapping sampled points to the initial polytope added

* remove blank lines

* remove blank line

* clean code; split long lines

* add blank last line

* add features till get full dimensional polytope

* before plotiing

* plol it

* histogram added

* reaction 35 for plotting

* add print statement for dimension

* testing recon1

* testing for recon1

* notebook checkpoints

* add returning min and max fluxes vectors in pre-processing

* ignore png files

* return float numpy types from read function

* add tests for e coli and plot samples

* e coli full example

* further chechpoints

Co-authored-by: Tolis <[email protected]>

* Regenerate R docs

* Update date field and add redirection to examples

* Reorder initializations

* Correct example

* Add high dimensional test

* Add high-dimensional example

* Add example for random H-polytope with Gaussian centered at the Chebyshev center

Co-authored-by: tolischal <[email protected]>
Co-authored-by: Vissarion Fysikopoulos <[email protected]>
Co-authored-by: Vissarion Fisikopoulos <[email protected]>
Co-authored-by: pedrozudo <[email protected]>
Co-authored-by: Sharat-Bhat <[email protected]>
Co-authored-by: KunalKatiyar <[email protected]>
Co-authored-by: Vaibhav Thakkar <[email protected]>
Co-authored-by: Panagiotis Repouskos <[email protected]>
Co-authored-by: hariszaf <[email protected]>
TolisChal added a commit that referenced this pull request Oct 17, 2023
* initialize nuts sampler class

* implement the burnin of nuts sampler

* add tests and resolve bugs

* implement e0 estimation in burnin of nuts

* optimize leapfrog

* integrate nuts into the R interface

* document random walk in sample_points.cpp in R interface

* fix burnin for the non-truncated case

* resolve bugs in hmc and nuts pipelines

* improve the preprocess in burin step of nuts

* split large lines in sample_points.cpp

* Add NUTS C++ example and update CMake (#29)

* resolve PR comments

* fix minor bug

* fix compiler bug

* fix error in building the C++ examples

* resolve warnings in sample_points

* fix lpsolve cran warning

* fix cran warning on mac

* improve lpsolve cmake for cran check

* fix R warning in mac test

* remove lpsolve header

* resolve PR comments

---------

Co-authored-by: Marios Papachristou <[email protected]>
Co-authored-by: Apostolos Chalkis <[email protected]>
iakoviid pushed a commit to iakoviid/volesti that referenced this pull request Nov 1, 2023
* Enable github actions to build examples. Avoid passing a polytope as a const reference.

* Fix ambiguous call to fix function by renaming volesti's diagnostic function. (GeomScale#263)

* Updating documentation (GeomScale#261)

Adding WSL and MKL build instructions.

* disable an R sampling test for windows

* Fix the warning message in R Mac's cran test (GeomScale#285)

* copy and replace lp_rlp.h

* remove re-initialization of eta

* update ubuntu version from 18 to 20 in R cran tests

* minor improvements (explanatory comments)

---------

Co-authored-by: Apostolos Chalkis <[email protected]>

* delete commented out code

* No-U-Turn Sampler in HMC (GeomScale#216)

* initialize nuts sampler class

* implement the burnin of nuts sampler

* add tests and resolve bugs

* implement e0 estimation in burnin of nuts

* optimize leapfrog

* integrate nuts into the R interface

* document random walk in sample_points.cpp in R interface

* fix burnin for the non-truncated case

* resolve bugs in hmc and nuts pipelines

* improve the preprocess in burin step of nuts

* split large lines in sample_points.cpp

* Add NUTS C++ example and update CMake (GeomScale#29)

* resolve PR comments

* fix minor bug

* fix compiler bug

* fix error in building the C++ examples

* resolve warnings in sample_points

* fix lpsolve cran warning

* fix cran warning on mac

* improve lpsolve cmake for cran check

* fix R warning in mac test

* remove lpsolve header

* resolve PR comments

---------

Co-authored-by: Marios Papachristou <[email protected]>
Co-authored-by: Apostolos Chalkis <[email protected]>

---------

Co-authored-by: Vissarion Fisikopoulos <[email protected]>
Co-authored-by: Soumya Tarafder <[email protected]>
Co-authored-by: Apostolos Chalkis <[email protected]>
Co-authored-by: Marios Papachristou <[email protected]>
TolisChal added a commit that referenced this pull request Jul 7, 2024
* initialize nuts sampler class

* implement the burnin of nuts sampler

* add tests and resolve bugs

* implement e0 estimation in burnin of nuts

* optimize leapfrog

* integrate nuts into the R interface

* document random walk in sample_points.cpp in R interface

* fix burnin for the non-truncated case

* resolve bugs in hmc and nuts pipelines

* improve the preprocess in burin step of nuts

* split large lines in sample_points.cpp

* Add NUTS C++ example and update CMake (#29)

* resolve PR comments

* fix minor bug

* fix compiler bug

* fix error in building the C++ examples

* resolve warnings in sample_points

* fix lpsolve cran warning

* fix cran warning on mac

* improve lpsolve cmake for cran check

* fix R warning in mac test

* remove lpsolve header

* resolve PR comments

---------

Co-authored-by: Marios Papachristou <[email protected]>
Co-authored-by: Apostolos Chalkis (TolisChal) <[email protected]>
TolisChal added a commit that referenced this pull request Jul 7, 2024
* initialize nuts sampler class

* implement the burnin of nuts sampler

* add tests and resolve bugs

* implement e0 estimation in burnin of nuts

* optimize leapfrog

* integrate nuts into the R interface

* document random walk in sample_points.cpp in R interface

* fix burnin for the non-truncated case

* resolve bugs in hmc and nuts pipelines

* improve the preprocess in burin step of nuts

* split large lines in sample_points.cpp

* Add NUTS C++ example and update CMake (#29)

* resolve PR comments

* fix minor bug

* fix compiler bug

* fix error in building the C++ examples

* resolve warnings in sample_points

* fix lpsolve cran warning

* fix cran warning on mac

* improve lpsolve cmake for cran check

* fix R warning in mac test

* remove lpsolve header

* resolve PR comments

---------

Co-authored-by: Marios Papachristou <[email protected]>
Co-authored-by: Apostolos Chalkis (TolisChal) <[email protected]>
TolisChal added a commit that referenced this pull request Jul 17, 2024
* initialize nuts sampler class

* implement the burnin of nuts sampler

* add tests and resolve bugs

* implement e0 estimation in burnin of nuts

* optimize leapfrog

* integrate nuts into the R interface

* document random walk in sample_points.cpp in R interface

* fix burnin for the non-truncated case

* resolve bugs in hmc and nuts pipelines

* improve the preprocess in burin step of nuts

* split large lines in sample_points.cpp

* Add NUTS C++ example and update CMake (#29)

* resolve PR comments

* fix minor bug

* fix compiler bug

* fix error in building the C++ examples

* resolve warnings in sample_points

* fix lpsolve cran warning

* fix cran warning on mac

* improve lpsolve cmake for cran check

* fix R warning in mac test

* remove lpsolve header

* resolve PR comments

---------

Co-authored-by: Marios Papachristou <[email protected]>
Co-authored-by: Apostolos Chalkis (TolisChal) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants