diff options
author | Karan Dwivedi <karan.dwivedi42@gmail.com> | 2016-11-21 23:38:46 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-21 23:38:46 +0300 |
commit | d1b5a9e63a4a6612c75787b473434d18670f57ae (patch) | |
tree | 423c36bb499085321105fa1717149cbc795350db | |
parent | 47afe90ed1f047ff672deb5416aebcc7db051302 (diff) |
Update Edge.lua
Add edge weight
-rw-r--r-- | Edge.lua | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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 |