Package cc.redberry.core.tensor.iterator

Examples of cc.redberry.core.tensor.iterator.TreeTraverseIterator.current()


        start = System.currentTimeMillis();
        Tensor allM = null;
        for (i = 0; i < 100; ++i) {
            iterator = new TreeTraverseIterator(target);
            while (iterator.next() != null)
                if (TensorUtils.equalsExactly(iterator.current(), pT))
                    iterator.set(M);
                else if (TensorUtils.equalsExactly(iterator.current(), s))
                    iterator.set(M2);
            allM = iterator.result();
        }
View Full Code Here


        for (i = 0; i < 100; ++i) {
            iterator = new TreeTraverseIterator(target);
            while (iterator.next() != null)
                if (TensorUtils.equalsExactly(iterator.current(), pT))
                    iterator.set(M);
                else if (TensorUtils.equalsExactly(iterator.current(), s))
                    iterator.set(M2);
            allM = iterator.result();
        }
        status = TensorUtils.equalsExactly(allM, AllToM);
        stop = System.currentTimeMillis();
View Full Code Here

        Tensor s = Tensors.parse("s");
        for (int i = 0; i < 1000; ++i) {
            TreeTraverseIterator iterator = new TreeTraverseIterator(target);

            while (iterator.next() != null)
                if (TensorUtils.equalsExactly(iterator.current(), pT))
                    iterator.set(M8);
                else if (TensorUtils.equalsExactly(iterator.current(), s))
                    iterator.set(AllToM);
            iterator.result();
        }
View Full Code Here

            TreeTraverseIterator iterator = new TreeTraverseIterator(target);

            while (iterator.next() != null)
                if (TensorUtils.equalsExactly(iterator.current(), pT))
                    iterator.set(M8);
                else if (TensorUtils.equalsExactly(iterator.current(), s))
                    iterator.set(AllToM);
            iterator.result();
        }
    }
View Full Code Here

        start = System.currentTimeMillis();
        Tensor ptM = null;
        for (i = 0; i < 100; ++i) {
            iterator = new TreeTraverseIterator(target);
            while (iterator.next() != null)
                if (TensorUtils.equalsExactly(iterator.current(), pT))
                    iterator.set(M);
            ptM = iterator.result();
        }
        stop = System.currentTimeMillis();
        status = TensorUtils.equalsExactly(ptM, pTToM);
View Full Code Here

        start = System.currentTimeMillis();
        Tensor sM = null;
        for (i = 0; i < 100; ++i) {
            iterator = new TreeTraverseIterator(target);
            while (iterator.next() != null)
                if (TensorUtils.equalsExactly(iterator.current(), s))
                    iterator.set(M2);
            sM = iterator.result();
        }
        status = TensorUtils.equalsExactly(sM, sToM);
        stop = System.currentTimeMillis();
View Full Code Here

        start = System.currentTimeMillis();
        Tensor allM = null;
        for (i = 0; i < 100; ++i) {
            iterator = new TreeTraverseIterator(target);
            while (iterator.next() != null)
                if (TensorUtils.equalsExactly(iterator.current(), pT))
                    iterator.set(M);
                else if (TensorUtils.equalsExactly(iterator.current(), s))
                    iterator.set(M2);
            allM = iterator.result();
        }
View Full Code Here

        for (i = 0; i < 100; ++i) {
            iterator = new TreeTraverseIterator(target);
            while (iterator.next() != null)
                if (TensorUtils.equalsExactly(iterator.current(), pT))
                    iterator.set(M);
                else if (TensorUtils.equalsExactly(iterator.current(), s))
                    iterator.set(M2);
            allM = iterator.result();
        }
        status = TensorUtils.equalsExactly(allM, AllToM);
        stop = System.currentTimeMillis();
View Full Code Here

        TraverseState state;
        Tensor c;
        while ((state = iterator.next()) != null) {
            if (state != TraverseState.Leaving)
                continue;
            c = iterator.current();
            if (TensorUtils.isZeroDueToSymmetry(c))
                iterator.set(Complex.ZERO);
        }
        return iterator.result();
    }
View Full Code Here

        TraverseState currentState;
        Tensor currentTensor, newTensor;
        while ((currentState = iterator.next()) != null) {
            if (currentState != state)
                continue;
            currentTensor = newTensor = iterator.current();

            for (Transformation transformation : transformations)
                newTensor = transformation.transform(newTensor);
            if (currentTensor != newTensor)
                iterator.set(newTensor);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.