Examples of Complex

@author Edward A. Lee, Jeff Tsay, Steve Neuendorffer, Adam Cataldo @version $Id: Complex.java,v 1.91 2007/12/06 21:57:08 cxh Exp $ @since Ptolemy II 0.2 @Pt.ProposedRating Yellow (eal) @Pt.AcceptedRating Red (cxh)
  • r.data.RComplex.Complex

  • Examples of ptolemy.math.Complex

                    jjtc001 = false;
                    try {
                        x = token.image.toLowerCase();
                        len = x.length();
                        Double imag = new Double(x.substring(0, len - 1));
                        Complex value = new Complex(0, imag.doubleValue());
                        jjtn001._ptToken = new ComplexToken(value);
                        jjtn001._isConstant = true;
                    } catch (NumberFormatException ee) {
                        {
                            if (true) {
                                throw new ParseException("Unable to convert token "
                                        + token.image + " to a complex number.");
                            }
                        }
                    }
                } finally {
                    if (jjtc001) {
                        jjtree.closeNodeScope(jjtn001, true);
                    }
                }
                break;
            case DOUBLE:
                ASTPtLeafNode jjtn002 = new ASTPtLeafNode(JJTPTLEAFNODE);
                boolean jjtc002 = true;
                jjtree.openNodeScope(jjtn002);
                try {
                    jj_consume_token(DOUBLE);
                    jjtree.closeNodeScope(jjtn002, true);
                    jjtc002 = false;
                    try {
                        x = token.image.toLowerCase();
                        len = x.length();
                        if (x.endsWith("f")) {
                            Float value = new Float(x.substring(0, len - 1));
                            jjtn002._ptToken = new FloatToken(value.floatValue());
                        } else if (x.endsWith("d") || x.endsWith("p")) {
                            // all floating point numbers are double
                            Double value = new Double(x.substring(0, len - 1));
                            if (x.endsWith("p")) {
                                jjtn002._ptToken = new PetiteToken(value
                                        .doubleValue());
                            } else {
                                jjtn002._ptToken = new DoubleToken(value
                                        .doubleValue());
                            }
                        } else {
                            Double value = new Double(x);
                            jjtn002._ptToken = new DoubleToken(value.doubleValue());
                        }
                        jjtn002._isConstant = true;
                    } catch (NumberFormatException ee) {
                        {
                            if (true) {
    View Full Code Here

    Examples of r.data.RComplex.Complex

                    }
                }

                @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
    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.