32 #ifndef SHARK_MODELS_NORMALIZER_H 33 #define SHARK_MODELS_NORMALIZER_H 56 template <
class VectorType = RealVector>
77 {
return "Normalizer"; }
81 return boost::shared_ptr<State>(
new EmptyState());
117 std::size_t dim =
m_A.size();
118 noalias(
m_A) = subrange(newParameters,0,dim);
119 noalias(
m_b) = subrange(newParameters, dim, newParameters.size());
124 return m_A.size() +
m_b.size();
135 m_A.resize(dimension);
142 void eval(BatchInputType
const& input, BatchOutputType& output)
const{
144 output.resize(input.size1(), input.size2());
145 noalias(output) = input * repeat(
m_A,input.size1());
147 noalias(output) += repeat(
m_b,input.size1());
152 void eval(BatchInputType
const& input, BatchOutputType& output,
State& state)
const{