Timeline for More efficient way of counting the number of values within an interval?
Current License: CC BY-SA 4.0
17 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Sep 10 at 16:37 | comment | added | chux | @aries0152 1) Would the value 0.1 be in 2 ranges: "In range 0.05 to 0.1" , "In range 0.1 to 0.15", or just one (and which one)? 2) Does "10,000 random values between 0 and 1" include 0.0 and 1.0? | |
Sep 5 at 4:27 | history | edited | greybeard | CC BY-SA 4.0 |
put alternative code in block quote to emphasize *not tht original put up for review
|
Jan 11, 2014 at 2:51 | vote | accept | aries0152 | ||
Jan 10, 2014 at 14:56 | answer | added | izabera | timeline score: 1 | |
Jan 10, 2014 at 12:58 | history | edited | aries0152 | CC BY-SA 3.0 |
Updated code
|
Jan 10, 2014 at 12:53 | history | edited | aries0152 | CC BY-SA 3.0 |
Updated in response to ChrisWue
|
Jan 9, 2014 at 20:54 | history | edited | Jamal | CC BY-SA 3.0 |
deleted 15 characters in body; edited tags; edited title
|
Jan 9, 2014 at 20:33 | history | tweeted | twitter.com/#!/StackCodeReview/status/421379121147817984 | ||
Jan 9, 2014 at 19:19 | answer | added | 200_success | timeline score: 6 | |
Jan 9, 2014 at 19:14 | answer | added | ChrisWue | timeline score: 13 | |
Jan 9, 2014 at 18:24 | comment | added | Jamal |
Done. I've also added an example with std::map (which may be preferred), and I'll check it in case I've made any mistakes.
|
|
Jan 9, 2014 at 18:23 | answer | added | Jamal | timeline score: 4 | |
Jan 9, 2014 at 18:00 | comment | added | aries0152 | @Jamal A little more explanation would be lovely. :) | |
Jan 9, 2014 at 17:57 | comment | added | Jamal |
Like I said, consider an array to hold those values. Since there are 20 variables, your array will be of that size. You could call it something like ranges . If you need more explanation, I can put this into an answer.
|
|
Jan 9, 2014 at 17:54 | comment | added | aries0152 | @Jamal I used those letter to count the number of values within that range. | |
Jan 9, 2014 at 17:47 | comment | added | Jamal | What are your single-letter variables for? It looks like they should be in an array. You also shouldn't use a single letter for any variable, unless it's a loop counter. | |
Jan 9, 2014 at 17:34 | history | asked | aries0152 | CC BY-SA 3.0 |