Skip to content

NeighbourQueryBase needs the concept of a root child_iterator #26

@martinjrobins

Description

@martinjrobins

Aboria::NeighbourQueryBase needs the concept of a root child_iterator to simplify writing, for example, a depth-first iteration. At the moment it is:

     auto depth_first = [&](const auto &parent) {
      std::cout << query.get_bounds(parent) << std::endl;

      for (auto i = query.get_children(parent); i != false; ++i) {
        depth_first(i);
      }
    };

    for (auto i = query.get_children(); i != false; ++i) {
      depth_first(i);
    }

It should be

     auto depth_first = [&](const auto &parent) {
      std::cout << query.get_bounds(parent) << std::endl;

      for (auto i = query.get_children(parent); i != false; ++i) {
        depth_first(i);
      }
    };
    depth_first(query.get_root());

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions