Chunk j's error bounds: how far the points skipped can be from the segments drawn at stride 2^k (k = 1 .. lod_levels; 0 where not known).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(LineChain), | intent(in) | :: | self | |||
| integer, | intent(in) | :: | j |
the chunk (outside 1 to the chunks: zeros) |
function lod_error(self, j) result(error) class(LineChain), intent(in) :: self integer, intent(in) :: j !! the chunk (outside 1 to the chunks: zeros) real(c_float) :: error(lod_levels) integer :: k, n, m error = 0.0_c_float if (j < 1 .or. j > self%n_chunks) return n = 0 do k = 1, lod_levels if (.not. allocated(self%chunks(j)%lod(k)%bound)) exit if (k == 1) n = self%chunks(j)%n_written m = 0 if (n >= 2) m = (n - 2) / 2**k + 1 if (m > 0) error(k) = maxval(self%chunks(j)%lod(k)%bound(0:m-1)) end do end function lod_error