stirling_second_number
synopsis: INT stirling_second_number(OP n,k,result)
description:
computes the Stirling number of the second kind, i.e. the number of possibilities to fill n pieces into k boxes. The input must be two INTEGER objects n,k.bugs:
Very slow function, because it uses the scalar product of rows of the kostka table.example:
#include "def.h" #include "macro.h" main() { OP a,b,c; anfang(); a= callocobject(); b= callocobject(); c= callocobject(); scan(INTEGER,a); scan(INTEGER,b); stirling_second_number(a,b,c);println(c); freeall(a);freeall(b); freeall(c); ende(); }
Send comments or suggestions to:
symmetrica (at) symmetrica.de
this page was automatically generated on So Jan 4 10:35:24 CET 2009 on the machine btn6xf