Re: [eigen] HELP:minimum value

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


no need to sort the vector to extract the minimum coefficient.
minCoeff() simply loop trough the vector:

Scalar min_val = v(0);
for(int i=1;i<v.size();++i)
  min_val = min(min_val, v(i));

The actual Eigen's code is more complicated and more optimized (loop
peeling, loop unrollling, vectorization). You can see the structure of
the loops in the Eigen/src/Core/Redux.h file.

On Thu, Jun 28, 2012 at 7:25 AM, Gaurav Gupta <gaurav71531@xxxxxxxxx> wrote:
> i have constructed a function to compute minimum value in a vector, applying
> sorting approach. But my
> function is taking much more time as compared to inbuilt minCoeff()
> operation, am I going wrong, How can
> I see the code for minCoeff() operation.



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