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

Bug in BuildBPGraphFromCSRFormat #38

Open
pavanakumar opened this issue Feb 25, 2020 · 0 comments
Open

Bug in BuildBPGraphFromCSRFormat #38

pavanakumar opened this issue Feb 25, 2020 · 0 comments

Comments

@pavanakumar
Copy link

I think there is a bug in the BuildBPGraphFromCSRFormat function.
I am getting RightVertices size one higher than what it should be. The
bug seems to be in this loop over columns.

949	  //put together the right vertices
950	  map< int,vector<int> >::iterator curr;
951	  m_vi_RightVertices.push_back(m_vi_Edges.size());
952	  for(int i=0; i <= i_ColumnCount; i++) {
953		  curr = colList.find(i);
954		  if(curr !=colList.end()) {
955			m_vi_Edges.insert(m_vi_Edges.end(),curr->second.begin(),curr->second.end());
956		  }//else  We have an empty column
957		  m_vi_RightVertices.push_back(m_vi_Edges.size());
958	  }

line 952 should look like

951	  m_vi_RightVertices.push_back(m_vi_Edges.size());
952	  for(int i=0; i < i_ColumnCount; i++) {
953		  curr = colList.find(i);

The loop should be between 0, i_ColumnCount - 1 and not 0, i_ColumnCount

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