aboutsummaryrefslogtreecommitdiff
path: root/matrix_example.lua
diff options
context:
space:
mode:
authorDeterminant <[email protected]>2015-05-14 15:01:55 +0800
committerDeterminant <[email protected]>2015-05-14 15:01:55 +0800
commitf48dc493b5b77fd4e4472dd6c78b7542a4884129 (patch)
tree0b7a0f95df28fc100fc1fd252ce1d0215d19150d /matrix_example.lua
parent46ccec6d5ad057476e945afa34981f7e8d732547 (diff)
add basic matrix implementation
Diffstat (limited to 'matrix_example.lua')
-rw-r--r--matrix_example.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/matrix_example.lua b/matrix_example.lua
new file mode 100644
index 0000000..1ff129d
--- /dev/null
+++ b/matrix_example.lua
@@ -0,0 +1,7 @@
+t = nerv.FloatMatrix(2, 3)
+print(t:get_elem(1))
+t:set_elem(1, 3.23432);
+print(t:get_elem(1))
+print(t)
+t = nerv.FloatMatrix(10, 20)
+print(t)