Examples of QuantError


Examples of org.encog.app.quant.QuantError

   * @param dt
   *            The date/time where the bar begins.
   */
  public final void beginBar(final Date dt) {
    if (this.tw == null) {
      throw new QuantError("Must open file first.");
    }

    if (this.line != null) {
      throw new QuantError("Must call end bar");
    }

    this.line = new StringBuilder();
    this.line.append(NumericDateUtil.date2Long(dt));
    this.line.append(this.format.getSeparator());
View Full Code Here

Examples of org.encog.app.quant.QuantError

  /**
   * Close the file.
   */
  public final void close() {
    if (this.tw == null) {
      throw new QuantError("Must open file first.");
    }
    this.tw.close();
  }
View Full Code Here

Examples of org.encog.app.quant.QuantError

  /**
   * End the current bar.
   */
  public final void endBar() {
    if (this.tw == null) {
      throw new QuantError("Must open file first.");
    }

    if (this.line == null) {
      throw new QuantError("Must call BeginBar first.");
    }

    if (this.headers && !this.columnsDefined) {
      writeHeaders();
    }
View Full Code Here

Examples of org.encog.app.quant.QuantError

    try {
      this.tw = new PrintWriter(new FileWriter(filename));
      this.format = theFormat;
      this.headers = theHeaders;
    } catch (final IOException e) {
      throw new QuantError(e);
    }
  }
View Full Code Here

Examples of org.encog.app.quant.QuantError

   * @param d
   *            The value to store.
   */
  public final void storeColumn(final String name, final double d) {
    if (this.line == null) {
      throw new QuantError("Must call BeginBar first.");
    }

    if (this.line.length() > 0) {
      this.line.append(this.format.getSeparator());
    }
View Full Code Here

Examples of org.encog.app.quant.QuantError

  /**
   * Write the headers.
   */
  private void writeHeaders() {
    if (this.tw == null) {
      throw new QuantError("Must open file first.");
    }

    final StringBuilder theLine = new StringBuilder();

    theLine.append(FileData.DATE);
View Full Code Here

Examples of org.encog.app.quant.QuantError

      break;
    case SingleField:
      resultIndex = (int) data[0];
      break;
    default:
      throw new QuantError("Unknown action: " + action);
    }

    return this.classes.get(resultIndex);
  }
View Full Code Here

Examples of org.encog.app.quant.QuantError

   */
  public final void init() {

    if (this.action == NormalizationAction.Equilateral) {
      if (this.classes.size() < Equilateral.MIN_EQ) {
        throw new QuantError(
            "There must be at least three classes "
            + "to make use of equilateral normalization.");
      }

      this.eq = new Equilateral(this.classes.size(), this.normalizedHigh,
View Full Code Here

Examples of org.encog.app.quant.QuantError

      final int low) {

    if ((theAction != NormalizationAction.Equilateral)
        && (theAction != NormalizationAction.OneOf)
        && (theAction != NormalizationAction.SingleField)) {
      throw new QuantError("Unsupported normalization type");
    }

    this.action = theAction;
    this.classes.clear();
    this.normalizedHigh = high;
View Full Code Here

Examples of org.encog.app.quant.QuantError

      final String[] cls,
      final double high, final double low) {
    if ((theAction != NormalizationAction.Equilateral)
        && (theAction != NormalizationAction.OneOf)
        && (theAction != NormalizationAction.SingleField)) {
      throw new QuantError("Unsupported normalization type");
    }

    this.action = theAction;
    this.classes.clear();
    this.normalizedHigh = high;
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.