Re: Finding maximum of an array
- From: "Richard Lavoie" <somone@xxxxxxxxxxxxx>
- Date: Sat, 26 Apr 2008 12:57:08 -0400
Dennis,
All interesting suggestions. Eric suggestion is interesting, although
increasing the value by 1 to be able to perform integer comparisons on
floats would require important changes to other parts of the program and
rather than making such a change, it would probably be more convenient to
transform the single values into integer values (with some lost of
precisions that may not be critical).
My own test suggest that we would probably increase the speed by 30%, which
is not bad.
Another suggestion that I find especially interesting is the one made by
rbwinston of creating an index of maximum values (not minimum) for rows or
columns. This seems to have have the potential of increasing the speed not
only by 30% but by 1000% or more. If I understand it correctly, it would
probably transform the computing requirement from a matrix of dimension n by
n from a (n^n / 2) to a (2 * n).
I will now take some times to assess the transformation being done on the
matrix once the highest cell is found and corresponding row and column are
deleted to see whether it can be implemented easily.
Richard
"Dennis" <marianndkc@xxxxxxxxxxxxxxx> wrote in message
news:481335b4@xxxxxxxxxxxxxxxxxxxxxxxxx
Hi Richard Lavoie
Did any of the suggestions for algorithm improval pay of?
If not then we could try optimize the code.
Best regards
Dennis Kjaer Christensen
.
- Follow-Ups:
- Re: Finding maximum of an array
- From: Dennis
- Re: Finding maximum of an array
- From: John Herbster
- Re: Finding maximum of an array
- References:
- Finding maximum of an array
- From: Richard Lavoie
- Re: Finding maximum of an array
- From: John Herbster
- Re: Finding maximum of an array
- From: Richard Lavoie
- Re: Finding maximum of an array
- From: Dennis
- Finding maximum of an array
- Prev by Date: Re: Finding maximum of an array
- Next by Date: Re: Finding maximum of an array
- Previous by thread: Re: Finding maximum of an array
- Next by thread: Re: Finding maximum of an array
- Index(es):