Ejemplo n.º 1
0
        public void Equals()
        {
            var a = new ComplexDoubleVector(2, 4);
            var b = new ComplexDoubleVector(2, 4);
            var c = new ComplexDoubleVector(2)
            {
                [0] = 4,
                [1] = 4
            };

            var d = new ComplexDoubleVector(2, 5);
            ComplexDoubleVector e = null;
            var f = new FloatVector(2, 4);

            Assert.IsTrue(a.Equals(b));
            Assert.IsTrue(b.Equals(a));
            Assert.IsTrue(a.Equals(c));
            Assert.IsTrue(b.Equals(c));
            Assert.IsTrue(c.Equals(b));
            Assert.IsTrue(c.Equals(a));
            Assert.IsFalse(a.Equals(d));
            Assert.IsFalse(d.Equals(b));
            Assert.IsFalse(a.Equals(e));
            Assert.IsFalse(a.Equals(f));
        }
Ejemplo n.º 2
0
        public void Equals()
        {
            ComplexDoubleVector a = new ComplexDoubleVector(2, 4);
            ComplexDoubleVector b = new ComplexDoubleVector(2, 4);
            ComplexDoubleVector c = new ComplexDoubleVector(2);

            c[0] = 4;
            c[1] = 4;

            ComplexDoubleVector d = new ComplexDoubleVector(2, 5);
            ComplexDoubleVector e = null;
            FloatVector         f = new FloatVector(2, 4);

            Assert.IsTrue(a.Equals(b));
            Assert.IsTrue(b.Equals(a));
            Assert.IsTrue(a.Equals(c));
            Assert.IsTrue(b.Equals(c));
            Assert.IsTrue(c.Equals(b));
            Assert.IsTrue(c.Equals(a));
            Assert.IsFalse(a.Equals(d));
            Assert.IsFalse(d.Equals(b));
            Assert.IsFalse(a.Equals(e));
            Assert.IsFalse(a.Equals(f));
        }