Added accessors to node weights for non-directional graph