bayehem/rsem/detonate-1.11/ref-eval/ref-eval-estimate-true-assembly.cpp
int find_and_normalize(int u, std::vector<ContigStruct>& contigs)
{
  // Remember the given contig.
  int x = u;
  // Set u as the root, i.e., as the first contig in the scaffold.
  u = find(u, contigs);
  // Go from the given contig toward the root, and for each contig
  // encountered, set the root as its parent.
  while (contigs[x].parent != u) {
    int tmp = contigs[x].parent;
    contigs[x].parent = u;
    x = tmp;
  }
  // Return the root.
  return u;
}
// Returns the root of the scaffold involving u, and updates all the contigs
// between u and the root to point at the root as their parent.
Returns the root of the scaffold involving u, and updates all the contigs
between u and the root to point at the root as their parent.
Returns the root of the scaffold involving u and updates all the contigs between u and the root to point at the root as their parent .
int find_and_normalize(int u, std::vector<ContigStruct>& contigs)
{
  int x = u;
  u = find(u, contigs);
  while (contigs[x].parent != u) {
    int tmp = contigs[x].parent;
    contigs[x].parent = u;
    x = tmp;
  }
  return u;
}
int find_and_normalize ( int u , std :: vector < ContigStruct > & contigs ) { int x = u ; u = find ( u , contigs ) ; while ( contigs [ x ] . parent != u ) { int tmp = contigs [ x ] . parent ; contigs [ x ] . parent = u ; x = tmp ; } return u ; }
Returns the root of the scaffold involving u, and updates all the contigs
between u and the root to point at the root as their parent.
Returns the root of the scaffold involving u and updates all the contigs between u and the root to point at the root as their parent .
// Remember the given contig. // Set u as the root, i.e., as the first contig in the scaffold. // Go from the given contig toward the root, and for each contig // encountered, set the root as its parent. // Return the root.