public override bool Equals(Object o) { if (this == o) { return true; } if ((o == null) || (this.GetType() != o.GetType())) { return false; } BayesNetNode another = (BayesNetNode)o; return variable.Equals(another.variable); }