ns-allinone-2.35/tora/tora_dest.cc
TORANeighbor*
TORADest::nb_find_min_height(int R)
{
	TORANeighbor *tn = nblist.lh_first;
	TORANeighbor *tn_min = 0;

	for( ; tn; tn = tn->link.le_next) {
		if(tn->height.r == R) {
			if(tn_min == 0 ||
                           tn_min->height.compare(&tn->height) < 0)
				tn_min = tn;
		}
	}
	return tn_min;
}
/*
 *  Find a neighbor of minimum height, subject to the constraint
 *  that height.r == R.
 */
Find a neighbor of minimum height, subject to the constraint
that height.r == R.
Find a neighbor of minimum height subject to the constraint that height . r == R .
TORANeighbor*
TORADest::nb_find_min_height(int R)
{
	TORANeighbor *tn = nblist.lh_first;
	TORANeighbor *tn_min = 0;
	for( ; tn; tn = tn->link.le_next) {
		if(tn->height.r == R) {
			if(tn_min == 0 ||
                           tn_min->height.compare(&tn->height) < 0)
				tn_min = tn;
		}
	}
	return tn_min;
}
TORANeighbor * TORADest :: nb_find_min_height ( int R ) { TORANeighbor * tn = nblist . lh_first ; TORANeighbor * tn_min = 0 ; for ( ; tn ; tn = tn -> link . le_next ) { if ( tn -> height . r == R ) { if ( tn_min == 0 || tn_min -> height . compare ( & tn -> height ) < 0 ) tn_min = tn ; } } return tn_min ; }
Find a neighbor of minimum height, subject to the constraint
  that height.r == R.
Find a neighbor of minimum height subject to the constraint that height . r == R .