iterator_t Derived Type

type, public :: iterator_t


Components

TypeVisibility AttributesNameInitial
integer, public, dimension(:), allocatable:: idx

Current iteration index

integer, public, dimension(:), allocatable:: N

Iteration limits

real(kind=wp), public, dimension(:), allocatable:: lB

Lower bounds for real conversion

real(kind=wp), public, dimension(:), allocatable:: hB

Upper bounds for real conversion

logical, public :: isDone =.false.

Completion state flag


Type-Bound Procedures

procedure, public :: next

  • private subroutine next(self)

    Increment the iterator's index

    Arguments

    Type IntentOptional AttributesName
    class(iterator_t), intent(inout) :: self

    Self object

procedure, public :: getReals

  • private function getReals(self) result(r)

    Convert the index into the real ranges defined by lB and hB

    Arguments

    Type IntentOptional AttributesName
    class(iterator_t), intent(in) :: self

    Self object

    Return Value real(kind=wp), dimension(:), allocatable

    Real values in B-space

procedure, public :: getInt

  • private function getInt(self) result(i)

    Convert the index array into a single count comparable to product(N)

    Arguments

    Type IntentOptional AttributesName
    class(iterator_t), intent(in) :: self

    Self object

    Return Value integer

    Single index equivalent

procedure, public :: setInt

  • private subroutine setInt(self, i)

    Set the index array to the equivalent of a single value comparable to product(N)

    Arguments

    Type IntentOptional AttributesName
    class(iterator_t), intent(inout) :: self

    Self object

    integer, intent(in) :: i

    Single index equivalent

procedure, public :: getProgress

  • private function getProgress(self) result(p)

    Get the progress of the iterator such that \(p\in[0,1]\)

    Arguments

    Type IntentOptional AttributesName
    class(iterator_t), intent(in) :: self

    Self object

    Return Value real(kind=wp)

    Progress