Package mondrian.calc.impl

Examples of mondrian.calc.impl.ValueCalc


                    AggregateFunDef.AggregateCalc.optimizeTupleList(
                        evaluator,
                        tupleList);

                final Calc valueCalc =
                    new ValueCalc(
                        new DummyExp(new ScalarType()));
                final List<Member[]> tupleList1 = tupleList;
                final Calc calc =
                    new GenericCalc(
                        new DummyExp(query.slicerCalc.getType()))
View Full Code Here


            // if there are unique members on both axes and no order function,
            //  sort the list to ensure default order
            if (halfWay > 0 && halfWay < list.size() && !ordered) {
                Member[] membs = list.get(0);
                int membsSize = membs.length;
                ValueCalc valCalc =
                    new ValueCalc(
                        new DummyExp(new ScalarType()));
                FunUtil.sortTuples(
                    evaluator,
                    list,
                    list,
View Full Code Here

        if (ncalc == null) {
            return null;
        }
        final Calc calc = call.getArgCount() > 1
            ? compiler.compileScalar(call.getArg(1), true)
            : new ValueCalc(call);
        // we may have asked for one sort of Calc, but here's what we got.
        if (ncalc instanceof ListCalc) {
            return genListCalc(call, ncalc, calc);
        } else {
            return genIterCalc(call, ncalc, calc);
View Full Code Here

        final Calc calc1 =
            compiler.compileScalar(call.getArg(1), true);
        final Calc calc2 =
            call.getArgCount() > 2
            ? compiler.compileScalar(call.getArg(2), true)
            : new ValueCalc(call);
        return new AbstractDoubleCalc(call, new Calc[] {listCalc, calc1, calc2})
        {
            public double evaluateDouble(Evaluator evaluator) {
                List memberList = listCalc.evaluateList(evaluator);
                return (Double) covariance(
View Full Code Here

        final ListCalc listCalc =
            compiler.compileList(call.getArg(0));
        final Calc calc =
            call.getArgCount() > 1
            ? compiler.compileScalar(call.getArg(1), true)
            : new ValueCalc(call);
        return new AbstractDoubleCalc(call, new Calc[] {listCalc, calc}) {
            public double evaluateDouble(Evaluator evaluator) {
                List memberList = evaluateCurrentList(listCalc, evaluator);
                return (Double) stdev(
                    evaluator.push(false), memberList, calc, true);
View Full Code Here

        final ListCalc listCalc =
            compiler.compileList(call.getArg(0));
        final Calc calc =
            call.getArgCount() > 1
            ? compiler.compileScalar(call.getArg(1), true)
            : new ValueCalc(call);
        return new AbstractDoubleCalc(call, new Calc[] {listCalc, calc}) {
            public double evaluateDouble(Evaluator evaluator) {
                List memberList = evaluateCurrentList(listCalc, evaluator);
                return (Double)
                    (max
View Full Code Here

        final ListCalc listCalc =
            compiler.compileList(call.getArg(0));
        final Calc calc =
            call.getArgCount() > 1
            ? compiler.compileScalar(call.getArg(1), true)
            : new ValueCalc(call);
        return new AbstractDoubleCalc(call, new Calc[] {listCalc, calc}) {
            public double evaluateDouble(Evaluator evaluator) {
                List memberList = evaluateCurrentList(listCalc, evaluator);
                return (Double) var(
                    evaluator.push(false), memberList, calc, true);
View Full Code Here

        final ListCalc listCalc =
                compiler.compileList(call.getArg(0));
        final DoubleCalc doubleCalc =
            call.getArgCount() > 1
            ? compiler.compileDouble(call.getArg(1))
            : new ValueCalc(call);
        return new AbstractDoubleCalc(call, new Calc[] {listCalc, doubleCalc}) {
            public double evaluateDouble(Evaluator evaluator) {
                List members = evaluateCurrentList(listCalc, evaluator);
                return quartile(
                    evaluator.push(false), members, doubleCalc, range);
View Full Code Here

    public Calc compileCall(ResolvedFunCall call, ExpCompiler compiler) {
        final ListCalc listCalc =
                compiler.compileList(call.getArg(0));
        final Calc calc = call.getArgCount() > 1
            ? compiler.compileScalar(call.getArg(1), true)
            : new ValueCalc(call);
        return new AbstractDoubleCalc(call, new Calc[] {listCalc, calc}) {
            public double evaluateDouble(Evaluator evaluator) {
                List memberList = evaluateCurrentList(listCalc, evaluator);
                return percentile(evaluator.push(false), memberList, calc, 0.5);
            }
View Full Code Here

                ? compiler.compileLevel(call.getArg(2))
                : null;
        final Calc orderCalc =
            call.getArgCount() > 3
            ? compiler.compileScalar(call.getArg(3), true)
            : new ValueCalc(
                new DummyExp(
                    new ScalarType()));
        return new AbstractListCalc(
            call,
            new Calc[] {listCalc, integerCalc, orderCalc})
View Full Code Here

TOP

Related Classes of mondrian.calc.impl.ValueCalc

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.