Examples of real()


Examples of com.nr.fft.WrapVecDoub.real()

    System.out.println("Testing WrapVecDoub[], interface1");

    WrapVecDoub data = new WrapVecDoub(2*N);
    for (i=0;i<N;i++) data.set(i,new Complex(2*i,2*i+1));
    for (i=0;i<N;i++)
      localflag = localflag || (data.real(i) != 2*i) || (data.imag(i) != 2*i+1);
    globalflag = globalflag || localflag;
    if (localflag) {
      fail("*** WrapVecDoub[], interface1: Failure to write complex, and read with .real() and .imag()");
     
    }
View Full Code Here

Examples of com.nr.fft.WrapVecDoub.real()

    double[] dat = new double[2*N];
    for (i=0;i<2*N;i++) dat[i]=i;
    WrapVecDoub data2 = new WrapVecDoub(dat);

    for (i=0;i<N;i++)
      localflag = localflag || (data2.real(i) != 2*i) || (data2.imag(i) != 2*i+1);
    globalflag = globalflag || localflag;
    if (localflag) {
      fail("*** WrapVecDoub[], interface2: Incorrect values recovered with .real() and .imag() from initialized WrapVecDoub[]");
     
    }
View Full Code Here

Examples of jscicalc.complex.Complex.real()

    PObject p = (PObject)o;
    for( String s : p.name_array() )
        c.add( s );
      } else if( o instanceof Complex ){
    Complex z = (Complex)o;
    String s = Double.toString( z.real() )
        + "+i" + Double.toString( z.imaginary() );
    c.add( s );
      } else ifo instanceof Double ){
    Double d = (Double)o;
    c.add( d.toString() );
View Full Code Here

Examples of jscicalc.complex.Complex.real()

    public OObject function( OObject x ){
  if( x instanceof Complex ){
      Complex c = (Complex)x;
      if( scale != 1 && StrictMath.abs( c.imaginary() ) > 1e-6 )
    throw new RuntimeException( "Error" );
      if( scale != 1 && StrictMath.abs( c.real() ) > 1 )
    throw new RuntimeException( "Error" );
      return c.acos().scale( iscale );
  } else {
      return x.acos( angleType );
  }
View Full Code Here

Examples of jscicalc.complex.Complex.real()

  System.out.print( " ) = " );
  OObject p = substitute( t.toModelX( x ) );
  if( p instanceof Complex ){
      Complex z = (Complex)p;
      if( Math.abs( z.imaginary() ) < epsilon ){
    double y = z.real();
    System.out.print( y );
    System.out.print( "]" );
    return t.toViewY( z.real() );
      }
  }
View Full Code Here

Examples of jscicalc.complex.Complex.real()

      Complex z = (Complex)p;
      if( Math.abs( z.imaginary() ) < epsilon ){
    double y = z.real();
    System.out.print( y );
    System.out.print( "]" );
    return t.toViewY( z.real() );
      }
  }
  return Double.NaN;
    }
   
View Full Code Here

Examples of jscicalc.complex.Complex.real()

    public OObject function( OObject x ){
  if( x instanceof Complex ){
      Complex c = (Complex)x;
      if( scale != 1 && StrictMath.abs( c.imaginary() ) > 1e-6 )
    throw new RuntimeException( "Error" );
      if( scale != 1 && StrictMath.abs( c.real() ) > 1 )
    throw new RuntimeException( "Error" );
      return c.asin().scale( iscale );
  } else {
      return x.asin( angleType );
  }
View Full Code Here

Examples of org.eclipse.imp.pdb.facts.IValueFactory.real()

      RealPointValuePair res =
          solver.optimize(fJ, constraintsJ, goal,nonNegativeJ);
      return vf.constructor(Maybe.Maybe_just,
          vf.constructor(
              LLSolution_llSolution, convertToRealList(res.getPoint(), vf),
              vf.real(res.getValue()) )
          );
    } catch (Exception e) {
      return  vf.constructor(Maybe.Maybe_nothing);
    }
View Full Code Here

Examples of org.sql.generation.api.grammar.factories.DataTypeFactory.real()

        this._primitiveTypes.put( Boolean.class, dt.sqlBoolean() );
        this._primitiveTypes.put( Byte.class, dt.smallInt() );
        this._primitiveTypes.put( Short.class, dt.smallInt() );
        this._primitiveTypes.put( Integer.class, dt.integer() );
        this._primitiveTypes.put( Long.class, dt.bigInt() );
        this._primitiveTypes.put( Float.class, dt.real() );
        this._primitiveTypes.put( Double.class, dt.doublePrecision() );
        this._primitiveTypes.put( Date.class, dt.timeStamp( true ) );
        this._primitiveTypes.put( Character.class, dt.integer() );
        this._primitiveTypes.put( String.class, dt.sqlVarChar( 5000 ) );
        this._primitiveTypes.put( BigInteger.class, dt.decimal() );
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.