Verify Maximal Packing Created by create.maximal.packing
Source:R/graph_maximal_packing.R
verify.maximal.packing.RdA convenience function to verify the correctness of a maximal
packing created using the create.maximal.packing function.
This function validates both the packing property (minimum separation
distance) and maximality (no vertices can be added).
Arguments
- packing.result
The result returned by
create.maximal.packing, which must be an object of class "maximal_packing".- verbose
Logical indicating whether to print detailed validation results. Default is TRUE.
Value
A logical value: TRUE if the packing is both valid (satisfies the distance constraint) and maximal (no vertices can be added), FALSE otherwise.
Details
This function takes the output of create.maximal.packing
and verifies two key properties:
The packing vertices are all separated by at least
max_packing_radiusThe packing is maximal (no more vertices can be added without violating the distance constraint)
When \code{verbose = TRUE}, the function prints:
\itemize{
\item Graph diameter
\item Packing radius used
\item Number of vertices in the packing
\item Minimum distance between packing vertices
\item Maximum coverage distance
\item Validity and maximality status
\item Any violations or potential additions (if applicable)
}