コード例 #1
0
        public void TwoEqualVectors_WithDifferentSpace_AreNotEqual()
        {
            var space2 = ObjectCreators.GetDecisionSpace(Dims, MinValueContinuous - 1, MaxValueContinuous + 1);
            var dv1    = DecisionVector.CreateFromArray(continuousSpace, exampleContinuousVector);
            var dv2    = DecisionVector.CreateFromArray(space2, exampleContinuousVector);

            Assert.False(dv1.Equals(dv2));
        }
コード例 #2
0
        public void DifferenceOfTwoDifferentVectors_WithDifferentSpace_Fails()
        {
            var dv1 = DecisionVector.CreateFromArray(continuousSpace, exampleContinuousVector);
            var dv2 = DecisionVector.CreateFromArray(
                ObjectCreators.GetDecisionSpace(4, MinValueContinuous - 1, MaxValueContinuous + 1),
                exampleContinuousVector);

            Assert.Throws <ArgumentException>(
                () => dv1 - dv2);
        }