~ubuntu-branches/ubuntu/vivid/digikam/vivid

« back to all changes in this revision

Viewing changes to core/libs/database/imagehistory/imagehistorygraph_boost.h

  • Committer: Package Import Robot
  • Author(s): Philip Muškovac
  • Date: 2012-02-14 19:29:29 UTC
  • mfrom: (1.2.38) (3.1.16 experimental)
  • Revision ID: package-import@ubuntu.com-20120214192929-cx2zia3b2nt67lvz
Tags: 4:2.5.0-1ubuntu1
* Merge from debian unstable, remaining changes:
  - keep seperate binary packages:
    + libkface1, libkface-data, libkface-dev
    + libkgeomap1, libkgeomap-data, libkgeomap-dev
    + libvkontakte1, libkvkontakte-dev
    + libmediawiki1, libmediawiki-dev
  - keep patches:
    + kubuntu_mysqld_executable_name.diff
  - don't fail on missing files in dh_install
  - install oxygen icons for kipi-plugins
  - build-depend on mysql 5.5 instead of 5.1
  - update install files
* digikam breaks/replaces kipi-plugins-common << 4:2.5.0~
* digikam-doc breaks/replaces digikam-data << 4:2.5.0~
* digikam-data breaks/replaces kipi-plugins << 4:2.5.0~
* kipi-plugins-common breaks/replaces kipi-plugins << 4:2.5.0~

Show diffs side-by-side

added added

removed removed

Lines of Context:
884
884
 
885
885
        // remove all vertices from the DFS of v that are not in the dominated tree
886
886
        QList<Vertex> orderedTree;
887
 
        foreach (const Vertex& v, presortedVertices)
 
887
        foreach(const Vertex& v, presortedVertices)
888
888
        {
889
889
            if (dominatedTree.contains(v))
890
890
            {
921
921
        GraphSearch search;
922
922
        search.breadthFirstSearch(graph, vertices.first(), direction == ChildToParent);
923
923
        QList<Vertex> bfs = search.vertices;
924
 
        foreach (const Vertex& v, vertices)
 
924
        foreach(const Vertex& v, vertices)
925
925
        {
926
926
            bfs.removeOne(v);
927
927
        }
943
943
 
944
944
                // any item reachable from *it should come after it
945
945
                int minIndex = vertices.size();
946
 
                foreach (const Vertex& c, childBfs)
 
946
                foreach(const Vertex& c, childBfs)
947
947
                {
948
948
                    int foundAt = vertices.indexOf(c);
949
949
                    if (foundAt == -1)
955
955
                        minIndex = qMin(foundAt, minIndex);
956
956
                    }
957
957
                }
958
 
                foreach (const Vertex& c, toInsert)
 
958
                foreach(const Vertex& c, toInsert)
959
959
                {
960
960
                    vertices.insert(minIndex++, c);
961
961
                }
993
993
        GraphSearch search;
994
994
        search.depthFirstSearchSorted(graph, vertices.first(), direction == ChildToParent, lessThan);
995
995
        QList<Vertex> dfs = search.vertices;
996
 
        foreach (const Vertex& v, vertices)
 
996
        foreach(const Vertex& v, vertices)
997
997
        {
998
998
            dfs.removeOne(v);
999
999
        }
1016
1016
    {
1017
1017
        QList<Vertex> children = predecessors.keys(v);
1018
1018
        vertices << children;
1019
 
        foreach (const Vertex& child, children)
 
1019
        foreach(const Vertex& child, children)
1020
1020
        {
1021
1021
            treeFromPredecessorsRecursive(child, vertices, predecessors);
1022
1022
        }
1170
1170
        search.breadthFirstSearch(graph, v, invertGraph);
1171
1171
 
1172
1172
        QList<Vertex> vertices;
1173
 
        foreach (const Vertex& candidate, search.vertices)
 
1173
        foreach(const Vertex& candidate, search.vertices)
1174
1174
        {
1175
1175
            if ( (inOrOut ? in_degree(candidate, graph) : out_degree(candidate, graph)) == 0)
1176
1176
            {
1389
1389
                : g(g), vertexLessThan(vertexLessThan) {}
1390
1390
            const GraphType& g;
1391
1391
            VertexLessThan vertexLessThan;
1392
 
            bool operator()(const Edge& a, const Edge b)
 
1392
            bool operator()(const Edge& a, const Edge& b)
1393
1393
            {
1394
1394
                return vertexLessThan(boost::target(a.toEdge(), g), boost::target(b.toEdge(), g));
1395
1395
            }
1413
1413
            // maps the given edges to their targets, and calls our vertex lessThan.
1414
1414
            qSort(outEdges.begin(), outEdges.end(), lessThanMapEdgeToTarget<IncidenceGraph, LessThan>(g, lessThan));
1415
1415
 
1416
 
            foreach (const Edge& e, outEdges)
 
1416
            foreach(const Edge& e, outEdges)
1417
1417
            {
1418
1418
                Vertex v = boost::target(e.toEdge(), g);
1419
1419
                vis.examine_edge(e, g);