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

wrong number of all constraints #125

Open
huiwenzhang opened this issue Jun 23, 2022 · 0 comments
Open

wrong number of all constraints #125

huiwenzhang opened this issue Jun 23, 2022 · 0 comments

Comments

@huiwenzhang
Copy link

Hi, as explained in the code below, you pre-allocate n_vertices * N / 2 memories for vector all_constraints.

all_constraints.reserve(
n_vertices_ * N /
2); // Will have exactly this number of elements in the end.

I think the right size should be (n_vertices - 1) * N, i.e. Num. of all constraints = Num. segments * N. But this result is still correct, because you re-calculate the size of total constraints.

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

1 participant