Re: Function nchoosek for combinations

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Fri Mar 21 2014 - 15:48:10 MDT

Hi Gabriel,

This is indeed the appropriate place for this kind of thing.

The functions have been added to the planned release for NCL V6.2.0.

They will be available to users by loading:

load "$NCARG_ROOT/lib/ncarg/nclscripts/contrib/nchoosek.ncl"

Thanks for the contribution.

--Mary

On Mar 18, 2014, at 7:30 AM, Gabriel Medeiros <gabriel.abrahao@ufv.br> wrote:

> Hello,
>
> I recently came across a problem while writing a bootstrap script that involved find all the k combinations from a n sized set. I ended up writing a function for it, based on Martin Broadhurst's C code, that can be found at: http://www.martinbroadhurst.com/.
>
> It worked fairly well for my problem, so i thought on sharing it and maybe saving some work for someone. Sorry if this isn't the place for it.
>
> The usage is pretty much like MatLab's nchoosek function, and is explained on the header. It uses another function, called nextcombination, that is on the same file.
>
> Thanks, and again, sorry if this is not the for this.
>
> --
> Gabriel Medeiros Abrahão
> Research Group on Atmosphere-Biosphere Interactions - DEA/UFV
> <nchoosek.ncl>_______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Mar 21 15:48:21 2014

This archive was generated by hypermail 2.1.8 : Fri Mar 21 2014 - 15:49:21 MDT