コード例 #1
0
        public ByteTreeSearchBenchmarks()
        {
            var comparator       = new Comparator();
            var brancher         = new Brancher();
            var evaluator        = new Evaluator();
            var stateTransitions = new StateTransitions();

            _serial = new SerialAlfaBetaSearch <ByteNode, sbyte, sbyte>(
                evaluator,
                brancher,
                comparator,
                stateTransitions,
                sbyte.MaxValue,
                sbyte.MinValue);

            _serialTree = TreeGenerator.ReadTree();

            _dynamic = new DynamicTreeSplitting <AlfaBetaByteNode, sbyte, sbyte>(
                evaluator,
                brancher,
                comparator,
                stateTransitions
                );

            _dynamicTree = TreeGenerator.ReadAlfaBetaTree();

            _cts = new CancellationTokenSource();
        }
コード例 #2
0
        public SearchWithoutBranchingTest()
        {
            var comparator       = new Comparator();
            var brancher         = new Brancher();
            var evaluator        = new Evaluator();
            var stateTransitions = new StateTransitions();

            _search = new SerialAlfaBetaSearch <ByteNode, sbyte, sbyte>(
                evaluator,
                brancher,
                comparator,
                stateTransitions,
                sbyte.MaxValue,
                sbyte.MinValue
                );

            _cts = new CancellationTokenSource();
        }