| | | 1 | | namespace Itinero.Network.Search.Reachability; |
| | | 2 | | |
| | | 3 | | /// <summary> |
| | | 4 | | /// How much network has to be found before a candidate counts as connected, and how much work |
| | | 5 | | /// may be spent looking. |
| | | 6 | | /// </summary> |
| | | 7 | | /// <remarks> |
| | | 8 | | /// The threshold is the judgement and the analogue of MaxIslandSize; the ceiling is the work |
| | | 9 | | /// limit, and only bites where the threshold cannot end a search on its own. |
| | | 10 | | /// </remarks> |
| | | 11 | | /// <remarks> |
| | | 12 | | /// Counted in expanded states rather than edges, and an edge has two of those, so a comparable |
| | | 13 | | /// threshold is roughly twice the MaxIslandSize value. |
| | | 14 | | /// </remarks> |
| | | 15 | | public readonly record struct ReachabilityBounds |
| | | 16 | | { |
| | | 17 | | /// <summary> |
| | | 18 | | /// Creates bounds. |
| | | 19 | | /// </summary> |
| | | 20 | | /// <param name="threshold">States that count as connected.</param> |
| | | 21 | | /// <param name="ceiling">States that may be spent before giving up on the question.</param> |
| | | 22 | | public ReachabilityBounds(int threshold) |
| | 30 | 23 | | { |
| | 30 | 24 | | this.Threshold = threshold; |
| | 30 | 25 | | } |
| | | 26 | | |
| | | 27 | | /// <summary> |
| | | 28 | | /// How much network has to be reached before a candidate counts as connected. |
| | | 29 | | /// </summary> |
| | 40 | 30 | | public int Threshold { get; init; } |
| | | 31 | | |
| | | 32 | | } |