octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #64365] Request implementation of functions "c


From: anonymous
Subject: [Octave-bug-tracker] [bug #64365] Request implementation of functions "combinations" and combntns
Date: Thu, 6 Jul 2023 02:53:38 -0400 (EDT)

Follow-up Comment #2, bug #64365 (project octave):

Nchoosek provides the same functionality as combnk.     

Simply change all instances of the function name combnk to nchoosek and no
need to change the arguments.
The ordering of the output may be different though.

Or you simply create a wrapper function
combntns  @(v,k)  nchoosek(v,k)


combinations will require a more complicated function depending on the use
cases or just easy (but slower) loops. 
Using perms and nchoosek for vectorization should not be too difficult if you
are interested in performance.


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?64365>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]