rb_mv_mult_fun Function

private function rb_mv_mult_fun(self, vect)

Matrix vector multiplication

Type Bound

rowblock_type

Arguments

Type IntentOptional Attributes Name
class(rowblock_type), intent(in) :: self
complex, intent(in), dimension(self%ncol) :: vect

Return Value complex, dimension(self%nrow)


Contents

Source Code


Source Code

  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