freepooma-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Evaluator/ReductionEvaluator.h question


From: Richard Guenther
Subject: Evaluator/ReductionEvaluator.h question
Date: Tue, 18 Feb 2003 11:47:09 +0100 (CET)

Hi!

Why is the result of ReductionEvaluator<>::evaluate() initialized
to Expr.read(0) and op never applied to it? This seems to be wrong,
f.i. if the operation is

 void op(double &res, double val)
 {
   double tmp = std::sqrt(val);
   if (tmp > res)
      res = tmp;
 }

It seems to be more natural to just use the "current" value of ret
for initialization of answer, so an appropriate starting value can
be provided by the users.

Was there any reason in the current implementation?

Thanks for clarifying,

Richard.

--
Richard Guenther <address@hidden>
WWW: http://www.tat.physik.uni-tuebingen.de/~rguenth/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]