// point foo to bar public void AddPair(Node fooNode, Node barNode, int score = 0) { Link link = fooNode.Links.ContainsKey(barNode.Value) ? fooNode.Links[barNode.Value] : null; if (link == null) { link = new Link(fooNode, barNode); fooNode.Links.Add(barNode.Value, link); } link.Hit(); }
public bool Equals(Link l) { return this.Parent == l.Parent && this.Target == l.Target && this.Score == l.Score; }