0

For example, you call something like permutations([1,2,3,4],2) or combinations([1,2,3,4],2) and get list of permutations/combinations like [(1, 2), (1, 3), (1, 4), (2, 3), (2, 4), ...]. Is it possible using exactly OR-Tools?

  • 1
    Yes. But the c++ stdlib does it for you. – Laurent Perron Feb 07 '23 at 09:19
  • 1
    Or c#. This was my answer to a similar question https://stackoverflow.com/a/66125489/7424038. It would have to be slightly modified for your use, or you just pass a List containing two instances of your list [1,2,3,4], although it would then consider (1, 2) and (2, 1) to be separate permutations and would also return (1, 1) etc. – Christopher Hamkins Feb 07 '23 at 15:24

0 Answers0