MATLAB and Armadillo, hints on translating
You're doing a copy in most of those snippets: if it was possible to do without a copy, it could be faster. Libraries such as Boost often offer two version a specific function: one which copies and another one which modifies in place.
*i is enough, you don't need (*i):

*i = log(*i);

This code:

if ( _s.is_empty() ) 
    return true;
else
    return false;


can be written as:

return _s.is_empty();