Пример #1
0
        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);
        }
Пример #2
0
        public void Problem_6_Sum_Of_Squares()
        {
            int result = SumOfSquares.SumSquares();

            Console.WriteLine(result);
            //Assert.AreEqual(2640,result);
        }
Пример #3
0
 public void TestFindMinimumNumberOfSquaresSummingTo(int n)
 {
     var squareSolver = new SumOfSquares();
     var numSquares   = squareSolver.FindMinimumNumberOfSquaresSummingTo(n);
 }
Пример #4
0
 public void SetDependencies(IBatchAggregator parent)
 {
     SumOfSquares = parent.Add <SumOfSquares>();
     Count        = parent.Add <Count>();
     Average      = parent.Add <Average>();
 }