public void CheckRankThreshold()
        {
            var boxSuppressor           = new InterviewBenchmark.BoxSuppressor();
            List <Rectangle> rectangles = boxSuppressor.SuppressTheBoxes("check-rank-threshold.csv");

            Assert.IsTrue(rectangles.Min(r => r.rank) > 0.6);
        }
Exemplo n.º 2
0
        public static void Main(string[] args)
        {
            string inputFile        = "boxes.csv";
            double jaqardIndex      = 0.3;
            double suppressionValue = 0.5;

            if (args.Length > 0)
            {
                inputFile = args[0];
                if (args.Length > 1)
                {
                    jaqardIndex = double.Parse(args[1]);
                }
                if (args.Length > 2)
                {
                    suppressionValue = double.Parse(args[2]);
                }
            }
            Console.WriteLine($"Input file {inputFile}, JaqardIndex: {jaqardIndex}, SuppressionThreshold: {suppressionValue}");
            BoxSuppressor b     = new BoxSuppressor(jaqardIndex, suppressionValue);
            var           rects = b.SuppressTheBoxes(inputFile);

            WriteToOutputFile(rects);
        }