20 #ifndef __TPIE_PIPELINING_NUMERIC_H__
21 #define __TPIE_PIPELINING_NUMERIC_H__
24 #include <tpie/pipelining/node.h>
25 #include <tpie/pipelining/pipe_base.h>
26 #include <tpie/pipelining/factory_helpers.h>
30 namespace pipelining {
34 template <
typename dest_t>
37 typedef typename dest_t::item_type item_type;
39 inline linear_t(
const dest_t & dest, item_type factor, item_type term) : dest(dest), factor(factor), term(term) {
41 set_name(
"Linear transform", PRIORITY_INSIGNIFICANT);
43 inline void push(
const item_type & item) {
44 dest.push(item*factor+term);
56 linear(T factor, T term) {
void add_push_destination(const node_token &dest)
Called by implementers to declare a push destination.
Node factory for 2-argument generator.
void set_name(const std::string &name, priority_type priority=PRIORITY_USER)
Set this node's name.
A pipe_middle class pushes input down the pipeline.