ENH: additional Map/HashTable constructors and ListOp functions

- construct Map/HashTable from key/value lists.

- invertToMap() : like invert() but returns a Map<label>,
  which is useful for sparse numbering

- inplaceRenumber() : taking a Map<label> for the mapper

ENH: construct/reset CStringList for list of C-strings
This commit is contained in:
Mark Olesen
2024-02-21 09:34:58 +01:00
parent f7cdd3ef63
commit 4f43f0302d
37 changed files with 363 additions and 298 deletions

View File

@ -295,9 +295,7 @@ void addToInterface
else
{
// Create new interface of size 1.
Map<label> zoneToSize;
zoneToSize.insert(zoneID, 1);
regionsToSize.insert(interface, zoneToSize);
regionsToSize(interface).insert(zoneID, 1);
}
}
@ -484,18 +482,10 @@ void getInterfaceSizes
zoneName + "_" + name1 + "_to_" + name0
);
}
interfaceSizes[nInterfaces] = infoIter();
if (regionsToInterface.found(e))
{
regionsToInterface[e].insert(zoneID, nInterfaces);
}
else
{
Map<label> zoneAndInterface;
zoneAndInterface.insert(zoneID, nInterfaces);
regionsToInterface.insert(e, zoneAndInterface);
}
interfaceSizes[nInterfaces] = infoIter();
regionsToInterface(e).insert(zoneID, nInterfaces);
nInterfaces++;
}
}