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 org.apache.hadoop.hive.serde2.thrift.test.Complex

          for (int i=0; i<fields.size(); i++) {
            assertNull(soi.getStructFieldData(null, fields.get(i)));
          }
         
          // real object
          Complex cc = new Complex();
          cc.aint = 1;
          cc.aString = "test";
          List<Integer> c2 = Arrays.asList(new Integer[]{1,2,3});
          cc.lint =  c2;
          List<String> c3 = Arrays.asList(new String[]{"one", "two"});
    View Full Code Here

    Examples of org.exolab.castor.persist.spi.Complex

            try {
                int count = 1;
                selectStatement = conn.prepareStatement( select );
                if ( leftType.length > 1 ) {
                    Complex left = (Complex) leftValue;
                    for ( int i=0; i < left.size(); i++ ) {
                        selectStatement.setObject( count, idToSQL( i, left.get(i)), leftType[i] );
                        count++;
                    }
                } else {
                    selectStatement.setObject( count, idToSQL( 0, leftValue ), leftType[0] );
                    count++;
                }
                if ( rightType.length > 1 ) {
                    Complex right = (Complex) rightValue;
                    for ( int i=0; i < right.size(); i++ ) {
                        selectStatement.setObject( count, ridToSQL( i, right.get(i) ), rightType[i] );
                        count++;
                    }
                } else {
                    selectStatement.setObject( count, ridToSQL( 0, rightValue ), rightType[0] );
                }
                            count = 1;
                rset = selectStatement.executeQuery();

                insertStatement = conn.prepareStatement( insert );
                if ( ! rset.next() ) {
                    if ( leftType.length > 1 ) {
                        Complex left = (Complex) leftValue;
                        for ( int i=0; i < left.size(); i++ ) {
                            insertStatement.setObject( count, idToSQL( i, left.get(i)), leftType[i] );
                            count++;
                        }
                    } else {
                        insertStatement.setObject( count, idToSQL( 0, leftValue ), leftType[0] );
                                            count++;
                                    }
                    if ( rightType.length > 1 ) {
                        Complex right = (Complex) rightValue;
                        for ( int i=0; i < right.size(); i++ ) {
                            insertStatement.setObject( count, ridToSQL( i, right.get(i) ), rightType[i] );
                                            count++;
                        }
                    } else {
                        insertStatement.setObject( count, ridToSQL( 0, rightValue ), rightType[0] );
                    }
    View Full Code Here

    Examples of org.geotools.math.Complex

            for (int i=0; i<TPSI.length; i++) {
                dpsi += (TPSI[i] * dphi_pow_i);
                dphi_pow_i *= dphi;
            }
            // See implementation note in class javadoc.
            final Complex theta = new Complex(dpsi, x);
            final Complex power = new Complex(theta);
            final Complex z     = new Complex();
            z.multiply(A[0], power);
            for (int i=1; i<A.length; i++) {
                power.multiply(power, theta);
                z.addMultiply(z, A[i], power);
            }
            if (ptDst != null) {
                ptDst.setLocation(z.imag, z.real);
                return ptDst;
            }
    View Full Code Here

    Examples of org.gvt.model.biopaxl2.Complex

            Actor act = (Actor) obj;
            entity = act.getEntity();
          }
          else if (obj instanceof Complex)
          {
            Complex com = (Complex) obj;
            entity = com.getEntity();
          }
          else
          {
            entity = null;
          }
    View Full Code Here

    Examples of org.jamesii.core.math.complex.Complex

            && (abs(a.getArgument() - b.getArgument()) < EPSILON);
      }

      /** Tests the {@link Complex#Complex()} constructor. */
      public void testEmptyConstructor() {
        checkFields(new Complex(), 0, 0, 0, 0);
      }
    View Full Code Here

    Examples of org.jboss.test.annotation.factory.support.Complex

          System.setProperty("enumVal", "org.jboss.test.annotation.factory.support.MyEnum.TWO");
          System.setProperty("primitiveArray", "{1, 2, 3}");
         
          Annotation annotation  = (Annotation)AnnotationCreator.createAnnotation(expr, Complex.class, true);
          assertEquals(Complex.class, annotation.annotationType());
          Complex complex = (Complex)annotation;
          assertEquals('a', complex.ch());
          assertEquals("Test123", complex.string());
          assertEquals(9,9, complex.flt());
          assertEquals(123456789.99, complex.dbl());
          assertEquals(1, complex.shrt());
          assertEquals(987654321, complex.lng());
          assertEquals(123, complex.integer());
          assertEquals(true, complex.bool());
          assertEquals(Long.class, complex.clazz());
          assertEquals("Yes", complex.annotation().value());
          assertEquals(new String[]{"Test", "123"}, complex.array());
          assertEquals(MyEnum.TWO, complex.enumVal());
          assertArrays(new int[]{1, 2, 3}, complex.primitiveArray());
       }
    View Full Code Here

    Examples of org.jscience.mathematics.number.Complex


            /* calculate the expoonent */
            Integer bi;
            Unit thisUnit;
            Complex thisComplex;
            if (bIsReal && bMagIsInteger){
                /* If this.cComplex.getImaginary==0 then it must remain zero, since
                 exponent is whole nmber. Otherwise, we get small neg imaginary value
                 which results in sqrt((-2)^2)=-2  which is technically correct but
                 unexpected. */
                boolean zeroimag = false;
                if (this.cComplex.getImaginary()==0){
                    zeroimag = true;
                }
                bi = (Integer)bo;
                thisUnit =  this.getUnit().pow(bi);
                thisComplex = this.cComplex.pow(bi.doubleValue());
                //thisComplex = Complex.valueOf(Math.pow(this.cComplex.getReal(),bi),0);
                if (zeroimag){
                    thisComplex = Complex.valueOf(thisComplex.getReal(),0);
                }
                return ComplexAmount.valueOf(thisComplex, thisUnit);
            }
            else if (bIsReal && bInvIsInteger){
                /* If the inverse is an integer then we can take a root */
                thisUnit = this.getUnit().root(bInv);
                thisComplex = this.cComplex.pow(1/bInv.doubleValue());
                return ComplexAmount.valueOf(thisComplex,thisUnit);
            }
            else if (aIsUnitless){
                Logger.getLogger("com.CompPad").log(Level.FINE, bo + " " + this.cComplex);
                /* Must be complex or double */
                Complex a;
                Complex bb;
                a = this.cComplex;
                bb = b.cComplex;
                return ComplexAmount.valueOf(
                        a.pow(bb),
                        Unit.ONE);
    View Full Code Here

    Examples of org.jwildfire.base.mathlib.Complex

      @Override
      public void transform(FlameTransformationContext pContext, XForm pXForm, XYZPoint pAffineTP, XYZPoint pVarTP, double pAmount) {
        /* polylogarithm by dark-beam */
        // approx (very good) of Li[n](z) for n > 1
        double vv = pAmount;
        Complex z = new Complex(pAffineTP.x, pAffineTP.y);
        z.Pow(zpow);
        z.Save();
        if (z.Mag2() > 250000.0 || N >= 20) { // no convergence, or N too big... When N is big then Li tends to z
          pVarTP.x += vv * z.re;
          pVarTP.y += vv * z.im;
          return;
        }

        Complex LiN = new Complex();
        int i;
        Complex T = new Complex();
        Complex zPl1 = new Complex(z);

        if (z.Mag2() < 0.07) { // normal series. Li = sum((z^k)/(k^n))
          for (i = 1; i < 20; i++) {
            T.Copy(new Complex(pow(i, N)));
            T.DivR(z);
            LiN.Add(T);
            z.NextPow();
          }
          pVarTP.x += vv * LiN.re;
          pVarTP.y += vv * LiN.im;
          return;
        }
        // Crandall method (very simple and fast!) that uses Erdelyi series
        // from now on we will use ln(z) only so switch to it
        z.Log();
        z.Save();
        z.One();

        for (i = 0; i < 20; i++) {
          double zee = Riem.Z((int) N - i);
          if (zee != 0.0) {
            T.Copy(z);
            T.Scale(zee / (cern.jet.math.Arithmetic.longFactorial(i)));
            LiN.Add(T);
          }
          if (i == N - 1) {
            zPl1.Copy(z);
          }
          z.NextPow();
        }
        z.Restore(); // back to log(z) again...
        z.Neg();
    View Full Code Here

    Examples of org.opengis.geometry.complex.Complex

        assertTrue(ncs == cs);
        //System.out.println(ncs);
       
        // Boundaries
       
        Complex c = null;
        Boundary b = null;

        b = this.createCurve().getBoundary();
        c = b.getClosure();
        assertTrue(b == c);
    View Full Code Here

    Examples of org.zkoss.zss.engine.Complex

          suffix = args[2].toString();     
        }
        if(Double.isNaN(real) || Double.isNaN(imaginary) || (suffix!="i" && suffix!="j")) {
          throw new SSErrorXelException(SSError.VALUE);
        }
        return new Complex(real, imaginary, suffix);
      }
    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.