Examples of AbstractDoubleCalc


Examples of mondrian.calc.impl.AbstractDoubleCalc

    }

    protected Calc genIterCalc(
        final ResolvedFunCall call, final Calc ncalc, final Calc calc)
    {
        return new AbstractDoubleCalc(call, new Calc[] {ncalc, calc}) {
            public double evaluateDouble(Evaluator evaluator) {
                IterCalc iterCalc = (IterCalc) ncalc;
                Iterable iterable =
                    evaluateCurrentIterable(iterCalc, evaluator);
                return sumDouble(evaluator.push(), iterable, calc);
View Full Code Here

Examples of mondrian.calc.impl.AbstractDoubleCalc

    }

    protected Calc genListCalc(
        final ResolvedFunCall call, final Calc ncalc, final Calc calc)
    {
        return new AbstractDoubleCalc(call, new Calc[] {ncalc, calc}) {
            public double evaluateDouble(Evaluator evaluator) {
                ListCalc listCalc = (ListCalc) ncalc;
                List memberList = evaluateCurrentList(listCalc, evaluator);
                return sumDouble(evaluator.push(false), memberList, calc);
            }
View Full Code Here

Examples of mondrian.calc.impl.AbstractDoubleCalc

            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(
                    evaluator.push(false), memberList, calc1, calc2, biased);
View Full Code Here

Examples of mondrian.calc.impl.AbstractDoubleCalc

            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

Examples of mondrian.calc.impl.AbstractDoubleCalc

            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
                     ? max(evaluator.push(false), memberList, calc)
View Full Code Here

Examples of mondrian.calc.impl.AbstractDoubleCalc

            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

Examples of mondrian.calc.impl.AbstractDoubleCalc

                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

Examples of mondrian.calc.impl.AbstractDoubleCalc

        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

Examples of mondrian.calc.impl.AbstractDoubleCalc

    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 (Double)avg(evaluator.push(false), memberList, calc);
            }
View Full Code Here

Examples of mondrian.calc.impl.AbstractDoubleCalc

            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, false);
            }
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.