| | | 1 | | //======================================================================= |
| | | 2 | | // GridTraceIntervalReport.cs |
| | | 3 | | //======================================================================= |
| | | 4 | | // MIT License, Copyright (c) 2024-present David Oravsky (mrdav30) |
| | | 5 | | // See LICENSE file in the project root for full license information. |
| | | 6 | | //======================================================================= |
| | | 7 | | |
| | | 8 | | namespace GridForge.Grids; |
| | | 9 | | |
| | | 10 | | /// <summary> |
| | | 11 | | /// Summarizes one bounded trace, canonically ordered only on complete output. |
| | | 12 | | /// </summary> |
| | | 13 | | public readonly struct GridTraceIntervalReport |
| | | 14 | | { |
| | | 15 | | /// <summary>The completion status.</summary> |
| | | 16 | | public GridTraceIntervalStatus Status { get; } |
| | | 17 | | |
| | | 18 | | /// <summary>The number of candidate grids discovered.</summary> |
| | | 19 | | public int GridCandidateCount { get; } |
| | | 20 | | |
| | | 21 | | /// <summary>The number of candidate addresses charged at original-range admission, including omitted planar misses. |
| | | 22 | | public int AddressCandidateCount { get; } |
| | | 23 | | |
| | | 24 | | /// <summary>The number of intervals written.</summary> |
| | | 25 | | public int IntervalCount { get; } |
| | | 26 | | |
| | | 27 | | /// <summary>The number of simultaneous-coverage groups; zero for an explicit partial stop.</summary> |
| | | 28 | | public int TieGroupCount { get; } |
| | | 29 | | |
| | | 30 | | /// <summary>Whether all parameters from zero through one are covered by grid addresses.</summary> |
| | | 31 | | public bool HasContinuousAddressCoverage { get; } |
| | | 32 | | |
| | | 33 | | /// <summary>Whether all parameters from zero through one are covered by physically present voxels.</summary> |
| | | 34 | | public bool HasContinuousPhysicalCoverage { get; } |
| | | 35 | | |
| | | 36 | | /// <summary>Whether the complete trace was written.</summary> |
| | 19 | 37 | | public bool IsComplete => Status == GridTraceIntervalStatus.Complete; |
| | | 38 | | |
| | | 39 | | internal GridTraceIntervalReport( |
| | | 40 | | GridTraceIntervalStatus status, |
| | | 41 | | int gridCandidateCount, |
| | | 42 | | int candidateCount, |
| | | 43 | | int intervalCount, |
| | | 44 | | int tieGroupCount, |
| | | 45 | | bool hasContinuousAddressCoverage, |
| | | 46 | | bool hasContinuousPhysicalCoverage) |
| | | 47 | | { |
| | 257 | 48 | | Status = status; |
| | 257 | 49 | | GridCandidateCount = gridCandidateCount; |
| | 257 | 50 | | AddressCandidateCount = candidateCount; |
| | 257 | 51 | | IntervalCount = intervalCount; |
| | 257 | 52 | | TieGroupCount = tieGroupCount; |
| | 257 | 53 | | HasContinuousAddressCoverage = hasContinuousAddressCoverage; |
| | 257 | 54 | | HasContinuousPhysicalCoverage = hasContinuousPhysicalCoverage; |
| | 257 | 55 | | } |
| | | 56 | | } |