function_t Derived Type

type, public :: function_t

type~~function_t~~InheritsGraph type~function_t function_t type~node_t~2 node_t type~node_t~2->type~function_t root
Help


Type to store and evaluate parsed expressions



Components

TypeVisibility AttributesNameInitial
character(len=:), public, allocatable:: str
class(node_t), public, allocatable:: root

Constructor

public interface function_t

Constructors for function_t

  • private function newFunction(str) result(self)

    Constructor for function_t

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: str

    Character to parse into function

    Return Value type(function_t)

    New function_t


Type-Bound Procedures

generic, public :: eval => evalR, evalZ

  • private function evalR(self, a) result(o)

    Evaluate a function with given arguments

    Arguments

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

    Function to evaluate

    real(kind=wp), intent(in), dimension(:):: a

    Argument values

    Return Value real(kind=wp)

    Resultant value

  • private function evalZ(self, a) result(o)

    Evaluate a function with given arguments

    Arguments

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

    Function to evaluate

    complex(kind=wp), intent(in), dimension(:):: a

    Argument values

    Return Value complex(kind=wp)

    Resultant value