[vtk-developers] vtkDirectedAcyclicGraph::IsStructureValid(vtkGraph *g)
Jeff Baumes
jeff.baumes at kitware.com
Thu Jan 21 10:24:41 EST 2010
Thanks for finding that. It's now in CVS:
Patch title (first comment line): PERF: Removing unneccessary loop.
Autocommit
cvs commit -F .msg 'Filtering/vtkDirectedAcyclicGraph.cxx'
Committer: Jeffrey Baumes <jeff.baumes at kitware.com>
/cvsroot/VTK/VTK/Filtering/vtkDirectedAcyclicGraph.cxx,v <--
Filtering/vtkDirectedAcyclicGraph.cxx
new revision: 1.5; previous revision: 1.4
Committed successfully to CVS
Jeff
On Thu, Jan 21, 2010 at 4:47 AM, Nasztanovics Ferenc <naszta at naszta.hu> wrote:
> 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
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtk-developers
>
>
--
Jeff Baumes, Ph.D.
R&D Engineer, Kitware Inc.
(518) 881-4932
jeff.baumes at kitware.com
More information about the vtk-developers
mailing list