src/ResolvExpr/CandidateFinder.cpp
CandidateList findMinCost( const CandidateList & candidates ) {
		CandidateList out;
		Cost minCost = Cost::infinity;
		for ( const CandidateRef & r : candidates ) {
			if ( r->cost < minCost ) {
				minCost = r->cost;
				out.clear();
				out.emplace_back( r );
			} else if ( r->cost == minCost ) {
				out.emplace_back( r );
			}
		}
		return out;
	}
/// Returns a list of alternatives with the minimum cost in the given list
Returns a list of alternatives with the minimum cost in the given list
Returns a list of alternatives with the minimum cost in the given list
CandidateList findMinCost( const CandidateList & candidates ) {
		CandidateList out;
		Cost minCost = Cost::infinity;
		for ( const CandidateRef & r : candidates ) {
			if ( r->cost < minCost ) {
				minCost = r->cost;
				out.clear();
				out.emplace_back( r );
			} else if ( r->cost == minCost ) {
				out.emplace_back( r );
			}
		}
		return out;
	}
CandidateList findMinCost ( const CandidateList & candidates ) { CandidateList out ; Cost minCost = Cost :: infinity ; for ( const CandidateRef & r : candidates ) { if ( r -> cost < minCost ) { minCost = r -> cost ; out . clear ( ) ; out . emplace_back ( r ) ; } else if ( r -> cost == minCost ) { out . emplace_back ( r ) ; } } return out ; }
Returns a list of alternatives with the minimum cost in the given list
Returns a list of alternatives with the minimum cost in the given list