Package r.data.RAny

Examples of r.data.RAny.Attributes


            if (LIMIT_VIEW_DEPTH) {
                depth = complexViewDepth(a) + complexViewDepth(b) + 1;
            }
            int[] dim = resultDimensions(ast, a, b);
            Names names = resultNames(ast, a, b);
            Attributes attributes = resultAttributes(ast, a, b);
            int na = a.size();
            int nb = b.size();
            RComplex res;

            if (na == nb) {
View Full Code Here


            if (LIMIT_VIEW_DEPTH) {
                depth = doubleViewDepth(a) + doubleViewDepth(b) + 1;
            }
            int[] dim = resultDimensions(ast, a, b);
            Names names = resultNames(ast, a, b);
            Attributes attributes = resultAttributes(ast, a, b);
            int na = a.size();
            int nb = b.size();
            RDouble res;

            if (na == nb) {
View Full Code Here

            if (LIMIT_VIEW_DEPTH) {
                depth = doubleViewDepth(a) + intViewDepth(b) + 1;
            }
            int[] dim = resultDimensions(ast, a, b);
            Names names = resultNames(ast, a, b);
            Attributes attributes = resultAttributes(ast, a, b);
            int na = a.size();
            int nb = b.size();
            RDouble res;

            if (na == nb) {
View Full Code Here

            if (LIMIT_VIEW_DEPTH) {
                depth = intViewDepth(a) + doubleViewDepth(b) + 1;
            }
            int[] dim = resultDimensions(ast, a, b);
            Names names = resultNames(ast, a, b);
            Attributes attributes = resultAttributes(ast, a, b);
            int na = a.size();
            int nb = b.size();
            RDouble res;

            if (na == nb) {
View Full Code Here

            if (LIMIT_VIEW_DEPTH) {
                depth = intViewDepth(a) + intViewDepth(b) + 1;
            }
            int[] dim = resultDimensions(ast, a, b);
            Names names = resultNames(ast, a, b);
            Attributes attributes = resultAttributes(ast, a, b);
            int na = a.size();
            int nb = b.size();
            RInt res;

            if (na == nb) {
View Full Code Here

        @Override
        public RComplex complexBinary(RComplex a, RComplex b, ValueArithmetic arit, ASTNode ast) {
            int[] dim = resultDimensions(ast, a, b);
            Names names = resultNames(ast, a, b);
            Attributes attributes = resultAttributes(ast, a, b);
            int na = a.size();
            int nb = b.size();

            if (na == nb) {
                if (na > 1) {
View Full Code Here

        @Override
        public RDouble doubleBinary(RDouble a, RDouble b, ValueArithmetic arit, ASTNode ast) {
            int[] dim = resultDimensions(ast, a, b);
            Names names = resultNames(ast, a, b);
            Attributes attributes = resultAttributes(ast, a, b);
            int na = a.size();
            int nb = b.size();

            if (na == nb) {
                if (na > 1) {
View Full Code Here

        @Override
        public RDouble doubleBinary(RDouble a, RInt b, ValueArithmetic arit, ASTNode ast) { // TODO: int sequences
            int[] dim = resultDimensions(ast, a, b);
            Names names = resultNames(ast, a, b);
            Attributes attributes = resultAttributes(ast, a, b);
            int na = a.size();
            int nb = b.size();

            if (na == nb) {
                if (na > 1) {
View Full Code Here

        @Override
        public RDouble doubleBinary(RInt a, RDouble b, ValueArithmetic arit, ASTNode ast) { // TODO: int sequences
            int[] dim = resultDimensions(ast, a, b);
            Names names = resultNames(ast, a, b);
            Attributes attributes = resultAttributes(ast, a, b);
            int na = a.size();
            int nb = b.size();

            if (na == nb) {
                if (na > 1) {
View Full Code Here

        }
    }

    // note: increments reference count on attributes
    public static Attributes resultAttributes(@SuppressWarnings("unused") ASTNode ast, RArray a, RArray b) {
        Attributes aa = a.attributes();
        Attributes ba = b.attributes();

        if (ba == null && aa == null) {
            return null;
        }
        int asize = a.size();
        int bsize = b.size();

        if (asize > bsize) {
            return Attributes.markShared(aa);
        }
        if (bsize > asize) {
            return Attributes.markShared(ba);
        }
        // asize == bsize
        if (ba == null) {
            return Attributes.markShared(aa);
        }
        if (aa == null) {
            return Attributes.markShared(ba);
        }
        // both aa != null and ba != null

        Attributes res = ba.copy();
        Map<RSymbol, RAny> amap = aa.map();
        for (Map.Entry<RSymbol, RAny> ae : amap.entrySet()) {
            RAny value = ae.getValue();
            value.ref();
            res.put(ae.getKey(), value);
        }
        return res;
    }
View Full Code Here

TOP

Related Classes of r.data.RAny.Attributes

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.