public class SequenceTrimToLengthTransform extends Object implements Transform
Modifier and Type | Class and Description |
---|---|
static class |
SequenceTrimToLengthTransform.Mode
Mode.
|
Constructor and Description |
---|
SequenceTrimToLengthTransform(int maxLength,
SequenceTrimToLengthTransform.Mode mode,
List<Writable> pad) |
Modifier and Type | Method and Description |
---|---|
String |
columnName()
Returns a singular column name
this op is meant to run on
|
String[] |
columnNames()
Returns column names
this op is meant to run on
|
Schema |
getInputSchema()
Getter for input schema
|
List<Writable> |
map(List<Writable> writables)
Transform a writable
in to another writable
|
Object |
map(Object input)
Transform an object
in to another object
|
List<List<Writable>> |
mapSequence(List<List<Writable>> sequence)
Transform a sequence
|
Object |
mapSequence(Object sequence)
Transform a sequence
|
String |
outputColumnName()
The output column name
after the operation has been applied
|
String[] |
outputColumnNames()
The output column names
This will often be the same as the input
|
void |
setInputSchema(Schema inputSchema)
Set the input schema.
|
Schema |
transform(Schema inputSchema) |
public SequenceTrimToLengthTransform(int maxLength, SequenceTrimToLengthTransform.Mode mode, List<Writable> pad)
maxLength
- maximum sequence length. Must be positive.mode
- Mode - trim or trim/padpad
- Padding value. Only used with Mode.TRIM_OR_PAD. Must be equal in length to the number of columns (values per time step)public List<Writable> map(List<Writable> writables)
Transform
public List<List<Writable>> mapSequence(List<List<Writable>> sequence)
Transform
mapSequence
in interface Transform
public Object map(Object input)
Transform
public Object mapSequence(Object sequence)
Transform
mapSequence
in interface Transform
public void setInputSchema(Schema inputSchema)
ColumnOp
setInputSchema
in interface ColumnOp
public Schema getInputSchema()
ColumnOp
getInputSchema
in interface ColumnOp
public String outputColumnName()
ColumnOp
outputColumnName
in interface ColumnOp
public String[] outputColumnNames()
ColumnOp
outputColumnNames
in interface ColumnOp
public String[] columnNames()
ColumnOp
columnNames
in interface ColumnOp
public String columnName()
ColumnOp
columnName
in interface ColumnOp
Copyright © 2020. All rights reserved.