- 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
This class is largely a pre-C++11 holdover. It is now possible to
simply use move construct/assignment directly.
In a few rare cases (eg, polyMesh::resetPrimitives) it has been
replaced by an autoPtr.
- makes it accessible for containers that manage their own storage
and derive directly from UList.
- DynamicList::min_size() method to access the corresponding
SizeMin template parameter.
- ensure consistency in the reserve size for the constructor
DynamicList<..> lst(N);
now has identical sizing as
DynamicList<..> lst();
reserve(N);
- improve functional compatibility with DynList (remove methods)
* eg, remove an element from any position in a DynamicList
* reduce the number of template parameters
* remove/subset regions of DynamicList
- propagate Swap template specializations for lists, hashtables
- move construct/assignment to various containers.
- add find/found methods for FixedList and UList for a more succinct
(and clearer?) usage than the equivalent global findIndex() function.
- simplify List_FOR_ALL loops
- Cannot pass through to underlying list constructor directly.
- As this constructor was broken, there seem to be a number of
workarounds scattered in the code. Could revisit them in the future
as part of code-style:
edgeMesh(const Xfer<pointField>&, const Xfer<edgeList>&);
CompactIOField(const IOobject&, const Xfer<Field<T>>&);
GlobalIOField(const IOobject&, const Xfer<Field<Type>>&);
IOField(const IOobject&, const Xfer<Field<Type>>&);