## Re: [Vxl-users] Location of min_value in a matrix?

 Re: [Vxl-users] Location of min_value in a matrix? From: Gastón Araguás - 2009-03-30 23:32:11 ```2009/3/30 Miguel A. Figueroa-Villanueva : > On Sun, Mar 29, 2009 at 11:02 AM, Peter Vanroose wrote: >> >>> Or you can open a ticket in trac and attach the patch there >>> for posterity. >> >> OK, good idea. I'll (try to) do that. Good exercise for me to start using trac ... >> >> --      Peter. > > Ok, since we're all learning here :) I just added a comment to your ticket: > > https://apps.sourceforge.net/trac/vxl/ticket/20 for anonymous users it should be http://apps.sourceforge.net/trac/vxl/ticket/20 amazing work on vxl theses days, thank you all!! -- Gastón Araguás ______________________________________________________ CIII - Centro de Investigación en Informática para la Ingeniería Univ. Tecnológica Nacional Facultad Regional Córdoba. Argentina ```

 [Vxl-users] Location of min_value in a matrix? From: David Doria - 2009-03-28 20:53:05 Attachments: Message as HTML ```There is a min_value() function for vnl_matrix, but is there a way to get the location of that min value? An exhaustive search doesn't sound too nice on a 30,000 x 30,000 matrix! Thanks, David ```
 Re: [Vxl-users] Location of min_value in a matrix? From: Peter Vanroose - 2009-03-29 11:12:06 ```> There is a min_value() function for vnl_matrix, but is there > a way to get the location of that min value? > An exhaustive search doesn't sound too nice on a 30,000 x 30,000 matrix! You'll have to run through all values anyhow to obtain the arg_min. But it would indeed be nice to have a "built-in" method in vnl_matrix to do this; moreover, that method can then be optimized for speed, just like min_value() is. I'm currently putting in two functions arg_min() and arg_max() into all vector and matrix classes in vnl, next to min_value() and max_value(), which should do what you ask for. This just needs a little more of testing before I put it in the svn repository. There's of course no need for a combined min_value+arg_min function since, once you have the arg_min, it's straightforward (and optimal in terms of performance) to obtain the corresponding min_value from it. In case of ties, my implementation returns the smallest index with the min (or max) value. I believe this is the standard convention. I can post the svn diffs here (or mail them privately) if someone without access to the vxl repository wants to apply just this patch directly to his working copy of vxl. -- Peter. __________________________________________________________ Går det långsamt? Skaffa dig en snabbare bredbandsuppkoppling. Sök och jämför priser hos Kelkoo. http://www.kelkoo.se/c-100015813-bredband.html?partnerId=96914325 ```
 Re: [Vxl-users] Location of min_value in a matrix? From: Miguel A. Figueroa-Villanueva - 2009-03-29 14:07:37 ```On Sun, Mar 29, 2009 at 7:12 AM, Peter Vanroose wrote: > >> There is a min_value() function for vnl_matrix, but is there >> a way to get the location of that min value? >> An exhaustive search doesn't sound too nice on a 30,000 x 30,000 matrix! > > You'll have to run through all values anyhow to obtain the arg_min. > But it would indeed be nice to have a "built-in" method in vnl_matrix to do this; moreover, that method can then be optimized for speed, just like min_value() is. > > I'm currently putting in two functions arg_min() and arg_max() into all vector and matrix classes in vnl, next to min_value() and max_value(), which should do what you ask for. This just needs a little more of testing before I put it in the svn repository. > > There's of course no need for a combined min_value+arg_min function since, once you have the arg_min, it's straightforward (and optimal in terms of performance) to obtain the corresponding min_value from it. > > In case of ties, my implementation returns the smallest index with the min (or max) value. I believe this is the standard convention. > > I can post the svn diffs here (or mail them privately) if someone without access to the vxl repository wants to apply just this patch directly to his working copy of vxl. > > --      Peter. Or you can open a ticket in trac and attach the patch there for posterity. --Miguel ```
 Re: [Vxl-users] Location of min_value in a matrix? From: Peter Vanroose - 2009-03-29 15:02:12 ```> Or you can open a ticket in trac and attach the patch there > for posterity. OK, good idea. I'll (try to) do that. Good exercise for me to start using trac ... -- Peter. -------------------------------------------------------------- __________________________________________________________ Låna pengar utan säkerhet. Jämför vilkor online hos Kelkoo. http://www.kelkoo.se/c-100390123-lan-utan-sakerhet.html?partnerId=96915014 ```
 Re: [Vxl-users] Location of min_value in a matrix? From: Miguel A. Figueroa-Villanueva - 2009-03-30 23:18:17 ```On Sun, Mar 29, 2009 at 11:02 AM, Peter Vanroose wrote: > >> Or you can open a ticket in trac and attach the patch there >> for posterity. > > OK, good idea. I'll (try to) do that. Good exercise for me to start using trac ... > > --      Peter. Ok, since we're all learning here :) I just added a comment to your ticket: https://apps.sourceforge.net/trac/vxl/ticket/20 It so happens that it wasn't necessary to attach the patch. You can rather just add a reference to the revision in brackets (i.e., [24567]) and it will link to the changeset in the repository viewer. At the bottom of that page you can download the unified diff! This trac thing is pretty nice indeed. --Miguel ```
 Re: [Vxl-users] Location of min_value in a matrix? From: Gastón Araguás - 2009-03-30 23:32:11 ```2009/3/30 Miguel A. Figueroa-Villanueva : > On Sun, Mar 29, 2009 at 11:02 AM, Peter Vanroose wrote: >> >>> Or you can open a ticket in trac and attach the patch there >>> for posterity. >> >> OK, good idea. I'll (try to) do that. Good exercise for me to start using trac ... >> >> --      Peter. > > Ok, since we're all learning here :) I just added a comment to your ticket: > > https://apps.sourceforge.net/trac/vxl/ticket/20 for anonymous users it should be http://apps.sourceforge.net/trac/vxl/ticket/20 amazing work on vxl theses days, thank you all!! -- Gastón Araguás ______________________________________________________ CIII - Centro de Investigación en Informática para la Ingeniería Univ. Tecnológica Nacional Facultad Regional Córdoba. Argentina ```