10 type(display_type) :: disp
16 integer(IKG),
allocatable :: array(:), cumsum(:)
18 call disp%show(
"array = [1, 2, 3, 4]")
20 call disp%show(
"call setResized(cumsum, size(array, 1, IK))")
22 call disp%show(
"call setCumSum(cumsum, array)")
26 call disp%show(
"call setCumSum(cumsum, array, forward, nothing)")
27 call setCumSum(cumsum, array, forward, nothing)
30 call disp%show(
"call setCumSum(cumsum, array, forward, reverse)")
31 call setCumSum(cumsum, array, forward, reverse)
34 call disp%show(
"call setCumSum(cumsum, array, backward, nothing)")
35 call setCumSum(cumsum, array, backward, nothing)
38 call disp%show(
"call setCumSum(cumsum, array, backward, reverse)")
39 call setCumSum(cumsum, array, backward, reverse)
47 integer(IKG),
allocatable :: array(:), cumsum(:), reference(:)
49 call disp%show(
"reference = [1, 2, 3, 4]")
50 reference
= [
1,
2,
3,
4]
53 call disp%show(
"call setCumSum(array)")
59 call disp%show(
"call setCumSum(array, forward, nothing)")
65 call disp%show(
"call setCumSum(array, forward, reverse)")
71 call disp%show(
"call setCumSum(array, backward, nothing)")
77 call disp%show(
"call setCumSum(array, backward, reverse)")
86 complex(CKG),
allocatable :: array(:), cumsum(:)
88 call disp%show(
"array = cmplx([real(CKG) :: 1, 2, 3, 4], -[real(CKG) :: 1, 2, 3, 4], CKG)")
89 array
= cmplx([
real(CKG) ::
1,
2,
3,
4],
-[
real(CKG) ::
1,
2,
3,
4], CKG)
90 call disp%show(
"call setResized(cumsum, size(array, 1, IK))")
92 call disp%show(
"call setCumSum(cumsum, array)")
96 call disp%show(
"call setCumSum(cumsum, array, forward, nothing)")
97 call setCumSum(cumsum, array, forward, nothing)
100 call disp%show(
"call setCumSum(cumsum, array, forward, reverse)")
101 call setCumSum(cumsum, array, forward, reverse)
104 call disp%show(
"call setCumSum(cumsum, array, backward, nothing)")
105 call setCumSum(cumsum, array, backward, nothing)
108 call disp%show(
"call setCumSum(cumsum, array, backward, reverse)")
109 call setCumSum(cumsum, array, backward, reverse)
117 complex(CKG),
allocatable :: array(:), cumsum(:), reference(:)
119 call disp%show(
"reference = cmplx([real(CKG) :: 1, 2, 3, 4], -[real(CKG) :: 1, 2, 3, 4], CKG)")
120 reference
= cmplx([
real(CKG) ::
1,
2,
3,
4],
-[
real(CKG) ::
1,
2,
3,
4], CKG)
123 call disp%show(
"call setCumSum(array)")
129 call disp%show(
"call setCumSum(array, forward, nothing)")
135 call disp%show(
"call setCumSum(array, forward, reverse)")
141 call disp%show(
"call setCumSum(array, backward, nothing)")
147 call disp%show(
"call setCumSum(array, backward, reverse)")
156 real(RKG),
allocatable :: array(:), cumsum(:)
158 call disp%show(
"array = [real(RKG) :: 1, 2, 3, 4]")
159 array
= [
real(RKG) ::
1,
2,
3,
4]
160 call disp%show(
"call setResized(cumsum, size(array, 1, IK))")
162 call disp%show(
"call setCumSum(cumsum, array)")
166 call disp%show(
"call setCumSum(cumsum, array, forward, nothing)")
167 call setCumSum(cumsum, array, forward, nothing)
170 call disp%show(
"call setCumSum(cumsum, array, forward, reverse)")
171 call setCumSum(cumsum, array, forward, reverse)
174 call disp%show(
"call setCumSum(cumsum, array, backward, nothing)")
175 call setCumSum(cumsum, array, backward, nothing)
178 call disp%show(
"call setCumSum(cumsum, array, backward, reverse)")
179 call setCumSum(cumsum, array, backward, reverse)
187 real(RKG),
allocatable :: array(:), cumsum(:), reference(:)
189 call disp%show(
"reference = [1, 2, 3, 4]")
190 reference
= [
1,
2,
3,
4]
193 call disp%show(
"call setCumSum(array)")
199 call disp%show(
"call setCumSum(array, forward, nothing)")
205 call disp%show(
"call setCumSum(array, forward, reverse)")
211 call disp%show(
"call setCumSum(array, backward, nothing)")
217 call disp%show(
"call setCumSum(array, backward, reverse)")
Allocate or resize (shrink or expand) an input allocatable scalar string or array of rank 1....
This is a generic method of the derived type display_type with pass attribute.
This is a generic method of the derived type display_type with pass attribute.
This module contains procedures and generic interfaces for resizing allocatable arrays of various typ...
This module contains classes and procedures for input/output (IO) or generic display operations on st...
type(display_type) disp
This is a scalar module variable an object of type display_type for general display.
This module defines the relevant Fortran kind type-parameters frequently used in the ParaMonte librar...
integer, parameter LK
The default logical kind in the ParaMonte library: kind(.true.) in Fortran, kind(....
integer, parameter CKS
The single-precision complex kind in Fortran mode. On most platforms, this is a 32-bit real kind.
integer, parameter IK
The default integer kind in the ParaMonte library: int32 in Fortran, c_int32_t in C-Fortran Interoper...
integer, parameter SK
The default character kind in the ParaMonte library: kind("a") in Fortran, c_char in C-Fortran Intero...
integer, parameter RKH
The scalar integer constant of intrinsic default kind, representing the highest-precision real kind t...
Generate and return an object of type display_type.
7call setCumSum(cumsum, array, forward, nothing)
10call setCumSum(cumsum, array, forward, reverse)
13call setCumSum(cumsum, array, backward, nothing)
16call setCumSum(cumsum, array, backward, reverse)
21reference
= [
1,
2,
3,
4]
44array
= cmplx([
real(CKG) ::
1,
2,
3,
4],
-[
real(CKG) ::
1,
2,
3,
4], CKG)
48(
+1.00000000,
-1.00000000), (
+3.00000000,
-3.00000000), (
+6.00000000,
-6.00000000), (
+10.0000000,
-10.0000000)
49call setCumSum(cumsum, array, forward, nothing)
51(
+1.00000000,
-1.00000000), (
+3.00000000,
-3.00000000), (
+6.00000000,
-6.00000000), (
+10.0000000,
-10.0000000)
52call setCumSum(cumsum, array, forward, reverse)
54(
+10.0000000,
-10.0000000), (
+6.00000000,
-6.00000000), (
+3.00000000,
-3.00000000), (
+1.00000000,
-1.00000000)
55call setCumSum(cumsum, array, backward, nothing)
57(
+4.00000000,
-4.00000000), (
+7.00000000,
-7.00000000), (
+9.00000000,
-9.00000000), (
+10.0000000,
-10.0000000)
58call setCumSum(cumsum, array, backward, reverse)
60(
+10.0000000,
-10.0000000), (
+9.00000000,
-9.00000000), (
+7.00000000,
-7.00000000), (
+4.00000000,
-4.00000000)
63reference
= cmplx([
real(CKG) ::
1,
2,
3,
4],
-[
real(CKG) ::
1,
2,
3,
4], CKG)
67(
+1.00000000,
-1.00000000), (
+3.00000000,
-3.00000000), (
+6.00000000,
-6.00000000), (
+10.0000000,
-10.0000000)
71(
+1.00000000,
-1.00000000), (
+3.00000000,
-3.00000000), (
+6.00000000,
-6.00000000), (
+10.0000000,
-10.0000000)
75(
+10.0000000,
-10.0000000), (
+6.00000000,
-6.00000000), (
+3.00000000,
-3.00000000), (
+1.00000000,
-1.00000000)
79(
+4.00000000,
-4.00000000), (
+7.00000000,
-7.00000000), (
+9.00000000,
-9.00000000), (
+10.0000000,
-10.0000000)
83(
+10.0000000,
-10.0000000), (
+9.00000000,
-9.00000000), (
+7.00000000,
-7.00000000), (
+4.00000000,
-4.00000000)
86array
= [
real(RKG) ::
1,
2,
3,
4]
90+1.00000000000000000000000000000000000,
+3.00000000000000000000000000000000000,
+6.00000000000000000000000000000000000,
+10.0000000000000000000000000000000000
91call setCumSum(cumsum, array, forward, nothing)
93+1.00000000000000000000000000000000000,
+3.00000000000000000000000000000000000,
+6.00000000000000000000000000000000000,
+10.0000000000000000000000000000000000
94call setCumSum(cumsum, array, forward, reverse)
96+10.0000000000000000000000000000000000,
+6.00000000000000000000000000000000000,
+3.00000000000000000000000000000000000,
+1.00000000000000000000000000000000000
97call setCumSum(cumsum, array, backward, nothing)
99+4.00000000000000000000000000000000000,
+7.00000000000000000000000000000000000,
+9.00000000000000000000000000000000000,
+10.0000000000000000000000000000000000
100call setCumSum(cumsum, array, backward, reverse)
102+10.0000000000000000000000000000000000,
+9.00000000000000000000000000000000000,
+7.00000000000000000000000000000000000,
+4.00000000000000000000000000000000000
105reference
= [
1,
2,
3,
4]
109+1.00000000000000000000000000000000000,
+3.00000000000000000000000000000000000,
+6.00000000000000000000000000000000000,
+10.0000000000000000000000000000000000
113+1.00000000000000000000000000000000000,
+3.00000000000000000000000000000000000,
+6.00000000000000000000000000000000000,
+10.0000000000000000000000000000000000
117+10.0000000000000000000000000000000000,
+6.00000000000000000000000000000000000,
+3.00000000000000000000000000000000000,
+1.00000000000000000000000000000000000
121+4.00000000000000000000000000000000000,
+7.00000000000000000000000000000000000,
+9.00000000000000000000000000000000000,
+10.0000000000000000000000000000000000
125+10.0000000000000000000000000000000000,
+9.00000000000000000000000000000000000,
+7.00000000000000000000000000000000000,
+4.00000000000000000000000000000000000