loop

SamsBnB.loop(top_results, top_scores)[source]

Loops through the branch-and-bound algorithm keeping topn results.

Parameters

top_resultslist(node)

A list of initial optimal node guesses. Sorted by top_scores (lowest first).

top_scoresnp.ndarray(1d)

The corresponding scores, sorted lowest first.

Returns

top_resultslist(node)

A list of optimal nodes. Sorted by top_scores (lowest first).

top_scoresnp.ndarray(1d)

The corresponding scores, sorted lowest first.