Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
complex(kind=dp), | public, | allocatable | :: | data(:) | |||
integer, | public | :: | n |
Adds two abstract_vector
, i.e. .
Add two abstract_vector
in-place.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_vector_cdp), | intent(inout) | :: | self |
Input/Output vector. |
||
class(abstract_vector_cdp), | intent(in) | :: | vec |
Vector to be added. |
In-place computation of .
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=dp), | intent(in) | :: | alpha | |||
class(abstract_vector_cdp), | intent(in) | :: | vec | |||
complex(kind=dp), | intent(in) | :: | beta | |||
class(dense_vector_cdp), | intent(inout) | :: | self |
Change the sign of a vector, i.e. .
Changes the sign of the abstract_vector
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_vector_cdp), | intent(inout) | :: | self |
Vector whose entries need to change sign. |
Computes the dot product between two abstract_vector_cdp
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(dense_vector_cdp), | intent(in) | :: | self | |||
class(abstract_vector_cdp), | intent(in) | :: | vec |
Return size of specific abstract vector
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(dense_vector_cdp), | intent(in) | :: | self |
Computes the norm of the abstract_vector
.
Compute the norm of an abstract_vector
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_vector_cdp), | intent(in) | :: | self |
Vector whose norm needs to be computed. |
Norm of the vector.
Creates a random abstract_vector_cdp
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(dense_vector_cdp), | intent(inout) | :: | self | |||
logical, | intent(in), | optional | :: | ifnorm |
Compute the scalar-vector product.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(dense_vector_cdp), | intent(inout) | :: | self | |||
complex(kind=dp), | intent(in) | :: | alpha |
Subtracts two abstract_vector
, i.e. .
Subtract two abstract_vector
in-place.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_vector_cdp), | intent(inout) | :: | self |
Input/Output vector. |
||
class(abstract_vector_cdp), | intent(in) | :: | vec |
Vector to be subtracted. |
Sets an abstract_vector_cdp
to zero.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(dense_vector_cdp), | intent(inout) | :: | self |
type, extends(abstract_vector_cdp), public :: dense_vector_cdp integer :: n complex(dp), allocatable :: data(:) contains private procedure, pass(self), public :: zero => dense_zero_cdp !! Sets an `abstract_vector_cdp` to zero. procedure, pass(self), public :: rand => dense_rand_cdp !! Creates a random `abstract_vector_cdp`. procedure, pass(self), public :: scal => dense_scal_cdp !! Compute the scalar-vector product. procedure, pass(self), public :: axpby => dense_axpby_cdp !! In-place computation of \( \mathbf{y} \leftarrow \alpha \mathbf{x} + \beta \mathbf{y} \). procedure, pass(self), public :: dot => dense_dot_cdp !! Computes the dot product between two `abstract_vector_cdp`. procedure, pass(self), public :: get_size => dense_get_size_cdp !! Return size of specific abstract vector end type dense_vector_cdp