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:
authorKaran Dwivedi <karan.dwivedi42@gmail.com>2016-11-21 23:38:46 +0300
committerGitHub <noreply@github.com>2016-11-21 23:38:46 +0300
commitd1b5a9e63a4a6612c75787b473434d18670f57ae (patch)
tree423c36bb499085321105fa1717149cbc795350db
parent47afe90ed1f047ff672deb5416aebcc7db051302 (diff)
Update Edge.lua
Add edge weight
-rw-r--r--Edge.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/Edge.lua b/Edge.lua
index 1ffd670..bd99af2 100644
--- a/Edge.lua
+++ b/Edge.lua
@@ -4,7 +4,8 @@ No methods, just two fields, from and to.
]]--
local Edge = torch.class('graph.Edge')
-function Edge:__init(from,to)
+function Edge:__init(from,to,weight)
self.from = from
self.to = to
+ self.weight = weight
end