Re: [eigen] On a flexible API for submatrices, slicing, indexing, masking, etc.

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


Dear Yuanchen Zhu,


Am 22.12.2016 um 17:29 schrieb Yuanchen Zhu:

Regarding API naming and convention, I also much prefer a matlab/STL like syntax of normalized(v) instead of v.normalized(), as well as writing cwise_max instead of cwiseMax, so I also have those aliases in my plugin. But I guess
those are for another thread.


The syntax like v.normalized() allows to chain expressions, and speaking for myself,
I find it very convenient to write long one-liner and I rather prefer

W.row(x).segment(0, M-1).normalize()

compared to

  normalize(segment( row( W, x)), 0, M-1))

where one would always mess with the number of brackets.

Best regards,
Peter



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/