diff options
-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 |