Any help pls.
If I store values for horses in a race what would be the correct way to rank the SV’s in order to use a particular Rank as a bet condition ?
How to Rank SV’s
If you want to rank to find the lowest or highest that is possible. Take a nominal high figure, say 10,000. Then compare the first SV to it. If its lower than 10k assign that SV as "Lowest", then compare your next SV to "Lowest". If lower, then assign that to "Lowest". Rinse and repeat until you have compared all your SV's. The SV at "Lowest" will be the one you want. Converse for the highest.
Middle rank is a little more problematic
Middle rank is a little more problematic
middle rank is cumbersome BUT can be done if using a RATIO based off of both TOP value and bottom VALUE. so you do the loop as you mention to get those value, THEN, you do a 2nd loop thro all and do the following:sniffer66 wrote: ↑Wed Sep 09, 2020 9:13 amIf you want to rank to find the lowest or highest that is possible. Take a nominal high figure, say 10,000. Then compare the first SV to it. If its lower than 10k assign that SV as "Lowest", then compare your next SV to "Lowest". If lower, then assign that to "Lowest". Rinse and repeat until you have compared all your SV's. The SV at "Lowest" will be the one you want. Converse for the highest.
Middle rank is a little more problematic
avgMidValue = currentSv-( (topSv+bottomSv)/2) [then compare each looking for MIN value in that loop]
go thro all and you should get a MIN value (close to 0) for that also -that will (in theory) be your MID.
untested and might be a mind-logic fck up
Skillsjimibt wrote: ↑Wed Sep 09, 2020 9:36 ammiddle rank is cumbersome BUT can be done if using a RATIO based off of both TOP value and bottom VALUE. so you do the loop as you mention to get those value, THEN, you do a 2nd loop thro all and do the following:sniffer66 wrote: ↑Wed Sep 09, 2020 9:13 amIf you want to rank to find the lowest or highest that is possible. Take a nominal high figure, say 10,000. Then compare the first SV to it. If its lower than 10k assign that SV as "Lowest", then compare your next SV to "Lowest". If lower, then assign that to "Lowest". Rinse and repeat until you have compared all your SV's. The SV at "Lowest" will be the one you want. Converse for the highest.
Middle rank is a little more problematic
avgMidValue = currentSv-( (topSv+bottomSv)/2) [then compare each looking for MIN value in that loop]
go thro all and you should get a MIN value (close to 0) for that also -that will (in theory) be your MID.
untested and might be a mind-logic fck up
- firlandsfarm
- Posts: 2720
- Joined: Sat May 03, 2014 8:20 am
I've not found a way other than what I would expect to be a very complicated bubble sort set of rules! But having just read and developing Sniffer's suggestion ...
… I'm thinking you could do that for "Highest1"/"Lowest1" and then re-do it excluding Highest1/Lowest1 to find "Highest2"/Lowest2 and keep repeating down to whatever depth you want. I think I'll try that when I get an idle moment.sniffer66 wrote: ↑Wed Sep 09, 2020 9:13 amIf you want to rank to find the lowest or highest that is possible. Take a nominal high figure, say 10,000. Then compare the first SV to it. If its lower than 10k assign that SV as "Lowest", then compare your next SV to "Lowest". If lower, then assign that to "Lowest". Rinse and repeat until you have compared all your SV's. The SV at "Lowest" will be the one you want. Converse for the highest.