[vtk-developers] vtkDirectedAcyclicGraph::IsStructureValid(vtkGraph *g)

Nasztanovics Ferenc naszta at naszta.hu
Thu Jan 21 04:47:39 EST 2010


Now the code in this function:
<code>
  vector<int> color(numVerts, DFS_BLACK);
  vtkIdType s, u;
  vtkSmartPointer<vtkOutEdgeIterator> adj = 
    vtkSmartPointer<vtkOutEdgeIterator>::New();
  for (u = 0; u < numVerts; ++u)
    {
    color[u] = DFS_WHITE;
    }
</code>

I think it is simplier and equal:
<code>
  vector<int> color(numVerts, DFS_WHITE);
  vtkIdType s, u;
  vtkSmartPointer<vtkOutEdgeIterator> adj = 
    vtkSmartPointer<vtkOutEdgeIterator>::New();
</code>

Naszta


More information about the vtk-developers mailing list