Compute the inner product vector or matrix .
This interface provides methods for computing the inner products between a basis
of real
or complex
vectors and a single vector
or another basis . Depending on the case, it
returns a one-dimensional array or a two-dimensional array
with the same type as .
The example below assumes that you have already extended the abstract_vector_rdp
class to define your own my_real_vector
type.
type(my_real_vector), dimension(10) :: X
type(my_real_vector) :: y
real(dp), dimension(:), allocatable :: v
! ... Part of your code where you initialize everything ...
v = innerprod(X, y)
! ... Rest of your code ...
Similarly, for computing the matrix of inner products between two bases
type(my_real_vector), dimension(10) :: X
type(my_real_vector), dimension(10) :: Y
real(dp), dimension(:, :), allocatable :: M
! ... Part of your code where you initialize everything ...
M = innerprod(X, Y)
! ... Rest of your code ...
Computes the inner product vector between
a basis X
of abstract_vector
and v
, a single abstract_vector
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_vector_rsp), | intent(in) | :: | X(:) |
Bases of |
||
class(abstract_vector_rsp), | intent(in) | :: | y |
Bases of |
Resulting inner-product vector.
Computes the inner product matrix between
two bases of abstract_vector
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_vector_rsp), | intent(in) | :: | X(:) |
Bases of |
||
class(abstract_vector_rsp), | intent(in) | :: | Y(:) |
Bases of |
Resulting inner-product matrix.
Computes the inner product vector between
a basis X
of abstract_vector
and v
, a single abstract_vector
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_vector_rdp), | intent(in) | :: | X(:) |
Bases of |
||
class(abstract_vector_rdp), | intent(in) | :: | y |
Bases of |
Resulting inner-product vector.
Computes the inner product matrix between
two bases of abstract_vector
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_vector_rdp), | intent(in) | :: | X(:) |
Bases of |
||
class(abstract_vector_rdp), | intent(in) | :: | Y(:) |
Bases of |
Resulting inner-product matrix.
Computes the inner product vector between
a basis X
of abstract_vector
and v
, a single abstract_vector
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_vector_csp), | intent(in) | :: | X(:) |
Bases of |
||
class(abstract_vector_csp), | intent(in) | :: | y |
Bases of |
Resulting inner-product vector.
Computes the inner product matrix between
two bases of abstract_vector
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_vector_csp), | intent(in) | :: | X(:) |
Bases of |
||
class(abstract_vector_csp), | intent(in) | :: | Y(:) |
Bases of |
Resulting inner-product matrix.
Computes the inner product vector between
a basis X
of abstract_vector
and v
, a single abstract_vector
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_vector_cdp), | intent(in) | :: | X(:) |
Bases of |
||
class(abstract_vector_cdp), | intent(in) | :: | y |
Bases of |
Resulting inner-product vector.
Computes the inner product matrix between
two bases of abstract_vector
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_vector_cdp), | intent(in) | :: | X(:) |
Bases of |
||
class(abstract_vector_cdp), | intent(in) | :: | Y(:) |
Bases of |
Resulting inner-product matrix.