int  recallBestTree (bestlist *bt, int rank, tree *tr)
{ 
  if (rank < 1)  rank = 1;
  if (rank > bt->nvalid)  rank = bt->nvalid;
  if (rank > 0)  if (! restoreTree(bt->byScore[rank], tr)) return FALSE;
  return  rank;
}
Beispiel #2
0
/** @brief Restore the best tree from \a bestlist structure
    
    Restore the \a rank-th best tree from the \a bestlist structure \a bt.

    @param bt
      The \a bestlist structure containing the stored best trees

    @param rank
      The rank (by score) of the tree we want to retrieve

    @param tr
      PLL instance

    @param pr
      List of partitions

    @return
      Index (rank) of restored topology in \a bestlist
*/
int  recallBestTree (bestlist *bt, int rank, pllInstance *tr, partitionList *pr)
{ 
  if (rank < 1)  rank = 1;
  if (rank > bt->nvalid)  rank = bt->nvalid;
  if (rank > 0)  if (! restoreTree(bt->byScore[rank], tr, pr)) return PLL_FALSE;
  return  rank;
}