headmyshoulder / odeint-v2

odeint - solving ordinary differential equations in c++ v2
http://headmyshoulder.github.com/odeint-v2/
Other
340 stars 101 forks source link

Return type of norm_inf for a matrix #131

Closed alankelly closed 10 years ago

alankelly commented 10 years ago

Hi,

The mathematical definition for an infinity norm of a matrix is maximum row sum http://mathworld.wolfram.com/MaximumAbsoluteRowSumNorm.html

The Eigen vector space norm infinity function for a matrix

return m.template lpNormEigen::Infinity();

returns the maximum absolute value http://eigen.tuxfamily.org/dox/group__TutorialReductionsVisitorsBroadcasting.html

I'm currently implementing an external module for NT2 https://github.com/MetaScale/nt2 for odeint and I'm unsure what the vector_space_norm_infinity function is required to return. Should I follow the Eigen example or the mathematical definition?

Thanks

mariomulansky commented 10 years ago

Hi alan, Great to hear that you are combining NT2 with odeint! As for the norm_inf: in the context of odes the most reasonable definition is the maximum absolute value, so you should go with the eigen example i'd say.

alankelly commented 10 years ago

Thanks