Matrix vector multiplication
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(rowblock_type), | intent(in) | :: | self | |||
complex, | intent(in), | dimension(self%ncol) | :: | vect |
function rb_mv_mult_fun(self,vect)
implicit none
class(rowblock_type), intent(in) :: self
complex,dimension(self%ncol), intent(in) :: vect
complex,dimension(self%nrow) :: rb_mv_mult_fun
! integer :: ir
!As a 1d vector in fortran is a "row vector" (as the
!first index represents columns) matmul is a bit annoying
!when trying to do a matrix-vector product
rb_mv_mult_fun = matmul(vect,self%data)
! do ir=1,self%nrow
! rb_mv_mult_fun(ir)=sum(self%data(:,ir)*vect)
! enddo
end function rb_mv_mult_fun