com.linkedin.dagli.transformer.Value6FromTuple Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of core Show documentation
Show all versions of core Show documentation
DAG-oriented machine learning framework for bug-resistant, readable, efficient, maintainable and trivially deployable models in Java and other JVM languages
// AUTOGENERATED CODE. DO NOT MODIFY DIRECTLY! Instead, please modify the transformer/ValueXFromTuple.ftl file.
// See the README in the module's src/template directory for details.
package com.linkedin.dagli.transformer;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import com.linkedin.dagli.annotation.equality.ValueEquality;
import com.linkedin.dagli.producer.Producer;
import com.linkedin.dagli.reducer.InverseClassReducer;
import com.linkedin.dagli.reducer.Reducer;
import com.linkedin.dagli.tuple.TupleValue6;
/**
* Transformer that extracts the seventh element from a tuple.
*/
@ValueEquality
public class Value6FromTuple extends
AbstractPreparedTransformer1WithInput, G, Value6FromTuple> {
private static final long serialVersionUID = 1;
private static final List REDUCERS = Collections.singletonList(new InverseClassReducer(6,
Tupled7.class, Tupled8.class, Tupled9.class, Tupled10.class));
/**
* Creates a new instance that will extract elements from the provided input tuple.
*
* @param input the producer providing tuples whose seventh element will be extracted
*/
public Value6FromTuple(Producer extends TupleValue6 extends G>> input) {
super(input);
}
@Override
protected Collection extends Reducer super Value6FromTuple>> getGraphReducers() {
return REDUCERS;
}
@Override
public G apply(TupleValue6 extends G> value) {
return value.get6();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy