Examples of imagValue()


Examples of r.data.RComplex.Complex.imagValue()

                Complex acmp = a.getComplex(i);
                Complex bcmp = b.getComplex(i);
                double areal = acmp.realValue();
                double aimag = acmp.imagValue();
                double breal = bcmp.realValue();
                double bimag = bcmp.imagValue();
                if (!RComplexUtils.arithEitherIsNA(areal, aimag) && !RComplexUtils.arithEitherIsNA(breal, bimag)) {
                    return arit.opComplex(ast, areal, aimag, breal, bimag);
                } else {
                    return RComplex.COMPLEX_BOXED_NA;
                }
View Full Code Here

Examples of r.data.RComplex.Complex.imagValue()

            @Override
            public Complex getComplex(int i) {
                Complex acmp = a.getComplex(i);
                double areal = acmp.realValue();
                double aimag = acmp.imagValue();
                if (!arithIsNA && !RComplexUtils.arithEitherIsNA(areal, aimag)) {
                    return arit.opComplex(ast, areal, aimag, breal, bimag);
                } else {
                    return RComplex.COMPLEX_BOXED_NA;
                }
View Full Code Here

Examples of r.data.RComplex.Complex.imagValue()

            @Override
            public Complex getComplex(int i) {
                Complex bcmp = b.getComplex(i);
                double breal = bcmp.realValue();
                double bimag = bcmp.imagValue();
                if (!arithIsNA && !RComplexUtils.arithEitherIsNA(breal, bimag)) {
                    return arit.opComplex(ast, areal, aimag, breal, bimag);
                } else {
                    return RComplex.COMPLEX_BOXED_NA;
                }
View Full Code Here

Examples of r.data.RComplex.Complex.imagValue()

                    // scalars
                    Complex acomp = a.getComplex(0);
                    Complex bcomp = b.getComplex(0);
                    Complex res = arit.opComplexCheckingNA(ast, acomp.realValue(), acomp.imagValue(), bcomp.realValue(), bcomp.imagValue());
                    // FIXME: it may really be worth having Complex == ScalarComplexImpl
                    return RComplex.RComplexFactory.getScalar(res.realValue(), res.imagValue(), dim, names, attributes);
                }
            } else if (nb == 1) {
                Complex bcomp = b.getComplex(0);
                return arit.opComplexImplScalarCheckingNA(ast, (ComplexImpl) a.materialize(), bcomp.realValue(), bcomp.imagValue(), na, dim, names, attributes);
            } else if (na == 1) {
View Full Code Here

Examples of r.data.RComplex.Complex.imagValue()

                    // FIXME: it may really be worth having Complex == ScalarComplexImpl
                    return RComplex.RComplexFactory.getScalar(res.realValue(), res.imagValue(), dim, names, attributes);
                }
            } else if (nb == 1) {
                Complex bcomp = b.getComplex(0);
                return arit.opComplexImplScalarCheckingNA(ast, (ComplexImpl) a.materialize(), bcomp.realValue(), bcomp.imagValue(), na, dim, names, attributes);
            } else if (na == 1) {
                Complex acomp = a.getComplex(0);
                return arit.opScalarComplexImplCheckingNA(ast, acomp.realValue(), acomp.imagValue(), (ComplexImpl) b.materialize(), nb, dim, names, attributes);
            } else {
                int n = resultSize(ast, na, nb);
View Full Code Here

Examples of r.data.RComplex.Complex.imagValue()

            } else if (nb == 1) {
                Complex bcomp = b.getComplex(0);
                return arit.opComplexImplScalarCheckingNA(ast, (ComplexImpl) a.materialize(), bcomp.realValue(), bcomp.imagValue(), na, dim, names, attributes);
            } else if (na == 1) {
                Complex acomp = a.getComplex(0);
                return arit.opScalarComplexImplCheckingNA(ast, acomp.realValue(), acomp.imagValue(), (ComplexImpl) b.materialize(), nb, dim, names, attributes);
            } else {
                int n = resultSize(ast, na, nb);
                if (n == na) {
                    return arit.opComplexImplASized(ast, (ComplexImpl) a.materialize(), (ComplexImpl) b.materialize(), n, nb, dim, names, attributes);
                } else {
View Full Code Here

Examples of r.data.RComplex.Complex.imagValue()

                Complex acmp = a.getComplex(ai);
                Complex bcmp = b.getComplex(bi);
                double areal = acmp.realValue();
                double aimag = acmp.imagValue();
                double breal = bcmp.realValue();
                double bimag = bcmp.imagValue();
                if (!RComplexUtils.arithEitherIsNA(areal, aimag) && !RComplexUtils.arithEitherIsNA(breal, bimag)) {
                    return arit.opComplex(ast, areal, aimag, breal, bimag);
                } else {
                    return RComplex.COMPLEX_BOXED_NA;
                }
View Full Code Here

Examples of r.data.RComplex.Complex.imagValue()

                Complex acmp = a.getComplex(ai);
                Complex bcmp = b.getComplex(bi);
                double areal = acmp.realValue();
                double aimag = acmp.imagValue();
                double breal = bcmp.realValue();
                double bimag = bcmp.imagValue();
                if (!RComplexUtils.arithEitherIsNA(areal, aimag) && !RComplexUtils.arithEitherIsNA(breal, bimag)) {
                    return arit.opComplex(ast, areal, aimag, breal, bimag);
                } else {
                    return RComplex.COMPLEX_BOXED_NA;
                }
View Full Code Here

Examples of r.data.RComplex.Complex.imagValue()

                Complex acmp = a.getComplex(ai);
                Complex bcmp = b.getComplex(bi);
                double areal = acmp.realValue();
                double aimag = acmp.imagValue();
                double breal = bcmp.realValue();
                double bimag = bcmp.imagValue();
                if (!RComplexUtils.arithEitherIsNA(areal, aimag) && !RComplexUtils.arithEitherIsNA(breal, bimag)) {
                    return arit.opComplex(ast, areal, aimag, breal, bimag);
                } else {
                    return RComplex.COMPLEX_BOXED_NA;
                }
View Full Code Here

Examples of r.data.RComplex.Complex.imagValue()

                } else {
                    throw RError.getScanUnexpected(ast, "a complex", str);
                }
            }
            content[2 * i] = c.realValue();
            content[2 * i + 1] = c.imagValue();
        }
        return RComplex.RComplexFactory.getFor(content);
    }

    public static RDouble scanDouble(ArrayList<String> src, ASTNode ast) {
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.