public override int GetHashCode() { int hash = 1; hash ^= bucket_.GetHashCode(); if (MinSeen != 0D) { hash ^= MinSeen.GetHashCode(); } if (MaxSeen != 0D) { hash ^= MaxSeen.GetHashCode(); } if (Sum != 0D) { hash ^= Sum.GetHashCode(); } if (SumOfSquares != 0D) { hash ^= SumOfSquares.GetHashCode(); } if (Count != 0D) { hash ^= Count.GetHashCode(); } return(hash); }
public void Problem_6_Sum_Of_Squares() { int result = SumOfSquares.SumSquares(); Console.WriteLine(result); //Assert.AreEqual(2640,result); }
public void TestFindMinimumNumberOfSquaresSummingTo(int n) { var squareSolver = new SumOfSquares(); var numSquares = squareSolver.FindMinimumNumberOfSquaresSummingTo(n); }
public void SetDependencies(IBatchAggregator parent) { SumOfSquares = parent.Add <SumOfSquares>(); Count = parent.Add <Count>(); Average = parent.Add <Average>(); }