A5.A5Engine.FindFrequency C# (CSharp) Method

FindFrequency() private method

private FindFrequency ( int indexValues ) : int[]
indexValues int
return int[]
        private int[] FindFrequency(int[] indexValues)
        {
            int[] tally = new int[2]; //size of 2 since its just binary

            foreach (int val in indexValues)
            {
                if (val == 0)
                    tally[0]++;
                else if (val == 1)
                    tally[1]++;
            }

            return tally;
        }