Modify

Opened 15 years ago

Closed 15 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)

Change History (1)

comment:1 Changed 15 years ago by Jpm

  • Resolution set to No Bug
  • Status changed from new to closed

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"

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The ticket will remain with no owner.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.