[Dune] arithmetic operators for FieldVector<K,1>
Carsten Graeser
graeser at math.fu-berlin.de
Mon Oct 23 15:23:44 CEST 2006
Hello,
are explicit overloads for arithmetic operator in FieldVector<K,1>
necessary ? Having 'operator K' and 'operator K () const' these
operators are overloaded ambiguously preventing the simple use
double a = x[i] + 1.0;
double b = x[i] - 1.0;
double c = x[i] * 1.0;
where x is a BlockVector< FieldVector<double,1> >. So one has to write
double c = -1.0 + T[i];
Shouldn't 'operator K' and 'operator K () const' be enough since the
overloaded arithmetic operators only refer to the operators for K ?
Carsten
--
----------------------------------------------------------------------
Carsten Gräser
Freie Universität Berlin
FB Mathematik und Informatik (WE II)
Arnimallee 2-6
14195 Berlin, Germany
office: +49-30 / 838-75349
fax: +49-30 / 838-54977
email: graeser at math.fu-berlin.de
----------------------------------------------------------------------
More information about the Dune
mailing list