public void same_vector_reference_has_same_hashcode_when_changed() { var m = new VectorD(2); m.Set(0, 9); m.Set(1, -8); var expectedHashCode = m.GetHashCode(); m.Set(0, 4); m.Set(1, 19); Assert.Equal(expectedHashCode, m.GetHashCode()); }
public void HashCodeTest() { VectorD v = new VectorD(new double[] { 1, 2, 3, 4, 5 }); VectorD one = new VectorD(5, 1.0); Assert.AreNotEqual(one.GetHashCode(), v.GetHashCode()); }