Skip to content

fly_select() help says 'fewest photos'; the selection is greedy and not always minimal #106

Open

Description

@NewGraphEnvironment

If we do it: the reference page stops promising a minimum the algorithm does not guarantee. If we never do: a reader of ?fly_select keeps reading mode = "minimal" as the provably smallest set.

Problem

R/fly_select.R:3 and :12 say "minimal" picks "the fewest photos" to reach target coverage. The selection is greedy set cover (fly_select_minimal(), R/fly_select.R:160-205), which does not guarantee the minimum. fly#104's code-check round 2 built a counterexample and ran it through fly_select(): a 4 x 2 km AOI, two 2 km square photos that tile it exactly, and one 2.4 km square photo centred on it. It picks all 3 where the 2 alone give 100%. On the bundled data greedy matches a brute-force minimum at every target from 0.5 to 1.0, so the README's example still holds.

The README, DESCRIPTION and pkgdown text were changed to "a small set" in fly PR #105. The roxygen was outside that diff.

Task

  • Reword the two roxygen lines so they do not claim the minimum, e.g. "a small set of photos, adding at each step the one that covers the most new ground"
  • devtools::document()

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions