Пример #1
0
        public void Simple()
        {
            var vector1 = new VectorN(2);

            vector1[0] = 1;
            vector1[1] = 2;

            var vector2 = new VectorN(2);

            vector2[0] = 3;
            vector2[1] = 4;

            vector1.Swap((IVector <double>)vector2);

            Assert.AreEqual(3, vector1[0]);
            Assert.AreEqual(4, vector1[1]);
            Assert.AreEqual(1, vector2[0]);
            Assert.AreEqual(2, vector2[1]);
        }