Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/graph.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsoumith <soumith@gmail.com>2015-11-12 04:31:38 +0300
committersoumith <soumith@gmail.com>2015-11-12 04:31:38 +0300
commit7fb197ea6a8e78d94866fb0b50894b1e74db2664 (patch)
tree1256421ed0e7e9bb8d5dd66f20cb40df799572c2
parent599e4adb48b890dd4a4657e76396469d72c8045b (diff)
graphviz check
-rw-r--r--graphviz.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/graphviz.lua b/graphviz.lua
index 14115cb..9b2afdb 100644
--- a/graphviz.lua
+++ b/graphviz.lua
@@ -148,6 +148,9 @@ function graph.graphvizLayout(g, algorithm)
end
function graph.graphvizFile(g, algorithm, fname)
+ if not graphvizOk or not cgraphOk then
+ error("graphviz library could not be loaded.")
+ end
algorithm = algorithm or 'dot'
local _,_,rendertype = fname:reverse():find('(%a+)%.%w+')
rendertype = rendertype:reverse()