lod_error Function

private function lod_error(self, j) result(error)

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 Bound

LineChain

Arguments

Type IntentOptional Attributes Name
class(LineChain), intent(in) :: self
integer, intent(in) :: j

the chunk (outside 1 to the chunks: zeros)

Return Value real(kind=c_float), (lod_levels)


Called by

proc~~lod_error~2~~CalledByGraph proc~lod_error~2 LineChain%lod_error proc~send_lod send_lod proc~send_lod->proc~lod_error~2 proc~set_lod LineChain%set_lod proc~set_lod->proc~send_lod proc~update_lod update_lod proc~update_lod->proc~send_lod proc~written LineChain%written proc~written->proc~update_lod proc~write_intermediates write_intermediates proc~write_intermediates->proc~written proc~write_marker write_marker proc~write_marker->proc~written proc~write_segments write_segments proc~write_segments->proc~written proc~write_segments~2 write_segments proc~write_segments~2->proc~written proc~add_intermediates add_intermediates proc~add_intermediates->proc~write_intermediates proc~marker_update MarkerArtist%marker_update proc~marker_update->proc~write_marker proc~marker_update->proc~add_intermediates proc~segment_update SegmentArtist%segment_update proc~segment_update->proc~write_segments proc~segments_late_update CustomLineSegments%segments_late_update proc~segments_late_update->proc~write_segments~2

Source Code

    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