Exemplo n.º 1
0
  /**
   * Create a SQLNeuralDataSet based on the specified connection. This connection WILL NOT be closed
   * when the close method is called.
   *
   * @param theConnection The connection to use.
   * @param theSQL The SQL command to execute.
   * @param theInputSize The size of the input data.
   * @param theIdealSize The size of the ideal data.
   */
  public SQLNeuralDataSet(
      final Connection theConnection,
      final String theSQL,
      final int theInputSize,
      final int theIdealSize) {

    DataSetCODEC codec = new SQLCODEC(theConnection, theSQL, theInputSize, theIdealSize);
    MemoryDataLoader load = new MemoryDataLoader(codec);
    load.setResult(this);
    load.external2Memory();
  }
Exemplo n.º 2
0
  /**
   * Construct a SQL dataset. A connection will be opened, this connection will be closed when the
   * close method is called.
   *
   * @param sql The SQL command to execute.
   * @param inputSize The size of the input data.
   * @param idealSize The size of the ideal data.
   * @param driver The driver to use.
   * @param url The database connection URL.
   * @param uid The database user id.
   * @param pwd The database password.
   */
  public SQLNeuralDataSet(
      final String sql,
      final int inputSize,
      final int idealSize,
      final String driver,
      final String url,
      final String uid,
      final String pwd) {

    DataSetCODEC codec = new SQLCODEC(sql, inputSize, idealSize, driver, url, uid, pwd);
    MemoryDataLoader load = new MemoryDataLoader(codec);
    load.setResult(this);
    load.external2Memory();
  }