Modify ↓
Opened 17 years ago
Closed 17 years ago
#964 closed Bug (No Bug)
_ArrayCombinations() not returning expected results.
| Reported by: | GEOSoft | Owned by: | |
|---|---|---|---|
| Milestone: | Component: | AutoIt | |
| Version: | 3.3.0.0 | Severity: | None |
| Keywords: | Cc: |
Description
This function skips a large amount of the combinations, because it apparently does not do a "look behind". In the code below it starts by missing 00 but that's not too serious. It does begin to get serious starting at the point where it jumps from 19 to 23. After that each decade is progressively worse. This would not be the expected result of a function with this name.
#include<array.au3> Dim $aArray[10] = [0,1, 2, 3, 4, 5, 6, 7, 8, 9] $aArrayCombo = _ArrayCombinations($aArray, 2) _ArrayDisplay($aArrayCombo)
This isn't urgent since I already have one that will return the desired results but I thought it best that you be aware of this.
Attachments (0)
Note:
See TracTickets
for help on using tickets.

From mathematical stand point there is no bug.
there must be 10!/(2! * (10-2)!) = 45 entries. Thoses entries does not have "order" neither "duplicate"