mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
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:
@ -124,11 +124,11 @@ int main(int argc, char *argv[])
|
||||
<< "toc: " << flatOutput(table0.toc()) << nl;
|
||||
|
||||
HashTable<label, label, Hash<label>> table2
|
||||
({
|
||||
{3, 10},
|
||||
{5, 12},
|
||||
{7, 16}
|
||||
});
|
||||
(
|
||||
// From key/value pairs
|
||||
labelList({3, 5, 7}),
|
||||
labelList({10, 12, 16})
|
||||
);
|
||||
|
||||
Info<< "table2: " << table2 << nl
|
||||
<< "toc: " << flatOutput(table2.toc()) << nl;
|
||||
|
||||
Reference in New Issue
Block a user