[no subject]

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


I was wondering why the convention set by matlab/octave of using a .operator
(ie .* for elementwise multiplication) was not used for the operations for
which it makes sense.

To me, using a slightly different operator is much cleaner/clearer than the
current "operator prefix" syntax:
C = A .* C;
instead of
C = A.cwise() * C;

Can someone shed some light on the rational behind this decision? ( I did
see in the sidenote in the tutorial that says "*Side* *note:* If you think
that the .cwise() syntax is too verbose for your own taste and prefer to
have non-conventional mathematical operators directly available, then feel
free to extend MatrixBase<http://eigen.tuxfamily.org/dox/classEigen_1_1MatrixBase.html>as
described
here<http://eigen.tuxfamily.org/dox/CustomizingEigen.html#ExtendingMatrixBase>
.."

In my mind, it would seem like having BOTH the verbose .cwise() and the
concise .* type operators for things like multiplication would make sense.

let me know!
thanks,
-=Abe

--0016e6d778befa14c2048ee761f2
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

First off, I just discovered eigen, and it seems like a very cool and usefu=
l project... Thanks for sharing all the hard work!<br><br>From what I&#39;v=
e seen so far, it looks like the API and syntax is quite nice, and clean wh=
ich is great! However, one area that seems somewhat less than ideal is the =
elementwise operations enabled by the .cwise() operator prefix.<br>

<br><br>I was wondering why the convention set by matlab/octave of using a =
..operator (ie .* for elementwise multiplication) was not used for the opera=
tions for which it makes sense.<br><br>To me, using a slightly different op=
erator is much cleaner/clearer than the current &quot;operator prefix&quot;=
 syntax:<br>

C =3D A .* C;<br>instead of<br>C =3D A.cwise() * C;<br><br>Can someone shed=
 some light on the rational behind this decision? ( I did see in the sideno=
te in the tutorial that says &quot;<span class=3D"note"><b>Side</b> <b>note=
:</b> If you think that the <code></code>.cwise()
 syntax is too verbose for your own taste and prefer to have=20
non-conventional mathematical operators directly available, then feel=20
free to extend <a class=3D"el" href=3D"http://eigen.tuxfamily.org/dox/class=
Eigen_1_1MatrixBase.html" title=3D"Base class for all matrices, vectors, an=
d expressions.">MatrixBase</a> as described <a class=3D"el" href=3D"http://=
eigen.tuxfamily.org/dox/CustomizingEigen.html#ExtendingMatrixBase">here</a>=
..&quot;<br>

<br>In my mind, it would seem like having BOTH the verbose .cwise() and the=
 concise .* type operators for things like multiplication would make sense.=
<br><br>let me know!<br>thanks,<br>-=3DAbe<br></span><br><br>

--0016e6d778befa14c2048ee761f2--



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