Skip to content

Commit 52a4f57

Browse files
authored
Fix deprecated ftime in lpsolve and update README (#89)
1 parent 24b0d39 commit 52a4f57

File tree

4 files changed

+21
-36
lines changed

4 files changed

+21
-36
lines changed

R-proj/DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ Description: Provides an R interface for 'volesti' C++ package. 'volesti' comput
1111
(a.k.a. zonotopes). There are three algorithms for volume estimation as well as algorithms
1212
for sampling, rounding and rotating polytopes. Moreover, 'volesti' provides algorithms for
1313
estimating copulas useful in computational finance.
14-
Version: 1.1.0
15-
Date: 2020-05-29
14+
Version: 1.1.1
15+
Date: 2020-06-18
1616
Maintainer: Vissarion Fisikopoulos <[email protected]>
1717
Depends: Rcpp (>= 0.12.17)
1818
Imports: methods, stats

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -852,10 +852,10 @@ double timeNow(void)
852852
}
853853
return( timeBase + (double) now.QuadPart/(double) freq.QuadPart );
854854
#else
855-
struct timeb buf;
855+
struct timeval buf;
856856

857-
ftime(&buf);
858-
return((double)buf.time+((double) buf.millitm)/1000.0);
857+
gettimeofday(&buf, NULL);
858+
return((double)buf.tv_sec+(double) buf.tv_usec);
859859
#endif
860860
}
861861

cran_gen/NEWS.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,8 @@
2424
* Improved functionality for finance applications.
2525
* Improved names for functions and input variables.
2626
* Use exclusively Eigen/BH library for linear algebra.
27+
28+
# volesti 1.1.1
29+
30+
* Fix CRAN warnings about deprecated use of ftime
31+

cran_gen/README.md

Lines changed: 11 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## About
44
The `volesti` package provides [R](https://www.r-project.org/) with functions for volume estimation and sampling. In particular, it provides an R interface for the C++ library [**volesti**](https://github.com/GeomScale/volume_approximation).
55

6-
`volesti` computes approximations of volume of polytopes given as a set of points or linear inequalities or as a Minkowski sum of segments (zonotopes). There are two algorithms for volume approximation as well as algorithms for sampling, rounding and rotating polytopes.
6+
`volesti` computes approximations of volume of polytopes given as a set of points or linear inequalities or as a Minkowski sum of segments (zonotopes). There are algorithms for volume approximation as well as algorithms for sampling, rounding and rotating polytopes. Last but not least, `volesti` provides implementations of geometric algorithms to compute the score of a portfolio given asset returns and to detect financial crises in stock markets.
77

88
## Download and install
99

@@ -16,40 +16,20 @@ install.packages("volesti")
1616
```
1717
* The package-dependencies are: `Rcpp`, `RcppEigen`, `BH`.
1818

19-
## Usage
20-
21-
* The main function is `volume()`. It can be used to approximate the volume of a convex polytope given as a set of linear inequalities or a set of vertices (d-dimensional points) or as a Minkowski sum of segments (zonotope). There are two algorithms that can be used. The first is `SequenceOfBalls` and the second is `CoolingGaussian`.
22-
* `sample_points()` can be used to sample points from a convex polytope approximating uniform or multidimensional spherical gaussian target distribution using: (a) coordinate directions hit-and-run (default), (b) random directions hit-and-run or (c) ball walk. This function can be used as well in order to sample exact uniform points from simplices and the boundary or the interior of hyperspheres.
23-
* `round_polytope()` can be used to round a convex polytope.
24-
* `rand_rotate()` can be used to apply a random rotation to a convex polytope.
25-
* `gen_cross()` can be used to generate a d-dimensional cross polytope.
26-
* `gen_cube()` can be used to generate a d-dimensional unit cube.
27-
* `gen_prod_simplex()` can be used to generate a 2d-dimensional polytope that is defined as the product of two d-dimensional unit simplices.
28-
* `gen_simplex()` can be used to generate the d-dimensional unit simplex.
29-
* `gen_skinny_cube()` can be used to generate a d-dimensional skinny hypercube.
30-
* `gen_rand_hpoly()` can be used to generate a d-dimensional polytope in H-representation with m facets.
31-
* `gen_rand_vpoly()` can be used to generate a d-dimensional polytope in V-representation with m vertices.
32-
* `gen_rand_zonotope()` can be used to generate a random d-dimensional zonotope defined by the Minkowski sum of m d-dimensional segments.
33-
* `file_to_polytope()` takes the path for an ine or an ext file and returns the corresponding polytope.
34-
* `frustum_of_simplex()` can be used to evaluate the portion of of the d-dimensional unit simplex contained in a given half-space using M. Ali's version of G. Varsi's iterative formula.
35-
* `inner_ball()` can be used to compute an inscribed ball of a convex polytope (works for all the representations).
36-
* `copula1()` can be used to compute the copula when two families of parallel hyperplanes are given.
37-
* `copula2()` can be used to compute the copula when one familiy of parallel hyperplanes and a family of concentric ellipsoids are given.
38-
39-
For more details, features, examples and references you can read the documentation.
19+
## Documentation
4020

41-
## Credits
21+
* [Using the R Interface](https://github.com/GeomScale/volume_approximation/blob/v1.1.1/doc/r_interface.md)
22+
* [Wikipage with Tutorials and Demos](https://github.com/GeomScale/volume_approximation/wiki)
23+
* [Tutorial given to PyData meetup](https://vissarion.github.io/tutorials/volesti_tutorial_pydata.html)
4224

43-
Copyright (c) 2012-2020 Vissarion Fisikopoulos
44-
Copyright (c) 2018-2020 Apostolos Chalkis
4525

46-
You may redistribute or modify the software under the GNU Lesser General Public License as published by Free Software Foundation, either version 3 of the License, or (at your option) any later version. It is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY.
26+
## Credits
4727

48-
Main development by Vissarion Fisikopoulos while he was affiliated with University of Athens (UoA, Greece) and University of Brussels (ULB, Belgium), and Chalkis Apostolos affiliated with University of Athens. Part of the development was done while A.Chalkis (as student) and V.Fisikopoulos (as mentor) were participating in Google Summer of Code 2018 program.
28+
* [Contributors and Package History](https://github.com/GeomScale/volume_approximation/blob/v1.1.1/doc/credits.md)
29+
* [List of Publications](https://github.com/GeomScale/volume_approximation/blob/v1.1.1/doc/publications.md)
4930

50-
### Publications
31+
Copyright (c) 2012-2020 Vissarion Fisikopoulos
32+
Copyright (c) 2018-2020 Apostolos Chalkis
5133

52-
1. I.Z. Emiris and V. Fisikopoulos, *Efficient random-walk methods for approximating polytope volume*, In Proc. ACM Symposium on Computational Geometry, Kyoto, Japan, p.318-325, 2014.
53-
2. I.Z. Emiris and V. Fisikopoulos, *Practical polytope volume approximation*, ACM Transactions on Mathematical Software, vol 44, issue 4, 2018.
54-
3. L. Cales, A. Chalkis, I.Z. Emiris, V. Fisikopoulos, *Practical volume computation of structured convex bodies, and an application to modeling portfolio dependencies and financial crises*, Proc. of Symposium on Computational Geometry, Budapest, Hungary, 2018.
34+
You may redistribute or modify the software under the GNU Lesser General Public License as published by Free Software Foundation, either version 3 of the License, or (at your option) any later version. It is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY.
5535

0 commit comments

Comments
 (0)