Package org.encog.ml.data

Examples of org.encog.ml.data.MLDataError


   
    while( this.sequences.get(sequenceIndex).getRecordCount()<recordIndex) {
      recordIndex-=this.sequences.get(sequenceIndex).getRecordCount();
      sequenceIndex++;
      if( sequenceIndex>this.sequences.size() ) {
        throw new MLDataError("Record out of range: " + index);
      }
    }

    this.sequences.get(sequenceIndex).getRecord(recordIndex, pair);
  }
View Full Code Here


  {
    try
    {
      int i=0;
      if(i==0)
        throw new MLDataError("test");
      TestCase.assertTrue(false);
    }
    catch(MLDataError e)
    {
    }
   
    try
    {
      Graphics g = null;
      g.create();
    }
    catch(NullPointerException e)
    {
      try
      {
        int i=0;
        if(i==0)
          throw new MLDataError(e);
        TestCase.assertTrue(false);
      }
      catch(MLDataError e2)
      {
       
View Full Code Here

  /**
   * {@inheritDoc}
   */
  @Override
  public void remove() {
    throw new MLDataError("Remove is not supported.");
  }
View Full Code Here

   * @param value
   *            Not used.
   */
  @Override
  public void add(final int index, final double value) {
    throw new MLDataError("Add is not supported for bipolar data.");
  }
View Full Code Here

  /**
   * Not supported.
   */
  @Override
  public void remove() {
    throw new MLDataError("Remove is not supported.");
  }
View Full Code Here

   */
  @Override
  public void add(final int index, final double value) {
    int i = findIndex(index);
    if( i==-1 ) {
      throw new MLDataError("Can't find sparse index: " + index);
    }
    this.data[index] += value;
  }
View Full Code Here

  /**
   * {@inheritDoc}
   */
  @Override
  public double[] getData() {
    throw new MLDataError("Can't directly access the data array of a SparseMLData object");
  }
View Full Code Here

   */
  @Override
  public double getData(final int index) {
    int i = findIndex(index);
    if( i==-1 ) {
      throw new MLDataError("Can't find sparse index: " + index);
    }
    return this.data[i];
  }
View Full Code Here

  /**
   * {@inheritDoc}
   */
  @Override
  public void setData(final double[] theData) {
    throw new MLDataError("Can't directly access the data array of a SparseMLData object");
  }
View Full Code Here

   */
  @Override
  public void setData(final int index, final double d) {
    int i = findIndex(index);
    if( i==-1 ) {
      throw new MLDataError("Can't find sparse index: " + index);
    }
    this.data[i] = d;
  }
View Full Code Here

TOP

Related Classes of org.encog.ml.data.MLDataError

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.