Exemplo n.º 1
0
  void applyUnary( const Elementwise::UnaryFunction<Real> &f ) {
    uint dimension  = std_vec_->size();
    for(uint i=0; i<dimension; ++i) {
      (*std_vec_)[i] = f.apply((*std_vec_)[i]);
    }

  }
void
MiniTensorVector<T, N>::
applyUnary(Elementwise::UnaryFunction<T> const & f)
{
  auto const
  dim = vector_.get_dimension();

  for(minitensor::Index i{0}; i < dim; ++i) {
    vector_(i) = f.apply(vector_(i));
  }
}