vector_csp Derived Type

type, public, extends(abstract_vector_csp) :: vector_csp


Components

Type Visibility Attributes Name Initial
complex(kind=sp), public, dimension(test_size) :: data = 0.0_sp

Type-Bound Procedures

procedure, public, pass(self) :: add => add_csp

Adds two abstract_vector, i.e. .

  • private subroutine add_csp(self, vec)

    Add two abstract_vector in-place.

    Arguments

    Type IntentOptional Attributes Name
    class(abstract_vector_csp), intent(inout) :: self

    Input/Output vector.

    class(abstract_vector_csp), intent(in) :: vec

    Vector to be added.

procedure, public, pass(self) :: axpby => axpby_csp

  • private subroutine axpby_csp(alpha, vec, beta, self)

    Arguments

    Type IntentOptional Attributes Name
    complex(kind=sp), intent(in) :: alpha
    class(abstract_vector_csp), intent(in) :: vec
    complex(kind=sp), intent(in) :: beta
    class(vector_csp), intent(inout) :: self

procedure, public, pass(self) :: chsgn => chsgn_csp

Change the sign of a vector, i.e. .

  • private subroutine chsgn_csp(self)

    Changes the sign of the abstract_vector.

    Arguments

    Type IntentOptional Attributes Name
    class(abstract_vector_csp), intent(inout) :: self

    Vector whose entries need to change sign.

procedure, public, pass(self) :: dot => dot_csp

  • private function dot_csp(self, vec) result(alpha)

    Arguments

    Type IntentOptional Attributes Name
    class(vector_csp), intent(in) :: self
    class(abstract_vector_csp), intent(in) :: vec

    Return Value complex(kind=sp)

procedure, public, pass(self) :: get_size => get_size_csp

  • private function get_size_csp(self) result(N)

    Arguments

    Type IntentOptional Attributes Name
    class(vector_csp), intent(in) :: self

    Return Value integer

procedure, public, pass(self) :: norm => norm_csp

Computes the norm of the abstract_vector.

  • private function norm_csp(self) result(alpha)

    Compute the norm of an abstract_vector.

    Arguments

    Type IntentOptional Attributes Name
    class(abstract_vector_csp), intent(in) :: self

    Vector whose norm needs to be computed.

    Return Value real(kind=sp)

    Norm of the vector.

procedure, public, pass(self) :: rand => rand_csp

  • private subroutine rand_csp(self, ifnorm)

    Arguments

    Type IntentOptional Attributes Name
    class(vector_csp), intent(inout) :: self
    logical, intent(in), optional :: ifnorm

procedure, public, pass(self) :: scal => scal_csp

  • private subroutine scal_csp(self, alpha)

    Arguments

    Type IntentOptional Attributes Name
    class(vector_csp), intent(inout) :: self
    complex(kind=sp), intent(in) :: alpha

procedure, public, pass(self) :: sub => sub_csp

Subtracts two abstract_vector, i.e. .

  • private subroutine sub_csp(self, vec)

    Subtract two abstract_vector in-place.

    Arguments

    Type IntentOptional Attributes Name
    class(abstract_vector_csp), intent(inout) :: self

    Input/Output vector.

    class(abstract_vector_csp), intent(in) :: vec

    Vector to be added.

procedure, public, pass(self) :: zero => init_zero_csp

  • private subroutine init_zero_csp(self)

    Arguments

    Type IntentOptional Attributes Name
    class(vector_csp), intent(inout) :: self

Source Code

    type, extends(abstract_vector_csp), public :: vector_csp
        complex(sp), dimension(test_size) :: data = 0.0_sp
    contains
        private
        procedure, pass(self), public :: zero => init_zero_csp
        procedure, pass(self), public :: dot => dot_csp
        procedure, pass(self), public :: scal => scal_csp
        procedure, pass(self), public :: axpby => axpby_csp
        procedure, pass(self), public :: rand => rand_csp
        procedure, pass(self), public :: get_size => get_size_csp
    end type vector_csp