get_degree_impl Function

private function get_degree_impl(self, i) result(degree)

Type Bound

type_crs_adjacency_element

Arguments

Type IntentOptional Attributes Name
class(type_crs_adjacency_element), intent(in) :: self
integer(kind=int32), intent(in) :: i

Return Value integer(kind=int32)


Called by

proc~~get_degree_impl~~CalledByGraph proc~get_degree_impl type_crs_adjacency_element%get_degree_impl proc~coloring_dsatur coloring_dsatur proc~coloring_dsatur->proc~get_degree_impl proc~coloring_lfo coloring_lfo proc~coloring_lfo->proc~get_degree_impl proc~find_smallest_available_color find_smallest_available_color proc~find_smallest_available_color->proc~get_degree_impl proc~get_welsh_powell_order get_welsh_powell_order proc~get_welsh_powell_order->proc~get_degree_impl interface~coloring_dsatur type_coloring%coloring_dsatur interface~coloring_dsatur->proc~coloring_dsatur interface~coloring_lfo type_coloring%coloring_lfo interface~coloring_lfo->proc~coloring_lfo proc~coloring_welsh_powell coloring_welsh_powell proc~coloring_welsh_powell->proc~find_smallest_available_color proc~coloring_welsh_powell->proc~get_welsh_powell_order interface~coloring_welsh_powell type_coloring%coloring_welsh_powell interface~coloring_welsh_powell->proc~coloring_welsh_powell proc~initialize_type_coloring type_coloring%initialize_type_coloring proc~initialize_type_coloring->interface~coloring_dsatur proc~initialize_type_coloring->interface~coloring_lfo proc~initialize_type_coloring->interface~coloring_welsh_powell

Source Code

    function get_degree_impl(self, i) result(degree)
        implicit none
        class(type_crs_adjacency_element), intent(in) :: self
        integer(int32), intent(in) :: i
        integer(int32) :: degree

        if (i < 1 .or. i > self%num_row) then
            degree = 0
        else
            degree = self%ptr(i + 1) - self%ptr(i)
        end if
    end function get_degree_impl