History of Idiom 26 > diff from v41 to v42
Edit summary for version 42 by programming-idioms.org:
[Lua] Better comments (plural, etc.)
[Lua] Better comments (plural, etc.)
↷
Version 41
2018-05-10, 09:31:28
Version 42
2018-06-24, 10:24:17
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.
see http://www.programming-idioms.org/idiom/27/create-a-3-dimensional-array/1675/lua for a more "standard" way
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.