Example #1
0
        /// <summary>
        /// Tests if the two given edges are compared correctly by the CHEdgeDataComparer.
        /// </summary>
        /// <param name="overapping"></param>
        /// <param name="overlappee"></param>
        /// <param name="result"></param>
        private void DoTestCompare(CHEdgeData overapping, CHEdgeData overlappee, bool result)
        {
            CHEdgeDataComparer comparer = new CHEdgeDataComparer();

            if (result)
            {
                Assert.IsTrue(comparer.Overlaps(overapping, overlappee));
            }
            else
            {
                Assert.IsFalse(comparer.Overlaps(overapping, overlappee));
            }
        }
Example #2
0
        /// <summary>
        /// Creates a new pre-processor.
        /// </summary>
        /// <param name="target"></param>
        /// <param name="calculator"></param>
        /// <param name="witnessCalculator"></param>
        /// <param name="keepDirectNeighbours"></param>
        public CHPreProcessor(IDynamicGraphRouterDataSource<CHEdgeData> target,
                INodeWeightCalculator calculator,
                INodeWitnessCalculator witnessCalculator,
                bool keepDirectNeighbours,
                double preProcessingPercentage)
        {
            _comparer = new CHEdgeDataComparer();

            _keepDirectNeighbours = keepDirectNeighbours;

            _target = target;

            _calculator = calculator;
            _witnessCalculator = witnessCalculator;
            _preProcessingPercentage = preProcessingPercentage;

            _queue = new CHPriorityQueue();
            _contracted = new bool[1000];
        }
Example #3
0
        /// <summary>
        /// Creates a new pre-processor.
        /// </summary>
        /// <param name="target"></param>
        /// <param name="calculator"></param>
        /// <param name="witnessCalculator"></param>
        /// <param name="keepReverseEdges"></param>
        public CHPreProcessor(IDynamicGraphRouterDataSource<CHEdgeData> target,
                INodeWeightCalculator calculator,
                INodeWitnessCalculator witnessCalculator,
                bool keepReverseEdges)
        {
            _comparer = new CHEdgeDataComparer();

            _target = target;

            _calculator = calculator;
            _witnessCalculator = witnessCalculator;

            _queue = new CHPriorityQueue();
            _contracted = new bool[1000];
        }
 /// <summary>
 /// Tests if the two given edges are compared correctly by the CHEdgeDataComparer.
 /// </summary>
 /// <param name="overapping"></param>
 /// <param name="overlappee"></param>
 private void DoTestCompare(CHEdgeData overapping, CHEdgeData overlappee, bool result)
 {
     CHEdgeDataComparer comparer = new CHEdgeDataComparer();
     if (result)
     {
         Assert.IsTrue(comparer.Overlaps(overapping, overlappee));
     }
     else
     {
         Assert.IsFalse(comparer.Overlaps(overapping, overlappee));
     }
 }
Example #5
0
        /// <summary>
        /// Creates a new pre-processor.
        /// </summary>
        /// <param name="target"></param>
        /// <param name="calculator"></param>
        /// <param name="witness_calculator"></param>
        /// <param name="max"></param>
        public CHPreProcessor(IDynamicGraph<CHEdgeData> target,
                INodeWeightCalculator calculator,
                INodeWitnessCalculator witness_calculator,
                int max)
        {
            _comparer = new CHEdgeDataComparer();

            _target = target;

            _calculator = calculator;
            _witness_calculator = witness_calculator;

            _queue = new CHPriorityQueue();
            _contracted = new bool[1000];
        }