830 - Haplotyper::SetupPrior()

From Genome Analysis Wiki
Revision as of 14:56, 13 September 2013 by Goncalo (talk | contribs) (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 = ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
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++;
      }
   }