Calculate the root vertices of the network
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(network_type), | intent(inout) | :: | this |
Instance of network |
module subroutine build_root_vertices(this) !! Calculate the root vertices of the network implicit none ! Arguments class(network_type), intent(inout) :: this !! Instance of network ! Local variables integer :: i !! Loop index if(allocated(this%root_vertices)) deallocate(this%root_vertices) allocate(this%root_vertices(0)) ! from = 1 do i = 1, this%auto_graph%num_vertices if(all(this%auto_graph%adjacency(:,i).eq.0))then this%root_vertices = [this%root_vertices, i] ! to = from + this%model(i)layer%num_input_data - 1 ! this%root_bounds = [ this%root_bounds, reshape([from,to], [2,1]) ] ! from = to + 1 end if end do end subroutine build_root_vertices