public void Interval2D_Equals()
        {
            var sut      = Interval2D.Create(Interval1D.Create(0, 5), Interval1D.Create(2, 5));
            var equal    = Interval2D.Create(Interval1D.Create(0, 5), Interval1D.Create(2, 5));
            var notEqual = Interval2D.Create(Interval1D.Create(2, 5), Interval1D.Create(0, 5));

            Assert.IsTrue(sut.Equals(equal));
            Assert.IsFalse(sut.Equals(notEqual));
        }
Example #2
0
        public unsafe void F64MatrixView_SubView()
        {
            var matrix = Matrix();

            using (var pinnedMatrix = matrix.GetPinnedPointer())
            {
                var subView   = pinnedMatrix.View().View(Interval2D.Create(Interval1D.Create(0, 2), Interval1D.Create(0, 3)));
                var subMatrix = matrix.Rows(new int[] { 0, 1 });
                AssertMatrixView(subMatrix, subView);
            }
        }