Skip to content

Commit 10c9e38

Browse files
authored
Merge pull request #44 from TolisChal/fix_cran
remove unused flags from makevars, fix error in lp_MPS.c, set version…
2 parents 1bb15df + a82e30f commit 10c9e38

File tree

6 files changed

+11
-8
lines changed

6 files changed

+11
-8
lines changed

R-proj/DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ Description: Provides an R interface for 'volesti' C++ package. 'volesti' comput
1414
rounding and rotating polytopes. Moreover, 'volesti' provides algorithms for
1515
estimating copulas (L. Cales, A. Chalkis, I.Z. Emiris, V. Fisikopoulos (2018)
1616
<arXiv:1803.05861>).
17-
Version: 1.0.2
18-
Date: 2019-05-10
17+
Version: 1.0.3
18+
Date: 2019-09-10
1919
Maintainer: Vissarion Fisikopoulos <[email protected]>
2020
Depends: Rcpp (>= 0.12.17)
2121
Imports: methods

R-proj/src/Rproj_externals/lp_solve/lp_MPS.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1259,7 +1259,8 @@ static void number(char *str,LPSREAL value)
12591259
*(--_str)=' ';
12601260
}
12611261
}
1262-
strncpy(str,_str,12);
1262+
//strncpy(str,_str,12);
1263+
_str[12] ='\0'; strcpy(str, _str);
12631264
}
12641265

12651266
static char *formatnumber12(char *numberbuffer, double a)

cran_gen/Makevars

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
PKG_CPPFLAGS=-Iexternal/lpsolve/headers/run_headers -Iexternal/minimum_ellipsoid -Iinclude -Iinclude/volume -Iinclude/generators -Iinclude/samplers -Iinclude/annealing -Iinclude/convex_bodies
2-
PKG_CXXFLAGS= -lm -ldl -DBOOST_NO_AUTO_PTR
2+
PKG_CXXFLAGS= -DBOOST_NO_AUTO_PTR
33
CXX_STD = CXX11
44

55
PKG_LIBS=-Lexternal/lpsolve/build/lp_solve -llp_solve $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)

cran_gen/NEWS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,6 @@
1010

1111
* Remove r-striper to avoid CRAN policy violation.
1212

13+
# volesti 1.0.3
1314

15+
* Fix CRAN warnings.

external/LPsolve_src/include/lpkit.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@
3838
#define FREE(ptr) if (ptr != NULL) {free(ptr), ptr = NULL;} else
3939

4040
#define MALLOCCPY(nptr, optr, nr, type)\
41-
(MALLOC(nptr, nr, type), (nptr != NULL) ? memcpy(nptr, optr, (size_t)((nr) * sizeof(*optr))) : 0, nptr)
41+
(MALLOC(nptr, nr, type), (nptr != NULL) ? memcpy(nptr, optr, (size_t)((nr) * sizeof(*optr))) : 0)

test/volumeCV_test.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ void test_CV_volume(Polytope &HP, NT expected, NT tolerance=0.3)
4949
// Estimate the volume
5050
std::cout << "Number type: " << typeid(NT).name() << std::endl;
5151
NT vol = 0;
52-
unsigned int const num_of_exp = 15;
52+
unsigned int const num_of_exp = 20;
5353
for (unsigned int i=0; i<num_of_exp; i++)
5454
{
5555
CheBall = HP.ComputeInnerBall();
@@ -166,11 +166,11 @@ void call_test_simplex() {
166166

167167
std::cout << "--- Testing volume of H-simplex10" << std::endl;
168168
P = gen_simplex<Hpolytope>(10, false);
169-
test_CV_volume<NT, RNGType>(P, 1.0 / factorial(10.0));
169+
test_CV_volume<NT, RNGType>(P, 1.0 / factorial(10.0), 0.2);
170170

171171
std::cout << "--- Testing volume of H-simplex20" << std::endl;
172172
P = gen_simplex<Hpolytope>(20, false);
173-
test_CV_volume<NT, RNGType>(P, 1.0 / factorial(20.0));
173+
test_CV_volume<NT, RNGType>(P, 1.0 / factorial(20.0), 0.2);
174174

175175
std::cout << "--- Testing volume of H-simplex30" << std::endl;
176176
P = gen_simplex<Hpolytope>(30, false);

0 commit comments

Comments
 (0)