Examples of QuantError


Examples of org.encog.app.quant.QuantError

      }

      return tw;

    } catch (final IOException e) {
      throw new QuantError(e);
    }
  }
View Full Code Here

Examples of org.encog.app.quant.QuantError

      if (headers) {
        recordCount--;
      }
      setRecordCount(recordCount);
    } catch (final IOException ex) {
      throw new QuantError(ex);
    } finally {
      reportDone(true);
      if (reader != null) {
        try {
          reader.close();
        } catch (final IOException e) {
          throw new QuantError(e);
        }
      }
      setInputFilename(input);
      setExpectInputHeaders(headers);
      setInputFormat(format);
    }

    // now analyze columns
    ReadCSV csv = null;
    try {
      csv = new ReadCSV(input.toString(), headers, format);
      if (!csv.next()) {
        throw new QuantError("File is empty");
      }

      for (int i = 0; i < csv.getColumnCount(); i++) {
        String name;
View Full Code Here

Examples of org.encog.app.quant.QuantError

   */
  private void validate() {
    validateAnalyzed();

    if (this.targets.size() < 1) {
      throw new QuantError("There are no segregation targets.");
    }

    if (this.targets.size() < 2) {
      throw new QuantError(
          "There must be at least two segregation targets.");
    }

    int total = 0;
    for (final SegregateTargetPercent p : this.targets) {
      total += p.getPercent();
    }

    if (total != TOTAL_PCT) {
      throw new QuantError("Target percents must equal 100.");
    }
  }
View Full Code Here

Examples of org.encog.app.quant.QuantError

      }

      return tw;

    } catch (final IOException e) {
      throw new QuantError(e);
    }
  }
View Full Code Here

Examples of org.encog.app.quant.QuantError

   * @return Get the record count. File must have been analyzed first to read
   *         the record count.
   */
  public int getRecordCount() {
    if (!this.analyzed) {
      throw new QuantError("Must analyze file first.");
    }
    return this.recordCount;

  }
View Full Code Here

Examples of org.encog.app.quant.QuantError

      }

      return tw;

    } catch (final IOException e) {
      throw new QuantError(e);
    }
  }
View Full Code Here

Examples of org.encog.app.quant.QuantError

  /**
   * Validate that the file has been analyzed. Throw an error, if it has not.
   */
  public void validateAnalyzed() {
    if (!this.analyzed) {
      throw new QuantError("File must be analyzed first.");
    }
  }
View Full Code Here

Examples of org.encog.app.quant.QuantError

          NumberList.toList(getFormat(), line, output);
          tw.println(line);
        }
      }
    } catch (final IOException e) {
      throw new QuantError(e);
    } finally {
      reportDone(false);
      if (csv != null) {
        try {
          csv.close();
View Full Code Here

Examples of org.encog.app.quant.QuantError

        if (c3 != 0) {
          return c3;
        }
        break;
      default:
        throw new QuantError("Unknown sort method: "
            + t.getSortType());
      }
    }

    // failing all of this, they are equal
View Full Code Here

Examples of org.encog.app.quant.QuantError

      }
      reportDone(false);
      csv.close();
      tw.close();
    } catch (IOException ex) {
      throw new QuantError(ex);
    } finally {
      if( tw!=null ) {
        tw.close();
      }
    }
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.