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 jscicalc.complex.Complex

         * Constructor. Sets a tooltip and shortcut. Also stores the value of Pi in
         * the container.
         */
        public Pi(){
      d = new Double( Math.PI );
      c = new Complex( StrictMath.PI );
      ftooltip = "<i>&#960;</i>";
      fshortcut = 'p';
        }
    View Full Code Here

    Examples of jscicalc.complex.Complex

      synchronized( applet ){
          if( getApplet().getMode() != 0 ){
        getApplet().setMode( 0 );
        getApplet().setShift( false );
          }
          getApplet().setMemory( new Complex() );
          getApplet().setShift( false );
          getApplet().updateDisplay( true, true );
          getApplet().requestFocusInWindow();
      }
        }
    View Full Code Here

    Examples of jscicalc.complex.Complex

        ans.setValue( (Complex)o );
        getApplet().insert( ans );
        getApplet().updateDisplay( true, true );
          }
          o = getApplet().getParser().evaluate( getApplet().getAngleType() );
          Complex d = (Complex)o;
          getApplet().setValue( getApplet().statSub( d ) );
          getApplet().updateDisplay( false, true );
          getApplet().setShift( false );
          getApplet().newExpression();
          getApplet().requestFocusInWindow();
    View Full Code Here

    Examples of jscicalc.complex.Complex

        getApplet().insert( ans );
        getApplet().updateDisplay( true, true );
          }
          o = getApplet().getParser().evaluate( getApplet().getAngleType() );
          if( o instanceof Complex ){
        Complex d = (Complex)o;
        getApplet().setValue( getApplet().statAdd( d ) );
        getApplet().updateDisplay( false, true );
          }
          getApplet().setShift( false );
          getApplet().newExpression();
    View Full Code Here

    Examples of jscicalc.complex.Complex

         * Constructor: initialises the contained value to zero.
         */
        public Container(){
      error = false;
      d = new Double( 0 );
      c = new Complex();
        }
    View Full Code Here

    Examples of jscicalc.complex.Complex

        /**
         * Constructor. Sets a tooltip and shortcut.
         */
        public Ans(){
      d = new Double( 0 );
      c = new Complex();
        }
    View Full Code Here

    Examples of jscicalc.complex.Complex

         * @param x The value (right of symbol)
         * @return The result of the operation
         */
        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

         * Set substitution to variable = x
         * @param x The value to be substituted
         * @return A substitued object
         */
        protected OObject substitute( double x ){
      substitution.add( variable, new Complex( x ) );
      OObject result = oobject.substitute( substitution ).auto_simplify();
    //   System.out.print( "Locus.substitute(): " );
    //   final int maxLength = 120;
    //   final int sigDigits = 32;
    //   jscicalc.Base base = jscicalc.Base.DECIMAL;
    View Full Code Here

    Examples of jscicalc.complex.Complex

      System.out.print( "[function( " );
      System.out.print( t.toModelX( x ) );
      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() );
          }
      }
      return Double.NaN;
        }
    View Full Code Here

    Examples of jscicalc.complex.Complex

         */
        public Product( Expression expression, final boolean inverse ){
      if( expression instanceof Product ){
          Product product = (Product)expression;
          if( inverse ){
        complex = new Complex( 1 );
        complex = complex.divide( product.complex );
        expressionList = product.divisorList;
        divisorList = product.expressionList;
          } else {
        complex = product.complex;
        expressionList = product.expressionList;
        divisorList = product.divisorList;
          }
      } else {
          complex = new Complex( 1 ); //one
          if( inverse ){
        expressionList = new java.util.LinkedList<Expression>();
        divisorList = new java.util.LinkedList<Expression>();
        divisorList.add( expression );
          } else {
    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.