Beispiel #1
0
            // Determines the dValue given set
            // For a set x, d is defined as follows:
            // d(N) = 0
            // d(x) = 1 + min(max v in x, max v not in x)
            private static int DetermineDValue(BitSet set)
            {
                BitSet _set = !set;

                if (set.IsEmpty || _set.IsEmpty)
                    return 0;

                return 1 + Math.Min(set.Last(), _set.Last());
            }