EDOBE XDOM PMML Manual de usuario Pagina 30

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 98
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 29
30
* is executed.
*/
public void execute(CNKProcJavaTransform proc) {
for (int i=0; i<getNumInputs(); i++) {
proc.copyData(i, 0, 0, i, 0, 0,
proc.getChunkInputRows(i),
getInputMetaData(i).getNumColumns());
}
}
}
This example file does not start with a package statement, so the
FirstCopyEngineNode class will be part of the unnamed default
package. We import the files in the
com.insightful.miner and
com.insightful.cnkjava packages. We could be more selective
regarding our imports and only import the classes that we actually
use.
The
FirstCopyEngineNode class will use a Java transform, so it is
defined to implement
CNKProcJavaTransformExec. In procCreate()
we create a
CNKProcJavaTransform object that will call the
FirstCopyEngineNode.execute() method once for each block of data.
In
calculateOutputMetaData() we copy the metadata for each input
to the corresponding output, since the names and types of the output
columns are the same as the corresponding input.
In
execute() we loop over the inputs and use the
CNKProcJavaTransform method copyData() to copy the specified
range of rows. The arguments for this function are:
public void copyData(int outputNum, int outputFirstCol,
int outputFirstRow, int inputNum, int inputFirstCol,
int inputFirstRow, int numRows, int numColumns)
For each input, we get the number of rows in the current chunk from
the
CNKProcJavaTransform and the number of columns from the
input’s
XTMetaData.
Vista de pagina 29
1 2 ... 25 26 27 28 29 30 31 32 33 34 35 ... 97 98

Comentarios a estos manuales

Sin comentarios