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

Unknown Walk Type #23

Open
FareheSoheil opened this issue Mar 30, 2024 · 3 comments
Open

Unknown Walk Type #23

FareheSoheil opened this issue Mar 30, 2024 · 3 comments

Comments

@FareheSoheil
Copy link
Contributor

FareheSoheil commented Mar 30, 2024

want to run different sampling algorithms in a 100-dimensional cube. I get the output for "RDHR" and "CDHR" but for the "john" (john walk) I get the following error:

Error: Unknown walk type!

My code is as below and I follow page 24 of Rvolesti documentation pdf. on sample_points() function.

library(ggplot2)
library(volesti)
for (step in c(1,20,100,150)){
  for (walk in c("RDHR", "CDHR", "john")){
    P <- gen_cube(3, 'H')
    points1 <- sample_points(P, n=1000, random_walk = list("walk"=walk, "walk_length"= step))
    g<-plot(ggplot(data.frame( x=points1[1,], y=points1[2,] )) +
geom_point( aes(x=x, y=y, color=walk)) + coord_fixed(xlim = c(-1,1),
ylim = c(-1,1)) + ggtitle(sprintf("walk length=%s", step, walk)))
Sys.sleep(10)
  }
}
@vfisikop
Copy link
Contributor

vfisikop commented Apr 2, 2024

Sorry, I cannot reproduce it. I can run

P = gen_cube(3, 'H')
points = sample_points(P, n = 100, random_walk = list("walk" = "john", "walk_length" = 5))

successfully locally. Are you building Rvolesti from develop branch?

@FareheSoheil
Copy link
Contributor Author

FareheSoheil commented Apr 2, 2024

Your code produces the same error on my device.
Yes, I cloned and built all packages from develop branch.

@vfisikop
Copy link
Contributor

vfisikop commented Apr 2, 2024

Could you provide more information about your platform/compiler used and also the exact steps you followed?
Can you run the tests and the examples successfully?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants