[lua-torch-graph] 01/08: New upstream version 0~20161027-g47afe90
Zhou Mo
cdluminate-guest at moszumanska.debian.org
Wed Nov 16 08:10:37 UTC 2016
This is an automated email from the git hooks/post-receive script.
cdluminate-guest pushed a commit to branch master
in repository lua-torch-graph.
commit 502bf414c2af11d29bd0374caa1df7532158d565
Author: Zhou Mo <cdluminate at gmail.com>
Date: Wed Nov 16 07:59:14 2016 +0000
New upstream version 0~20161027-g47afe90
---
graphviz.lua | 6 ++++--
rocks/graph-scm-1.rockspec | 5 +----
test/test_graph.lua | 8 +++-----
test/test_graphviz.lua | 5 ++---
test/test_old.lua | 2 +-
5 files changed, 11 insertions(+), 15 deletions(-)
diff --git a/graphviz.lua b/graphviz.lua
index 8588f75..535ce83 100644
--- a/graphviz.lua
+++ b/graphviz.lua
@@ -36,12 +36,14 @@ if ffiOk then
FILE * fopen ( const char * filename, const char * mode );
int fclose ( FILE * stream );
]]
- graphvizOk, graphviz = pcall(function() return ffi.load('libgvc', true) end)
+ local libgvc = ffi.os == 'Windows' and 'gvc' or 'libgvc'
+ graphvizOk, graphviz = pcall(function() return ffi.load(libgvc, true) end)
if not graphvizOk then
graphvizOk, graphviz = pcall(function() return ffi.load('libgvc.so.6', true) end)
end
- cgraphOk, cgraph = pcall(function() return ffi.load('libcgraph', true) end)
+ local libcgraph = ffi.os == 'Windows' and 'cgraph' or 'libcgraph'
+ cgraphOk, cgraph = pcall(function() return ffi.load(libcgraph, true) end)
if not cgraphOk then
cgraphOk, cgraph = pcall(function() return ffi.load('libcgraph.so.6', true) end)
end
diff --git a/rocks/graph-scm-1.rockspec b/rocks/graph-scm-1.rockspec
index c16b42a..7eb2bb7 100644
--- a/rocks/graph-scm-1.rockspec
+++ b/rocks/graph-scm-1.rockspec
@@ -19,10 +19,7 @@ dependencies = {
build = {
type = "command",
build_command = [[
-cmake -E make_directory build;
-cd build;
-cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$(LUA_BINDIR)/.." -DCMAKE_INSTALL_PREFIX="$(PREFIX)";
-$(MAKE)
+cmake -E make_directory build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$(LUA_BINDIR)/.." -DCMAKE_INSTALL_PREFIX="$(PREFIX)" && $(MAKE)
]],
install_command = "cd build && $(MAKE) install"
}
diff --git a/test/test_graph.lua b/test/test_graph.lua
index 7f33581..34857b3 100644
--- a/test/test_graph.lua
+++ b/test/test_graph.lua
@@ -1,9 +1,7 @@
-
require 'graph'
-require 'totem'
-
-local tester = totem.Tester()
-local tests = {}
+require 'torch'
+local tester = torch.Tester()
+local tests = torch.TestSuite()
local function create_graph(nlayers, ninputs, noutputs, nhiddens, droprate)
local g = graph.Graph()
diff --git a/test/test_graphviz.lua b/test/test_graphviz.lua
index 1d344a9..e3fd711 100644
--- a/test/test_graphviz.lua
+++ b/test/test_graphviz.lua
@@ -1,8 +1,7 @@
-require 'totem'
require 'graph'
require 'torch'
-local tester = totem.Tester()
-local tests = {}
+local tester = torch.Tester()
+local tests = torch.TestSuite()
function tests.layout()
local g = graph.Graph()
diff --git a/test/test_old.lua b/test/test_old.lua
index 17ae596..0415cf4 100644
--- a/test/test_old.lua
+++ b/test/test_old.lua
@@ -10,7 +10,7 @@ g:add(graph.Edge(root,n2))
nend = graph.Node(20)
g:add(graph.Edge(n1,nend))
g:add(graph.Edge(n2,nend))
-g:add(graph.Edge(nend,root))
+-- g:add(graph.Edge(nend,root))
local i = 0
print('======= BFS ==========')
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/lua-torch-graph.git
More information about the debian-science-commits
mailing list