ug4
|
Functions | |
function table | append (t1, t2) |
function table | contains (t, value) |
function table | deepcopy (t) |
function table | ideepcopy (t) |
function | iipairs (tab) |
function table | imax (t) |
function table | imin (t) |
function table | ishallowcopy (t) |
function table | len_of_longest_identifyer (t) |
function table | merge (t1, t2) |
function table | merge_inplace (t1, t2) |
function table | print (data, style) |
function table | print_flat (t, prefix, maxLen) |
function table | shallowcopy (t) |
Utility functions for easy but advanced table access.
function table append | ( | t1 | , |
t2 | |||
) |
appends a table to a table
location: /home/runner/work/docs/docs/ug4/ugcore/scripts/util / table_util.lua :40
Referenced by ug::bridge::FiniteVolume::Functionality::DomainFVGeom(), ug::IDWUserData< WDim, TData >::load_data_from(), ug::bridge::PrintBuildConfiguration(), ug::bridge::LuaUserData::RegisterLuaUserDataType(), ug::bridge::RegisterStandardBridges(), ug::vrl::VRLUserData< TData, dim >::set_vrl_callback(), ug::vrl::VRLUserLinker< TData, dim, TDataIn >::set_vrl_deriv_callback(), ug::vrl::VRLUserLinker< TData, dim, TDataIn >::set_vrl_value_callback(), and ugshell_print_header().
function table contains | ( | t | , |
value | |||
) |
checks if a value is contained in a table
location: /home/runner/work/docs/docs/ug4/ugcore/scripts/util / table_util.lua :151-156
Referenced by ug::GetElemDiscItemOnSubset(), ug::SurfaceView::mark_shadowing(), and ug::bridge::RegisterDegeneratedLayerManager().
function table deepcopy | ( | t | ) |
returns deep-copy of table (i.e., copies recursive all contained tables as well)
location: /home/runner/work/docs/docs/ug4/ugcore/scripts/util / table_util.lua :84-96
function table ideepcopy | ( | t | ) |
returns deep-copy of integer-key part of table (i.e., copies recursive all contained tables as well)
location: /home/runner/work/docs/docs/ug4/ugcore/scripts/util / table_util.lua :99-110
function iipairs | ( | tab | ) |
returns iterator function iterating through first consecutive integer-key range (even starting at negative or null)
location: /home/runner/work/docs/docs/ug4/ugcore/scripts/util / table_util.lua :135-147
function table imax | ( | t | ) |
returns the largest integer key of the table (even in non-consecutive arrays)
location: /home/runner/work/docs/docs/ug4/ugcore/scripts/util / table_util.lua :124-132
function table imin | ( | t | ) |
returns the smallest integer key of the table (even negative or null if present)
location: /home/runner/work/docs/docs/ug4/ugcore/scripts/util / table_util.lua :113-121
function table ishallowcopy | ( | t | ) |
returns shallow-copy of integer-key part of table (i.e., only top level values)
location: /home/runner/work/docs/docs/ug4/ugcore/scripts/util / table_util.lua :69-80
function table len_of_longest_identifyer | ( | t | ) |
traverses a table recursively and returns the length of the longest identifyer
location: /home/runner/work/docs/docs/ug4/ugcore/scripts/util / table_util.lua :245-255
References s.
function table merge | ( | t1 | , |
t2 | |||
) |
Creates a new table which contains the entries from tables t1 and t2. key-value pairs from table t1 have higher priority than those from t2, meaning that if a key is found in both tables, the key-value pair from t1 is considered only.
location: /home/runner/work/docs/docs/ug4/ugcore/scripts/util / table_util.lua :320-324
Referenced by ug::MergeGlobalLayout(), and ug::MergeInterfaces().
function table merge_inplace | ( | t1 | , |
t2 | |||
) |
Recursively adds entries from table t2 to table t1, if those entries were not already contained in t1.
location: /home/runner/work/docs/docs/ug4/ugcore/scripts/util / table_util.lua :300-313
function table print | ( | data | , |
style | |||
) |
prints the table
location: /home/runner/work/docs/docs/ug4/ugcore/scripts/util / table_util.lua :159-241
Referenced by ug::bridge::ConstStdVectorRefOfClass(), ug::bridge::UserDataBridge::Functionality::Dimension(), ug::bridge::MultiGrid::Functionality::DomainAlgebra(), ug::bridge::Output::Functionality::DomainAlgebra(), ug::bridge::GetGlobalFunctionInfo(), ug::bridge::GetMemberFunctionInfo(), getStats(), ListUserDataInTable(), NeumannBoundary(), ug::bridge::PrintStdVectorOfClass(), ug::bridge::RegisterBridge_Test(), ug::vrl::RegisterUserData(), ug::vrl::RegisterUserDataType(), and ug::MGStats< TDomain, TAlgebra >::set_defect().
function table print_flat | ( | t | , |
prefix | , | ||
maxLen | |||
) |
location: /home/runner/work/docs/docs/ug4/ugcore/scripts/util / table_util.lua :258-294
function table shallowcopy | ( | t | ) |
returns shallow-copy of table (i.e., only top level values)
location: /home/runner/work/docs/docs/ug4/ugcore/scripts/util / table_util.lua :55-66