Skip to content
Snippets Groups Projects
Commit 2d7d81bd authored by Mark OLESEN's avatar Mark OLESEN
Browse files

ENH: generalize indirect lists and support new types

- use an IndirectListBase class for various indirect list types.

- new SortList type

  In some places the SortList can be used as a lightweight alternative
  to SortableList to have the convenience of bundling data and sort
  indices together, but while operating on existing data lists.
  In other situations, it can be useful as an alternative to
  sortedOrder.  For example,

        pointField points = ...;

        labelList order;
        sortedOrder(points, order);

        forAll(order, i)
        {
            points[order[i]] = ...;
        }

   Can be replaced with the following (with the same memory overhead)

        pointField points = ...;

        SortList<point> sortedPoints(points);

        for (point& pt : sortedPoints)
        {
            pt = ...;
        }

- new SliceList type (#1220), which can be used for stride-based
  addressing into existing lists
parent bf5af092
Loading
Showing
with 546 additions and 367 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment