Ejemplo n.º 1
0
        public Test(string filePath)
        {
            string solutionFileName = PathToSolutionPath(filePath);
            var    knapsackReader   = new KnapsackReader(filePath, solutionFileName);

            Knapsack knapsack;

            do
            {
                knapsack = knapsackReader.ReadKnapsack();

                if (knapsack != null)
                {
                    _knapsacks.Add(knapsack);
                }
            } while (knapsack != null);
        }
Ejemplo n.º 2
0
        public Test(StreamReader streamReader, GeneratorSetup generatorSetup)
        {
            KnapsackReader knapsackReader = new KnapsackReader(streamReader);

            _generatorSetup = generatorSetup;

            Knapsack knapsack;

            do
            {
                knapsack = knapsackReader.ReadKnapsack();

                if (knapsack != null)
                {
                    _knapsacks.Add(knapsack);
                }
            } while (knapsack != null);
        }