Package org.encog.mathutil

Examples of org.encog.mathutil.ComplexNumber


    this(d.size());
   
    if( d instanceof MLComplexData ) {
      MLComplexData c = (MLComplexData)d;
      for (int i = 0; i < d.size(); i++) {
        this.data[i] = new ComplexNumber(c.getComplexData(i));
      }     
    } else {
      for (int i = 0; i < d.size(); i++) {
        this.data[i] = new ComplexNumber(d.getData(i), 0);
     
    }
   
   
  }
View Full Code Here


  /**
   * {@inheritDoc}
   */
  @Override
  public final void add(final int index, final double value) {
    this.data[index].plus(new ComplexNumber(value, 0));
  }
View Full Code Here

   * {@inheritDoc}
   */
  @Override
  public final void clear() {
    for (int i = 0; i < this.data.length; i++) {
      this.data[i] = new ComplexNumber(0, 0);
    }
  }
View Full Code Here

   * {@inheritDoc}
   */
  @Override
  public final void setData(final double[] theData) {
    for (int i = 0; i < theData.length; i++) {
      this.data[i] = new ComplexNumber(theData[i], 0);
    }
  }
View Full Code Here

   * @param index The index to to set.
   * @param d The numeric value to set.
   */
  @Override
  public final void setData(final int index, final double d) {
    this.data[index] = new ComplexNumber(d, 0);
  }
View Full Code Here

   *            The data to construct this object with.
   */
  public BasicMLComplexData(final double[] d) {
    this(d.length);
    for(int i=0;i<this.data.length;i++) {
      this.data[i] = new ComplexNumber(d[i],0);
    }
  }
View Full Code Here

    this(d.size());
   
    if( d instanceof MLComplexData ) {
      MLComplexData c = (MLComplexData)d;
      for (int i = 0; i < d.size(); i++) {
        this.data[i] = new ComplexNumber(c.getComplexData(i));
      }     
    } else {
      for (int i = 0; i < d.size(); i++) {
        this.data[i] = new ComplexNumber(d.getData(i), 0);
     
    }
   
   
  }
View Full Code Here

  /**
   * {@inheritDoc}
   */
  @Override
  public void add(final int index, final double value) {
    this.data[index].plus(new ComplexNumber(value, 0));
  }
View Full Code Here

   * {@inheritDoc}
   */
  @Override
  public void clear() {
    for (int i = 0; i < this.data.length; i++) {
      this.data[i] = new ComplexNumber(0, 0);
    }
  }
View Full Code Here

   * {@inheritDoc}
   */
  @Override
  public void setData(final double[] theData) {
    for (int i = 0; i < theData.length; i++) {
      this.data[i] = new ComplexNumber(theData[i], 0);
    }
  }
View Full Code Here

TOP

Related Classes of org.encog.mathutil.ComplexNumber

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.