aboutsummaryrefslogtreecommitdiff
path: root/matrix.lua
diff options
context:
space:
mode:
authorDeterminant <[email protected]>2015-05-15 02:36:55 +0800
committerDeterminant <[email protected]>2015-05-15 02:36:55 +0800
commitefb786d716363dde8f90ef0672f479790befc79c (patch)
tree1d7a6f07db9cae3fd65a437d3ca6ff398a2b684b /matrix.lua
parentb03471e2b0d604806773b540551cd047979b7b3b (diff)
use C macro to implement matrix template
Diffstat (limited to 'matrix.lua')
-rw-r--r--matrix.lua15
1 files changed, 0 insertions, 15 deletions
diff --git a/matrix.lua b/matrix.lua
deleted file mode 100644
index 7aa1f12..0000000
--- a/matrix.lua
+++ /dev/null
@@ -1,15 +0,0 @@
-function nerv.FloatMatrix:__tostring__()
- local ncol = self:ncol()
- local nrow = self:nrow()
- local i = 0
- local strt = {}
- for row = 0, nrow - 1 do
- for col = 0, ncol - 1 do
- table.insert(strt, string.format("%f ", self:get_elem(i)))
- i = i + 1
- end
- table.insert(strt, "\n")
- end
- table.insert(strt, string.format("[Float Matrix %d x %d]", nrow, ncol))
- return table.concat(strt)
-end