Example #1
0
    void add_to(view<T> out) const
    {
        if (out.size() != (size_t)in_.rows())
            throw size_mismatch();

        typename eigen<T>::col_map out_map(out.data(), out.size());
        out_map += in_;
    }
Example #2
0
 void add_to(view<T> out) const
 {
     if (out.size() != in_.size())
         throw size_mismatch();
     for (size_t i = 0; i != in_.size(); ++i)
         out.data()[i] += in_[i];
 }
Example #3
0
 void add_to(view<T> out) const
 {
     if (out.size() != 1)
         throw size_mismatch();
     out.data()[0] += in_;
 }