[][src]Function xwords::fill::is_viable_reuse

pub fn is_viable_reuse(
    candidate: &Crossword,
    word_boundaries: &[&WordBoundary],
    trie: &Trie,
    already_used: FxHashSet<u64>,
    is_viable_cache: &mut CachedIsViable
) -> (bool, FxHashSet<u64>)

Determines whether a given crossword puzzle is viable. This performs several checks to decide whether a partially complete crossword should be considered for further filling, or should be discarded.

already_used is reused across runs to avoid allocating and should be cleared between calls. Currently this method is fairly hot.

Viability checks include: (1) is there at least one valid word that matches this partial fill; (2) does this crossword include any repeated complete words.