private static void multinomial_pdf_test() //****************************************************************************80 // // Purpose: // // MULTINOMIAL_PDF_TEST tests MULTINOMIAL_PDF; // // Licensing: // // This code is distributed under the GNU LGPL license. // // Modified: // // 16 April 2016 // // Author: // // John Burkardt // { const int B = 3; double[] c = { 0.1, 0.5, 0.4 } ; int[] x = { 0, 2, 3 } ; Console.WriteLine(""); Console.WriteLine("MULTINOMIAL_PDF_TEST"); Console.WriteLine(" MULTINOMIAL_PDF evaluates the Multinomial PDF;"); const int a = 5; Console.WriteLine(""); Console.WriteLine(" PDF parameter A = " + a + ""); Console.WriteLine(" PDF parameter B = " + B + ""); typeMethods.r8vec_print(B, c, " PDF parameter C:"); if (!Multinomial.multinomial_check(a, B, c)) { Console.WriteLine(""); Console.WriteLine("MULTINOMIAL_PDF_TEST - Fatal error!"); Console.WriteLine(" The parameters are not legal."); return; } typeMethods.i4vec_print(B, x, " PDF argument X:"); double pdf = Multinomial.multinomial_pdf(x, a, B, c); Console.WriteLine(""); Console.WriteLine(" PDF value = " + pdf + ""); }