Difference between revisions of "830 - Haplotyper::SetupPrior()"

From Genome Analysis Wiki
Jump to navigationJump to search
(Created page with "<source code="cpp"> void Haplotyper::SetupPrior(float * matrix) { float prior = 1.0 / (states * states); for (int i = 0; i < states; i++) { for (int j = ...")
(No difference)

Revision as of 14:56, 13 September 2013

void Haplotyper::SetupPrior(float * matrix)
   {
   float prior = 1.0 / (states * states);

   for (int i = 0; i < states; i++)
      {
      for (int j = 0; j < i; j++)
         {
         *matrix = 2.0 * prior;
         matrix++;
         }
      *matrix = prior;
      matrix++;
      }
   }