History of Idiom 26 > diff from v28 to v29
Edit summary for version 29 by :
[Lua] cross reference
[Lua] cross reference
↷
Version 28
2016-04-07, 06:44:10
Version 29
2016-04-07, 09:37:34
Idiom #26 Create a 2-dimensional array
Declare and initialize a matrix x having m rows and n columns, containing real numbers.
Idiom #26 Create a 2-dimensional array
Declare and initialize a matrix x having m rows and n columns, containing real numbers.
Comments bubble
Use metatable to lazy initialize each row (t1[k1]) and each column (t2[k2]) the first time it's accessed.
Comments bubble
Use metatable to lazy initialize each row (t1[k1]) and each column (t2[k2]) the first time it's accessed.
see http://www.programming-idioms.org/idiom/27/create-a-3-dimensional-array/1675/lua for a more "standard" way