validate_Librino {CirclesIntersections} | R Documentation |
Simple validation test of the output of Librino_N()
Description
Checks if the sum of the areas of intersection of each circle adds to the total area of the circle, as it should.
Usage
validate_Librino(librino, radii)
Arguments
librino |
A named numeric vector with the from resulting from [Librino_N()] |
radii |
Numeric vectors of length N with the radius of each circle. |
Value
TRUE if all the partitions of the circles add to their total area, else a numeric vector with the number of the circles that failed this test.
Author(s)
Hugo Salinas hugosal@comunidad.unam.mx.
Examples
# Example of intersection areas including a Reuleaux triangle
x <- c(0, 1, 0.5)
y <-c(0, 0, sqrt(1-0.5**2))
radii <- c(1, 1, 1)
intersections <- Librino_N(centers_x = x, centers_y = y, radii = radii)
validate_Librino(librino = unlist(intersections, use.names = TRUE), radii = radii)
[Package CirclesIntersections version 1.1 Index]