Package cc.redberry.core.tensor.iterator

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


        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);
        System.out.println("pT -> M : " + status + ". Time: " + (stop - start) + " ms");
View Full Code Here


        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();
        System.out.println("s -> M^2 : " + status + ". Time: " + (stop - start) + " ms");
View Full Code Here

            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();
        System.out.println("pT-> M and s -> M^2 : " + status + ". Time: " + (stop - start) + " ms");
    }
View Full Code Here

                continue;
            c = iterator.current();
            if (TensorUtils.isZeroDueToSymmetry(c))
                iterator.set(Complex.ZERO);
        }
        return iterator.result();
    }
}
View Full Code Here

            if (mapping != null) {
                Tensor newFrom = ApplyIndexMapping.applyIndexMapping(to, mapping);
                iterator.set(newFrom);
            }
        }
        return iterator.result();
    }
}
View Full Code Here

                continue;
            c = iterator.current();
            if (TensorUtils.isZeroDueToSymmetry(c))
                iterator.set(Complex.ZERO);
        }
        return iterator.result();
    }
}
View Full Code Here

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

            if (mapping != null) {
                Tensor newFrom = ApplyIndexMapping.applyIndexMapping(to, mapping);
                iterator.set(newFrom);
            }
        }
        return iterator.result();
    }
}
View Full Code Here

            while (iterator.next() != null)
                if (TensorUtils.equals(iterator.current(), pT))
                    iterator.set(M8);
                else if (TensorUtils.equals(iterator.current(), s))
                    iterator.set(AllToM);
            iterator.result();
        }
    }

    public static void main(String[] args) {
        burnJVM();
View Full Code Here

        for (i = 0; i < 100; ++i) {
            iterator = new TreeTraverseIterator(target);
            while (iterator.next() != null)
                if (TensorUtils.equals(iterator.current(), pT))
                    iterator.set(M);
            ptM = iterator.result();
        }
        stop = System.currentTimeMillis();
        status = TensorUtils.equals(ptM, pTToM);
        System.out.println("pT -> M : " + status + ". Time: " + (stop - start) + " ms");
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.