Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
Source Code
subroutine solve_regularized_qr(factorization,rhs,solution)type(regularized_qr_type),intent(in)::factorizationreal(dp),intent(in)::rhs(:)real(dp),intent(out)::solution(:)real(dp),allocatable::augmented_rhs(:),qtb(:),scaled_solution(:)integer(i32)::col_idxif(.not.allocated(factorization%q).or..not.allocated(factorization%r).or.&.not.allocated(factorization%col_scale))then error stop'solve_regularized_qr requires a prepared factorization.'end if if(size(rhs)/=factorization%mrow.or.size(solution)/=factorization%ncol)then error stop'solve_regularized_qr dimension mismatch.'end if allocate(augmented_rhs(factorization%mrow+factorization%ncol))allocate(qtb(factorization%ncol),scaled_solution(factorization%ncol))augmented_rhs=0.0_dpaugmented_rhs(1:factorization%mrow)=rhsqtb=matmul(transpose(factorization%q),augmented_rhs)call solve_upper_triangular_system(factorization%r,qtb,scaled_solution)do col_idx=1_i32,factorization%ncolsolution(col_idx)=scaled_solution(col_idx)/factorization%col_scale(col_idx)end do end subroutine solve_regularized_qr