
Houses the calculation tree class and the relevant node class.
Recursively evaluate nodes, using the inputArray variables for leaf values
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(CalculationNode), | intent(in) | :: | this | |||
| type(RealArray), | intent(in), | dimension(:) | :: | inputArray |
Call tree's root node evaluate
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(CalculationTree), | intent(in) | :: | this | |||
| type(RealArray), | intent(in), | dimension(:) | :: | inputArray |
Flatten tree into FlatTree object
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(CalculationTree), | intent(in) | :: | this |
Calculation node initialization routine
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(CalculationNode), | intent(inout) | :: | this | |||
| logical, | intent(in), | optional | :: | additiveMode | ||
| real(kind=rk), | intent(in), | optional | :: | constant | ||
| integer(kind=ik), | intent(in), | optional | :: | leafVarIndex | ||
| real(kind=rk), | intent(in), | optional, | dimension(:) | :: | unaryRealParams | |
| integer(kind=ik), | intent(in), | optional, | dimension(:) | :: | unaryIntParams | |
| logical, | intent(in), | optional, | dimension(:) | :: | unaryLogicalParams | |
| character(len=*), | intent(in), | optional | :: | unaryTransformTag |
Calculation tree initialization routine
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(CalculationTree), | intent(inout) | :: | this | |||
| logical, | intent(in), | optional | :: | additiveMode | ||
| real(kind=rk), | intent(in), | optional | :: | constant | ||
| integer(kind=ik), | intent(in), | optional | :: | leafVarIndex | ||
| real(kind=rk), | intent(in), | optional, | dimension(:) | :: | unaryRealParams | |
| integer(kind=ik), | intent(in), | optional, | dimension(:) | :: | unaryIntParams | |
| logical, | intent(in), | optional, | dimension(:) | :: | unaryLogicalParams | |
| character(len=*), | intent(in), | optional | :: | unaryTransformTag |
Initialize a child node of this node with given properties
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(CalculationNode), | intent(inout), | target | :: | this | ||
| logical, | intent(in), | optional | :: | additiveMode | ||
| real(kind=rk), | intent(in), | optional | :: | constant | ||
| integer(kind=ik), | intent(in), | optional | :: | leafVarIndex | ||
| real(kind=rk), | intent(in), | optional, | dimension(:) | :: | unaryRealParams | |
| integer(kind=ik), | intent(in), | optional, | dimension(:) | :: | unaryIntParams | |
| logical, | intent(in), | optional, | dimension(:) | :: | unaryLogicalParams | |
| character(len=*), | intent(in), | optional | :: | unaryTransformTag |
Calculation tree initialization routine using a FlatTree object
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(CalculationTree), | intent(inout) | :: | this | |||
| type(FlatTree), | intent(in) | :: | fTree |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(CalculationNode), | intent(inout) | :: | this |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(CalculationTree), | intent(inout) | :: | this |
Kernel containing calculation node properties
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| logical, | public | :: | additiveMode |
If true will use additive mode for reducing the results of its children. Defaults to false. |
|||
| real(kind=rk), | public | :: | constant |
Constant component, defaults to 0 in additive mode and 1 in multiplicative. |
|||
| integer(kind=ik), | public | :: | leafVarIndex |
Index of variable to be used a the child's result if this node is a leaf |
|||
| real(kind=rk), | public, | allocatable, dimension(:) | :: | unaryRealParams |
Optional real parameters of unary transformation |
||
| integer(kind=ik), | public, | allocatable, dimension(:) | :: | unaryIntParams |
Optional integer parameters of unary transformation |
||
| logical, | public, | allocatable, dimension(:) | :: | unaryLogicalParams |
Optional logical parameters of unary transformation |
||
| character(len=:), | public, | allocatable | :: | unaryTransformationTag |
Flattened calculation tree for pointer-safe copying
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(CalculationKernel), | public, | allocatable, dimension(:) | :: | kernels | |||
| type(IntArray), | public, | allocatable, dimension(:) | :: | children | |||
| integer(kind=ik), | public, | allocatable, dimension(:) | :: | parent |
Node class for the abstract calculation left child/right sibling tree. Each node has a reference to its leftmost child, its sibling to the immediate right, and to its parent.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| logical, | public | :: | userDefined | = | .false. |
True only if user explicitly sets it to true |
|
| type(CalculationNode), | public, | pointer | :: | leftChild | => | null() | |
| type(CalculationNode), | public, | pointer | :: | rightSibling | => | null() | |
| type(CalculationNode), | public, | pointer | :: | parent | => | null() | |
| type(CalculationKernel), | public | :: | kernel | ||||
| procedure(realArrayFunctionGenParam), | public, | pointer, nopass | :: | unaryTransform | => | null() |
Optional unary transformation |
| procedure, public :: isDefined => isDefinedObject | |
| procedure, public :: makeDefined => makeDefinedObject | |
| procedure, public :: makeUndefined => makeUndefinedObject | |
| procedure, public :: addChild | |
| procedure, public :: init => initNode | |
| procedure, public :: evaluate => evaluateNode | |
| procedure, public :: destroy => destroyNode |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| logical, | public | :: | userDefined | = | .false. |
True only if user explicitly sets it to true |
|
| type(CalculationNode), | public, | pointer | :: | root | => | null() |
| final :: finalizeCalculationTree |
| procedure, public :: isDefined => isDefinedObject | |
| procedure, public :: makeDefined => makeDefinedObject | |
| procedure, public :: makeUndefined => makeUndefinedObject | |
| procedure, public :: init => initTree | |
| procedure, public :: evaluate => evaluateTree | |
| procedure, public :: flatten => flattenTree | |
| procedure, public :: initFromFlatTree |