Abstract type to define real(dp)-valued vectors. Derived-types defined by the user should be extending one such class.
Adds two abstract_vector
.
Add two abstract_vector
in-place.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_vector_rdp), | intent(inout) | :: | self |
Input/Output vector. |
||
class(abstract_vector_rdp), | intent(in) | :: | vec |
Vector to be added. |
In-place computation of .
Abstract interface to add/scale two vectors in-place.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_vector_rdp), | intent(inout) | :: | self |
Input/Output vector. |
||
real(kind=dp), | intent(in) | :: | alpha | |||
class(abstract_vector_rdp), | intent(in) | :: | vec |
Vector to be added/subtracted. |
||
real(kind=dp), | intent(in) | :: | beta |
Changes the sign of the abstract_vector
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_vector_rdp), | intent(inout) | :: | self |
Vector whose entries need to change sign. |
Computes the dot product between two abstract_vector_rdp
.
Abstract interface to compute the dot product.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_vector_rdp), | intent(in) | :: | self |
Vectors whose dot product will be computed. |
||
class(abstract_vector_rdp), | intent(in) | :: | vec |
Vectors whose dot product will be computed. |
Result of the dot product.
Return size of specific abstract vector
Abstract interface to return the size of the specific abstract vector.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_vector_rdp), | intent(in) | :: | self |
Vectors whose dot product will be computed. |
Size of the vector
Computes the norm of the abstract_vector
.
Compute the norm of an abstract_vector
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_vector_rdp), | intent(in) | :: | self |
Vector whose norm needs to be computed. |
Norm of the vector.
Creates a random abstract_vector_rdp
.
Abstract interface to generate a random (normalized) vector.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_vector_rdp), | intent(inout) | :: | self | |||
logical, | intent(in), | optional | :: | ifnorm |
Compute the scalar-vector product.
Abstract interface to scale a vector.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_vector_rdp), | intent(inout) | :: | self |
Input/Output vector. |
||
real(kind=dp), | intent(in) | :: | alpha |
Scaling factor. |
Subtracts two abstract_vector
.
Subtract two abstract_vector
in-place.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_vector_rdp), | intent(inout) | :: | self |
Input/Output vector. |
||
class(abstract_vector_rdp), | intent(in) | :: | vec |
Vector to be added. |
Sets an abstract_vector_rdp
to zero.
Abstract interface to zero-out a vector in-place.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_vector_rdp), | intent(inout) | :: | self |
Vector to be zeroed-out. |