Package ra.operators

Examples of ra.operators.ProjectT


    public static Term project(Term formula, int... indexes) throws IndexOutOfBoundsException {
        int[] newIndexes = indexes;
        if (formula instanceof ProjectT && formula.alias == null) {
            /* The below is to avoid emitting {@code project(project(...),...)} - but only
             * if the inner projection has no alias */
            ProjectT innerProjection = (ProjectT) formula;
            formula = innerProjection.getInputTerm();
            List<Integer> innerIndexes = innerProjection.getIndexes();
            newIndexes = new int[indexes.length];
            for (int i = 0; i < indexes.length; ++i) {
                newIndexes[i] = innerIndexes.get(indexes[i]-1);
            }
        }
View Full Code Here

TOP

Related Classes of ra.operators.ProjectT

Copyright © 2018 www.massapicom. 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.