Skip to content

Multiple schedule generation never generates all valid combinations #7

@neallithic64

Description

@neallithic64

Given the current recursive implementation of the generateMultiSched() method (adapted from Tsirunyan), all possible schedules are not generated. Output ArrayList (found in field schedList) contains copies of the first possible combination (number of copies is the product of the sizes of each ArrayList of course offerings).

Testing and debugging reveals that in each recursive call, contents of the parameter curr are shared.

  • Intended behaviour is for separate ArrayLists generated to be the said combinations
  • However, while this implementation doesn't work, the original implementation works
  • This may imply that use of ArrayLists is the cause of the problem

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions