volesti
volesti copied to clipboard
Segfault sampling from HPolytope in R
Describe the bug R segfaults when trying to draw random points from a randomly generated 5-dimensional HPolytope.
To Reproduce Steps to reproduce the behavior:
- Instantiate an HPolytope with the following data:
[,1] [,2] [,3] [,4] [,5]
[1,] 0.30887097 -0.53745122 -0.492380167 -0.49002472 0.36494173
[2,] 0.14248736 0.64991717 -0.704343633 0.19163703 -0.15646189
[3,] 0.03498200 0.63144837 0.419923300 0.05289024 0.64878059
[4,] 0.30949255 0.54458693 -0.476339377 0.27792713 -0.55090539
[5,] 0.04423147 0.40892918 0.511683391 0.75062985 -0.07453479
[6,] -0.41749508 0.34459983 -0.793759276 -0.17988560 -0.21103602
[7,] -0.64373902 0.33605519 -0.352343366 -0.49704459 0.31854011
[8,] -0.52725465 -0.20167977 0.450931987 -0.58732301 0.36474624
[9,] 0.80713044 -0.35137439 0.234729396 -0.26424122 -0.31647303
[10,] 0.06392698 -0.10807311 -0.569276249 -0.65656141 0.47862846
[11,] -0.37563325 0.80767531 0.005149686 0.45330771 -0.03233987
[12,] -0.13155983 -0.13962400 0.015456808 0.88805782 0.41750635
[13,] 0.58990541 -0.19920504 0.252185961 -0.44746159 -0.59034679
[14,] -0.72467774 0.08202631 0.406466437 -0.54512009 0.07578241
[15,] 0.26152950 0.35885079 -0.363057023 -0.66744716 -0.47490243
[16,] -0.69317051 0.34747910 0.618674006 0.12349000 0.02766974
[17,] -0.38584133 -0.10489989 0.632718077 0.02886336 0.66253847
[18,] 0.78736884 -0.51983923 0.096110362 0.27149465 0.16392357
[19,] -0.61112221 -0.23311823 -0.361741498 0.49155191 -0.44688404
[20,] -0.62956211 -0.23468319 -0.516540178 -0.11050009 -0.51918332
[21,] 0.31090258 0.71762591 -0.212720057 -0.28033834 -0.51430850
[22,] -0.69102110 0.65821644 -0.273379940 0.09795671 -0.07006324
[23,] 0.21954957 0.58599794 -0.105495985 -0.58460572 0.50548111
[24,] -0.06008136 -0.31607680 0.210493804 0.86199031 -0.33037969
[25,] 0.06828425 -0.40678357 -0.280687167 0.16822021 -0.85016532
- Sample random points from this polytope.
Expected behavior Generate random points.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: Ubuntu
Additional context Add any other context about the problem here.
Hi I would like to take up this issue but I am unable to get the R commands for initializing the polytope. Could you please refer me to the relevant document? Also please point me to the relevant section of the codebase where I should be looking at.
Trying to recreate a minimal working example, it seems like I did not manage to extract all the defining data for an HPolytope from the crashing computations.
@michiexile thanks for opening this issue. Could you please give more information about your input? I cannot reproduce as is. You are mentioning that you have a 5-dimensional Hpolytope but you are providing a 5x25 matrix which defines a 4-dimensional HPolytope. What is matrix A
, b
? Which function did you use to generate the polytope?
Please refer to the documentation of the R interface here: https://cran.r-project.org/web/packages/volesti/volesti.pdf