ParaMonte Fortran 2.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation.
pm_matrixUpdate::setMatUpdateR1 Interface Reference

Return the rank-1 update of the input matrix mat using the input vectors vecA and vecB. More...

Detailed Description

Return the rank-1 update of the input matrix mat using the input vectors vecA and vecB.

see the documentation of pm_matrixUpdate for more details.

Parameters
[in,out]mat: The input/output contiguous matrix of arbitrary shape (:,:) of,
  1. type integer of kind any supported by the processor (e.g., IK, IK8, IK16, IK32, or IK64),
  2. type complex of kind any supported by the processor (e.g., CK, CK32, CK64, or CK128),
  3. type real of kind any supported by the processor (e.g., RK, RK32, RK64, or RK128),
containing the matrix to be updated on output.
The matrix does not have to be square.
[in]vecA: The input contiguous vector of the same type and kind as mat, of either
  1. the same size as size(mat, 1), or
  2. the specific size such that the condition (size(vecA, 1) - 1) / abs(incA) + 1 + roff == size(mat, 1).
[in]vecB: The input contiguous vector of the same type and kind as mat, of either
  1. the same size as size(mat, 2), or
  2. the specific size such that the condition (size(vecB, 1) - 1) / abs(incB) + 1 + roff == size(mat, 2).
[in]operationB: The input scalar parameter object transHerm of type transHerm_type.
This argument is merely used to require complex conjugate (Hermitian) transpose in the computation of the outer product: \(\ms{vecA}~\ms{vecB}^{\mathrm{H}}\).
This argument is currently available for and relevant only to input arguments mat of type complex.
(optional. If missing, the real transpose (without conjugation) will be used instead.)
[in]alpha: The input scalar of the same type and kind as mat, representing the factor by which the outer product \(\ms{vecA}~\ms{vecB}^{\mathrm{T}}\) must be multiplied.
(optional, default = 1.)
[in]incA: The input scalar of type integer of default kind IK, representing the increment along the vecA vector.
It can be any value other than 0. An input value incA < 0 is equivalent to inverting vecA and resetting incA = abs(incA).
[in]incA: The input scalar of type integer of default kind IK, representing the increment along the vecB vector.
It can be any value other than 0. An input value incB < 0 is equivalent to inverting vecB and resetting incB = abs(incB).
[in]roff: The input scalar of type integer of default kind IK, representing the offset from the starting row of mat to which the update must occur.


Possible calling interfaces

call setMatUpdateR1(mat, vecA, vecB, incA, incB, offset)
call setMatUpdateR1(mat, vecA, vecB, alpha, incA, incB, offset)
call setMatUpdateR1(mat, vecA, vecB, operationB, incA, incB, offset) ! only complex arguments (cgerc, zgerc).
call setMatUpdateR1(mat, vecA, vecB, operationB, alpha, incA, incB, offset) ! only complex arguments (cgerc, zgerc).
!
Return the rank-1 update of the input matrix mat using the input vectors vecA and vecB.
This module contains procedures and generic interfaces relevant to arbitrary-rank updates to vectors,...
Warning
The condition incA /= 0_IK must hold for the corresponding input arguments.
The condition incB /= 0_IK must hold for the corresponding input arguments.
The condition 0_IK <= offset must hold for the corresponding input arguments.
The condition size(mat, 2, IK) == (size(vecB, 1, IK) - 1_IK) / abs(incB) + 1_IK must hold for the corresponding input arguments.
The condition size(mat, 1, IK) >= (size(vecA, 1, IK) - 1_IK) / abs(incA) + 1_IK + offset must hold for the corresponding input arguments.
The condition size(vecA, 1, IK) == incA * ((size(vecA, 1, IK) - 1_IK) / abs(incA) + 1_IK) must hold for the corresponding input arguments.
These conditions are verified only if the library is built with the preprocessor macro CHECK_ENABLED=1.
The pure procedure(s) documented herein become impure when the ParaMonte library is compiled with preprocessor macro CHECK_ENABLED=1.
By default, these procedures are pure in release build and impure in debug and testing builds.
BLAS/LAPACK equivalent:
The procedures under discussion combine, modernize, and extend the interface and functionalities of Version 3.11 of BLAS/LAPACK routine(s): SGER, DGER, CGERU, ZGERU, CGERC, and ZGERC.
  1. The interface corresponds to CGERC and ZGERC when the input optional argument operationA = transHerm_type() is present.
  2. Otherwise, the interface corresponds to SGER, DGER, CGERU, ZGERU.
See also
netlib::LAPACK
The IBM Engineering and Scientific Subroutine Library.
Developer Reference for Intel® oneAPI Math Kernel Library - Fortran.
Dongarra, J. J.; DuCroz, J.; Hammarling, S.; Hanson, R. J. March 1988. An Extended Set of Fortran Basic Linear Algebra Subprograms. ACM Transactions on Mathematical Software , 14(1):1–17.


Example usage

1program example
2
3 use pm_kind, only: SK, IK, LK
4 use pm_kind, only: RKG => RKS ! all processor type kinds are supported.
5 use pm_kind, only: CKG => CKS ! all processor type kinds are supported.
6 use pm_io, only: display_type
7 use pm_matrixUpdate, only: transHerm
9
10 implicit none
11
12 type(display_type) :: disp
13
14 real(RKG) , parameter :: dummyr = -huge(0._RKG)
15 complex(CKG), parameter :: dumm_cmplx_value = cmplx(-huge(0._CKG), -huge(0._CKG), CKG)
16
17 disp = display_type(file = "main.out.F90")
18
19 block
20
21 real(RKG), allocatable :: RefA(:,:), mat(:,:), vecA(:), vecB(:)
22
23 mat = reshape( [ 1._RKG, 2._RKG, 3._RKG &
24 , 2._RKG, 2._RKG, 4._RKG &
25 , 3._RKG, 2._RKG, 2._RKG &
26 , 4._RKG, 2._RKG, 1._RKG &
27 ], shape = [4, 3], order = [2, 1])
28 RefA = reshape( [ 4._RKG, 8._RKG,12._RKG &
29 , 4._RKG, 6._RKG,10._RKG &
30 , 4._RKG, 4._RKG, 5._RKG &
31 , 8._RKG,10._RKG,13._RKG &
32 ], shape = [4, 3], order = [2, 1])
33 call disp%skip()
34 call disp%show("dummyr ! some dummy value to illustrate functionality of `incA` and `incB` arguments.")
35 call disp%show( dummyr )
36 call disp%show("mat")
37 call disp%show( mat )
38 call disp%show("vecA = [3._RKG, 2._RKG, 1._RKG, 4._RKG]")
39 vecA = [3._RKG, 2._RKG, 1._RKG, 4._RKG]
40 call disp%show("vecB = [1._RKG, dummyr, 2._RKG, dummyr, 3._RKG]")
41 vecB = [1._RKG, dummyr, 2._RKG, dummyr, 3._RKG]
42 call disp%show("call setMatUpdateR1(mat, vecA, vecB, incA = 1_IK, incB = 2_IK, roff = 0_IK)")
43 call setMatUpdateR1(mat, vecA, vecB, incA = 1_IK, incB = 2_IK, roff = 0_IK)
44 call disp%show("mat")
45 call disp%show( mat )
46 call disp%show("mat - RefA")
47 call disp%show( mat - RefA )
48 call disp%skip()
49
50 mat = reshape( [ 1._RKG, 2._RKG, 3._RKG &
51 , 2._RKG, 2._RKG, 4._RKG &
52 , 3._RKG, 2._RKG, 2._RKG &
53 , 4._RKG, 2._RKG, 1._RKG &
54 , dummyr, dummyr, dummyr &
55 , dummyr, dummyr, dummyr &
56 , dummyr, dummyr, dummyr &
57 , dummyr, dummyr, dummyr &
58 , dummyr, dummyr, dummyr &
59 , dummyr, dummyr, dummyr &
60 ], shape = [10, 3], order = [2, 1])
61 call disp%skip()
62 call disp%show("dummyr ! some dummy value to illustrate functionality of `incA` and `incB` arguments.")
63 call disp%show( dummyr )
64 call disp%show("mat")
65 call disp%show( mat )
66 call disp%show("vecA = [3._RKG, 2._RKG, 1._RKG, 4._RKG]")
67 vecA = [3._RKG, 2._RKG, 1._RKG, 4._RKG]
68 call disp%show("vecB = [3._RKG, dummyr, 2._RKG, dummyr, 1._RKG]")
69 vecB = [3._RKG, dummyr, 2._RKG, dummyr, 1._RKG]
70 call disp%show("call setMatUpdateR1(mat, vecA, vecB, incA = 1_IK, incB = -2_IK, roff = 0_IK)")
71 call setMatUpdateR1(mat, vecA, vecB, incA = 1_IK, incB = -2_IK, roff = 0_IK)
72 call disp%show("mat")
73 call disp%show( mat )
74 call disp%skip()
75
76 mat = reshape( [ dummyr, dummyr, dummyr &
77 , dummyr, dummyr, dummyr &
78 , dummyr, dummyr, dummyr &
79 , 1._RKG, 2._RKG, 3._RKG &
80 , 2._RKG, 2._RKG, 4._RKG &
81 , 3._RKG, 2._RKG, 2._RKG &
82 , 4._RKG, 2._RKG, 1._RKG &
83 , dummyr, dummyr, dummyr &
84 , dummyr, dummyr, dummyr &
85 , dummyr, dummyr, dummyr &
86 ], shape = [10, 3], order = [2, 1])
87 call disp%skip()
88 call disp%show("dummyr ! some dummy value to illustrate functionality of `incA` and `incB` arguments.")
89 call disp%show( dummyr )
90 call disp%show("mat")
91 call disp%show( mat )
92 call disp%show("vecA = [3._RKG, dummyr, dummyr, 2._RKG, dummyr, dummyr, 1._RKG, dummyr, dummyr, 4._RKG]")
93 vecA = [3._RKG, dummyr, dummyr, 2._RKG, dummyr, dummyr, 1._RKG, dummyr, dummyr, 4._RKG]
94 call disp%show("vecB = [1._RKG, 2._RKG, 3._RKG]")
95 vecB = [1._RKG, 2._RKG, 3._RKG]
96 call disp%show("call setMatUpdateR1(mat, vecA, vecB, incA = 3_IK, incB = 1_IK, roff = 3_IK)")
97 call setMatUpdateR1(mat, vecA, vecB, incA = 3_IK, incB = 1_IK, roff = 3_IK)
98 call disp%show("mat")
99 call disp%show( mat )
100 call disp%skip()
101
102 mat = reshape( [ 1._RKG, 2._RKG, 3._RKG &
103 , 2._RKG, 2._RKG, 4._RKG &
104 , 3._RKG, 2._RKG, 2._RKG &
105 , 4._RKG, 2._RKG, 1._RKG &
106 ], shape = [4, 3], order = [2, 1])
107 RefA = reshape( [ 7._RKG,14._RKG,21._RKG &
108 , 6._RKG,10._RKG,16._RKG &
109 , 5._RKG, 6._RKG, 8._RKG &
110 ,12._RKG,18._RKG,25._RKG &
111 ], shape = [4, 3], order = [2, 1])
112 call disp%skip()
113 call disp%show("dummyr ! some dummy value to illustrate functionality of `incA` and `incB` arguments.")
114 call disp%show( dummyr )
115 call disp%show("mat")
116 call disp%show( mat )
117 call disp%show("vecA = [3._RKG, 2._RKG, 1._RKG, 4._RKG]")
118 vecA = [3._RKG, 2._RKG, 1._RKG, 4._RKG]
119 call disp%show("vecB = [1._RKG, dummyr, 2._RKG, dummyr, 3._RKG]")
120 vecB = [1._RKG, dummyr, 2._RKG, dummyr, 3._RKG]
121 call disp%show("call setMatUpdateR1(mat, vecA, vecB, alpha = 2._RKG, incA = 1_IK, incB = 2_IK, roff = 0_IK)")
122 call setMatUpdateR1(mat, vecA, vecB, alpha = 2._RKG, incA = 1_IK, incB = 2_IK, roff = 0_IK)
123 call disp%show("mat")
124 call disp%show( mat )
125 call disp%show("mat - RefA")
126 call disp%show( mat - RefA )
127 call disp%skip()
128
129 end block
130
131 call disp%skip
132 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
133 call disp%show("!Complex matrix update of rank one.")
134 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
135 call disp%skip
136
137 block
138
139 complex(CKG), allocatable :: RefA(:,:), mat(:,:), vecA(:), vecB(:)
140
141 mat = reshape( [ (1._CKG, 2._CKG), (3._CKG, 5._CKG), (2._CKG, 0._CKG) &
142 , (2._CKG, 3._CKG), (7._CKG, 9._CKG), (4._CKG, 8._CKG) &
143 , (7._CKG, 4._CKG), (1._CKG, 4._CKG), (6._CKG, 0._CKG) &
144 , (8._CKG, 2._CKG), (2._CKG, 5._CKG), (8._CKG, 0._CKG) &
145 , (9._CKG, 1._CKG), (3._CKG, 6._CKG), (1._CKG, 0._CKG) &
146 , dumm_cmplx_value, dumm_cmplx_value, dumm_cmplx_value &
147 , dumm_cmplx_value, dumm_cmplx_value, dumm_cmplx_value &
148 , dumm_cmplx_value, dumm_cmplx_value, dumm_cmplx_value &
149 , dumm_cmplx_value, dumm_cmplx_value, dumm_cmplx_value &
150 , dumm_cmplx_value, dumm_cmplx_value, dumm_cmplx_value &
151 ], shape = [10, 3], order = [2, 1])
152 RefA = reshape( [ (-2._CKG, 6._CKG), ( 7._CKG,13._CKG), ( 5._CKG, 1._CKG) &
153 , ( 6._CKG,11._CKG), (23._CKG, 9._CKG), ( 8._CKG, 4._CKG) &
154 , ( 6._CKG, 7._CKG), ( 5._CKG, 8._CKG), ( 8._CKG, 0._CKG) &
155 , ( 3._CKG,12._CKG), (14._CKG,21._CKG), (15._CKG, 1._CKG) &
156 , (11._CKG, 5._CKG), (11._CKG, 6._CKG), ( 3._CKG,-2._CKG) &
157 , dumm_cmplx_value, dumm_cmplx_value, dumm_cmplx_value &
158 , dumm_cmplx_value, dumm_cmplx_value, dumm_cmplx_value &
159 , dumm_cmplx_value, dumm_cmplx_value, dumm_cmplx_value &
160 , dumm_cmplx_value, dumm_cmplx_value, dumm_cmplx_value &
161 , dumm_cmplx_value, dumm_cmplx_value, dumm_cmplx_value &
162 ], shape = [10, 3], order = [2, 1])
163
164 call disp%skip()
165 call disp%show("dummyr ! some dummy value to illustrate functionality of `incA` and `incB` arguments.")
166 call disp%show( dummyr )
167 call disp%show("mat")
168 call disp%show( mat )
169 call disp%show("vecA = [(1._CKG, 2._CKG), (4._CKG, 0._CKG), (1._CKG, 1._CKG), (3._CKG, 4._CKG), (2._CKG, 0._CKG)]")
170 vecA = [(1._CKG, 2._CKG), (4._CKG, 0._CKG), (1._CKG, 1._CKG), (3._CKG, 4._CKG), (2._CKG, 0._CKG)]
171 call disp%show("vecB = [(1._CKG, 2._CKG), (4._CKG, 0._CKG), (1._CKG, -1._CKG)]")
172 vecB = [(1._CKG, 2._CKG), (4._CKG, 0._CKG), (1._CKG, -1._CKG)]
173 call disp%show("call setMatUpdateR1(mat, vecA, vecB, incA = 1_IK, incB = 1_IK, roff = 0_IK)")
174 call setMatUpdateR1(mat, vecA, vecB, incA = 1_IK, incB = 1_IK, roff = 0_IK)
175 call disp%show("mat")
176 call disp%show( mat )
177 call disp%skip()
178
179 call disp%skip
180 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
181 call disp%show("!Complex matrix update of rank one with complex conjugate transpose of `Y`.")
182 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
183 call disp%skip
184
185
186 mat = reshape( [ (1._CKG, 2._CKG), (3._CKG, 5._CKG), (2._CKG, 0._CKG) &
187 , (2._CKG, 3._CKG), (7._CKG, 9._CKG), (4._CKG, 8._CKG) &
188 , (7._CKG, 4._CKG), (1._CKG, 4._CKG), (6._CKG, 0._CKG) &
189 , (8._CKG, 2._CKG), (2._CKG, 5._CKG), (8._CKG, 0._CKG) &
190 , (9._CKG, 1._CKG), (3._CKG, 6._CKG), (1._CKG, 0._CKG) &
191 , dumm_cmplx_value, dumm_cmplx_value, dumm_cmplx_value &
192 , dumm_cmplx_value, dumm_cmplx_value, dumm_cmplx_value &
193 , dumm_cmplx_value, dumm_cmplx_value, dumm_cmplx_value &
194 , dumm_cmplx_value, dumm_cmplx_value, dumm_cmplx_value &
195 , dumm_cmplx_value, dumm_cmplx_value, dumm_cmplx_value &
196 ], shape = [10, 3], order = [2, 1])
197 RefA = reshape( [ ( 6._CKG, 2._CKG), ( 7._CKG,13._CKG), (1._CKG, 3._CKG) &
198 , ( 6._CKG,-5._CKG), (23._CKG, 9._CKG), (8._CKG, 12._CKG) &
199 , (10._CKG, 3._CKG), ( 5._CKG, 8._CKG), (6._CKG, 2._CKG) &
200 , (19._CKG, 0._CKG), (14._CKG,21._CKG), (7._CKG, 7._CKG) &
201 , (11._CKG,-3._CKG), (11._CKG, 6._CKG), (3._CKG, 2._CKG) &
202 , dumm_cmplx_value, dumm_cmplx_value, dumm_cmplx_value &
203 , dumm_cmplx_value, dumm_cmplx_value, dumm_cmplx_value &
204 , dumm_cmplx_value, dumm_cmplx_value, dumm_cmplx_value &
205 , dumm_cmplx_value, dumm_cmplx_value, dumm_cmplx_value &
206 , dumm_cmplx_value, dumm_cmplx_value, dumm_cmplx_value &
207 ], shape = [10, 3], order = [2, 1])
208
209 call disp%skip()
210 call disp%show("dummyr ! some dummy value to illustrate functionality of `incA` and `incB` arguments.")
211 call disp%show( dummyr )
212 call disp%show("mat")
213 call disp%show( mat )
214 call disp%show("vecA = [(1._CKG, 2._CKG), (4._CKG, 0._CKG), (1._CKG, 1._CKG), (3._CKG, 4._CKG), (2._CKG, 0._CKG)]")
215 vecA = [(1._CKG, 2._CKG), (4._CKG, 0._CKG), (1._CKG, 1._CKG), (3._CKG, 4._CKG), (2._CKG, 0._CKG)]
216 call disp%show("vecB = [(1._CKG, 2._CKG), (4._CKG, 0._CKG), (1._CKG, -1._CKG)]")
217 vecB = [(1._CKG, 2._CKG), (4._CKG, 0._CKG), (1._CKG, -1._CKG)]
218 call disp%show("call setMatUpdateR1(mat, vecA, vecB, operationB = transHerm, incA = 1_IK, incB = 1_IK, roff = 0_IK)")
219 call setMatUpdateR1(mat, vecA, vecB, operationB = transHerm, incA = 1_IK, incB = 1_IK, roff = 0_IK)
220 call disp%show("mat")
221 call disp%show( mat )
222 call disp%skip()
223
224 end block
225
226end program example
This is a generic method of the derived type display_type with pass attribute.
Definition: pm_io.F90:11726
This is a generic method of the derived type display_type with pass attribute.
Definition: pm_io.F90:11508
This module contains classes and procedures for input/output (IO) or generic display operations on st...
Definition: pm_io.F90:252
type(display_type) disp
This is a scalar module variable an object of type display_type for general display.
Definition: pm_io.F90:11393
This module defines the relevant Fortran kind type-parameters frequently used in the ParaMonte librar...
Definition: pm_kind.F90:268
integer, parameter LK
The default logical kind in the ParaMonte library: kind(.true.) in Fortran, kind(....
Definition: pm_kind.F90:541
integer, parameter CKS
The single-precision complex kind in Fortran mode. On most platforms, this is a 32-bit real kind.
Definition: pm_kind.F90:570
integer, parameter IK
The default integer kind in the ParaMonte library: int32 in Fortran, c_int32_t in C-Fortran Interoper...
Definition: pm_kind.F90:540
integer, parameter SK
The default character kind in the ParaMonte library: kind("a") in Fortran, c_char in C-Fortran Intero...
Definition: pm_kind.F90:539
integer, parameter RKS
The single-precision real kind in Fortran mode. On most platforms, this is an 32-bit real kind.
Definition: pm_kind.F90:567
Generate and return an object of type display_type.
Definition: pm_io.F90:10282

Example Unix compile command via Intel ifort compiler
1#!/usr/bin/env sh
2rm main.exe
3ifort -fpp -standard-semantics -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
4./main.exe

Example Windows Batch compile command via Intel ifort compiler
1del main.exe
2set PATH=..\..\..\lib;%PATH%
3ifort /fpp /standard-semantics /O3 /I:..\..\..\include main.F90 ..\..\..\lib\libparamonte*.lib /exe:main.exe
4main.exe

Example Unix / MinGW compile command via GNU gfortran compiler
1#!/usr/bin/env sh
2rm main.exe
3gfortran -cpp -ffree-line-length-none -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
4./main.exe

Example output
1
2dummyr ! some dummy value to illustrate functionality of `incA` and `incB` arguments.
3-0.340282347E+39
4mat
5+1.00000000, +2.00000000, +3.00000000
6+2.00000000, +2.00000000, +4.00000000
7+3.00000000, +2.00000000, +2.00000000
8+4.00000000, +2.00000000, +1.00000000
9vecA = [3._RKG, 2._RKG, 1._RKG, 4._RKG]
10vecB = [1._RKG, dummyr, 2._RKG, dummyr, 3._RKG]
11call setMatUpdateR1(mat, vecA, vecB, incA = 1_IK, incB = 2_IK, roff = 0_IK)
12mat
13+4.00000000, +8.00000000, +12.0000000
14+4.00000000, +6.00000000, +10.0000000
15+4.00000000, +4.00000000, +5.00000000
16+8.00000000, +10.0000000, +13.0000000
17mat - RefA
18+0.00000000, +0.00000000, +0.00000000
19+0.00000000, +0.00000000, +0.00000000
20+0.00000000, +0.00000000, +0.00000000
21+0.00000000, +0.00000000, +0.00000000
22
23
24dummyr ! some dummy value to illustrate functionality of `incA` and `incB` arguments.
25-0.340282347E+39
26mat
27+1.00000000, +2.00000000, +3.00000000
28+2.00000000, +2.00000000, +4.00000000
29+3.00000000, +2.00000000, +2.00000000
30+4.00000000, +2.00000000, +1.00000000
31-0.340282347E+39, -0.340282347E+39, -0.340282347E+39
32-0.340282347E+39, -0.340282347E+39, -0.340282347E+39
33-0.340282347E+39, -0.340282347E+39, -0.340282347E+39
34-0.340282347E+39, -0.340282347E+39, -0.340282347E+39
35-0.340282347E+39, -0.340282347E+39, -0.340282347E+39
36-0.340282347E+39, -0.340282347E+39, -0.340282347E+39
37vecA = [3._RKG, 2._RKG, 1._RKG, 4._RKG]
38vecB = [3._RKG, dummyr, 2._RKG, dummyr, 1._RKG]
39call setMatUpdateR1(mat, vecA, vecB, incA = 1_IK, incB = -2_IK, roff = 0_IK)
40mat
41+4.00000000, +8.00000000, +12.0000000
42+4.00000000, +6.00000000, +10.0000000
43+4.00000000, +4.00000000, +5.00000000
44+8.00000000, +10.0000000, +13.0000000
45-0.340282347E+39, -0.340282347E+39, -0.340282347E+39
46-0.340282347E+39, -0.340282347E+39, -0.340282347E+39
47-0.340282347E+39, -0.340282347E+39, -0.340282347E+39
48-0.340282347E+39, -0.340282347E+39, -0.340282347E+39
49-0.340282347E+39, -0.340282347E+39, -0.340282347E+39
50-0.340282347E+39, -0.340282347E+39, -0.340282347E+39
51
52
53dummyr ! some dummy value to illustrate functionality of `incA` and `incB` arguments.
54-0.340282347E+39
55mat
56-0.340282347E+39, -0.340282347E+39, -0.340282347E+39
57-0.340282347E+39, -0.340282347E+39, -0.340282347E+39
58-0.340282347E+39, -0.340282347E+39, -0.340282347E+39
59+1.00000000, +2.00000000, +3.00000000
60+2.00000000, +2.00000000, +4.00000000
61+3.00000000, +2.00000000, +2.00000000
62+4.00000000, +2.00000000, +1.00000000
63-0.340282347E+39, -0.340282347E+39, -0.340282347E+39
64-0.340282347E+39, -0.340282347E+39, -0.340282347E+39
65-0.340282347E+39, -0.340282347E+39, -0.340282347E+39
66vecA = [3._RKG, dummyr, dummyr, 2._RKG, dummyr, dummyr, 1._RKG, dummyr, dummyr, 4._RKG]
67vecB = [1._RKG, 2._RKG, 3._RKG]
68call setMatUpdateR1(mat, vecA, vecB, incA = 3_IK, incB = 1_IK, roff = 3_IK)
69mat
70-0.340282347E+39, -0.340282347E+39, -0.340282347E+39
71-0.340282347E+39, -0.340282347E+39, -0.340282347E+39
72-0.340282347E+39, -0.340282347E+39, -0.340282347E+39
73+4.00000000, +8.00000000, +12.0000000
74+4.00000000, +6.00000000, +10.0000000
75+4.00000000, +4.00000000, +5.00000000
76+8.00000000, +10.0000000, +13.0000000
77-0.340282347E+39, -0.340282347E+39, -0.340282347E+39
78-0.340282347E+39, -0.340282347E+39, -0.340282347E+39
79-0.340282347E+39, -0.340282347E+39, -0.340282347E+39
80
81
82dummyr ! some dummy value to illustrate functionality of `incA` and `incB` arguments.
83-0.340282347E+39
84mat
85+1.00000000, +2.00000000, +3.00000000
86+2.00000000, +2.00000000, +4.00000000
87+3.00000000, +2.00000000, +2.00000000
88+4.00000000, +2.00000000, +1.00000000
89vecA = [3._RKG, 2._RKG, 1._RKG, 4._RKG]
90vecB = [1._RKG, dummyr, 2._RKG, dummyr, 3._RKG]
91call setMatUpdateR1(mat, vecA, vecB, alpha = 2._RKG, incA = 1_IK, incB = 2_IK, roff = 0_IK)
92mat
93+7.00000000, +14.0000000, +21.0000000
94+6.00000000, +10.0000000, +16.0000000
95+5.00000000, +6.00000000, +8.00000000
96+12.0000000, +18.0000000, +25.0000000
97mat - RefA
98+0.00000000, +0.00000000, +0.00000000
99+0.00000000, +0.00000000, +0.00000000
100+0.00000000, +0.00000000, +0.00000000
101+0.00000000, +0.00000000, +0.00000000
102
103
104!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
105!Complex matrix update of rank one.
106!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
107
108
109dummyr ! some dummy value to illustrate functionality of `incA` and `incB` arguments.
110-0.340282347E+39
111mat
112(+1.00000000, +2.00000000), (+3.00000000, +5.00000000), (+2.00000000, +0.00000000)
113(+2.00000000, +3.00000000), (+7.00000000, +9.00000000), (+4.00000000, +8.00000000)
114(+7.00000000, +4.00000000), (+1.00000000, +4.00000000), (+6.00000000, +0.00000000)
115(+8.00000000, +2.00000000), (+2.00000000, +5.00000000), (+8.00000000, +0.00000000)
116(+9.00000000, +1.00000000), (+3.00000000, +6.00000000), (+1.00000000, +0.00000000)
117(-0.340282347E+39, -0.340282347E+39), (-0.340282347E+39, -0.340282347E+39), (-0.340282347E+39, -0.340282347E+39)
118(-0.340282347E+39, -0.340282347E+39), (-0.340282347E+39, -0.340282347E+39), (-0.340282347E+39, -0.340282347E+39)
119(-0.340282347E+39, -0.340282347E+39), (-0.340282347E+39, -0.340282347E+39), (-0.340282347E+39, -0.340282347E+39)
120(-0.340282347E+39, -0.340282347E+39), (-0.340282347E+39, -0.340282347E+39), (-0.340282347E+39, -0.340282347E+39)
121(-0.340282347E+39, -0.340282347E+39), (-0.340282347E+39, -0.340282347E+39), (-0.340282347E+39, -0.340282347E+39)
122vecA = [(1._CKG, 2._CKG), (4._CKG, 0._CKG), (1._CKG, 1._CKG), (3._CKG, 4._CKG), (2._CKG, 0._CKG)]
123vecB = [(1._CKG, 2._CKG), (4._CKG, 0._CKG), (1._CKG, -1._CKG)]
124call setMatUpdateR1(mat, vecA, vecB, incA = 1_IK, incB = 1_IK, roff = 0_IK)
125mat
126(-2.00000000, +6.00000000), (+7.00000000, +13.0000000), (+5.00000000, +1.00000000)
127(+6.00000000, +11.0000000), (+23.0000000, +9.00000000), (+8.00000000, +4.00000000)
128(+6.00000000, +7.00000000), (+5.00000000, +8.00000000), (+8.00000000, +0.00000000)
129(+3.00000000, +12.0000000), (+14.0000000, +21.0000000), (+15.0000000, +1.00000000)
130(+11.0000000, +5.00000000), (+11.0000000, +6.00000000), (+3.00000000, -2.00000000)
131(-0.340282347E+39, -0.340282347E+39), (-0.340282347E+39, -0.340282347E+39), (-0.340282347E+39, -0.340282347E+39)
132(-0.340282347E+39, -0.340282347E+39), (-0.340282347E+39, -0.340282347E+39), (-0.340282347E+39, -0.340282347E+39)
133(-0.340282347E+39, -0.340282347E+39), (-0.340282347E+39, -0.340282347E+39), (-0.340282347E+39, -0.340282347E+39)
134(-0.340282347E+39, -0.340282347E+39), (-0.340282347E+39, -0.340282347E+39), (-0.340282347E+39, -0.340282347E+39)
135(-0.340282347E+39, -0.340282347E+39), (-0.340282347E+39, -0.340282347E+39), (-0.340282347E+39, -0.340282347E+39)
136
137
138!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
139!Complex matrix update of rank one with complex conjugate transpose of `Y`.
140!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
141
142
143dummyr ! some dummy value to illustrate functionality of `incA` and `incB` arguments.
144-0.340282347E+39
145mat
146(+1.00000000, +2.00000000), (+3.00000000, +5.00000000), (+2.00000000, +0.00000000)
147(+2.00000000, +3.00000000), (+7.00000000, +9.00000000), (+4.00000000, +8.00000000)
148(+7.00000000, +4.00000000), (+1.00000000, +4.00000000), (+6.00000000, +0.00000000)
149(+8.00000000, +2.00000000), (+2.00000000, +5.00000000), (+8.00000000, +0.00000000)
150(+9.00000000, +1.00000000), (+3.00000000, +6.00000000), (+1.00000000, +0.00000000)
151(-0.340282347E+39, -0.340282347E+39), (-0.340282347E+39, -0.340282347E+39), (-0.340282347E+39, -0.340282347E+39)
152(-0.340282347E+39, -0.340282347E+39), (-0.340282347E+39, -0.340282347E+39), (-0.340282347E+39, -0.340282347E+39)
153(-0.340282347E+39, -0.340282347E+39), (-0.340282347E+39, -0.340282347E+39), (-0.340282347E+39, -0.340282347E+39)
154(-0.340282347E+39, -0.340282347E+39), (-0.340282347E+39, -0.340282347E+39), (-0.340282347E+39, -0.340282347E+39)
155(-0.340282347E+39, -0.340282347E+39), (-0.340282347E+39, -0.340282347E+39), (-0.340282347E+39, -0.340282347E+39)
156vecA = [(1._CKG, 2._CKG), (4._CKG, 0._CKG), (1._CKG, 1._CKG), (3._CKG, 4._CKG), (2._CKG, 0._CKG)]
157vecB = [(1._CKG, 2._CKG), (4._CKG, 0._CKG), (1._CKG, -1._CKG)]
158call setMatUpdateR1(mat, vecA, vecB, operationB = transHerm, incA = 1_IK, incB = 1_IK, roff = 0_IK)
159mat
160(-2.00000000, +6.00000000), (+7.00000000, +13.0000000), (+5.00000000, +1.00000000)
161(+6.00000000, +11.0000000), (+23.0000000, +9.00000000), (+8.00000000, +4.00000000)
162(+6.00000000, +7.00000000), (+5.00000000, +8.00000000), (+8.00000000, +0.00000000)
163(+3.00000000, +12.0000000), (+14.0000000, +21.0000000), (+15.0000000, +1.00000000)
164(+11.0000000, +5.00000000), (+11.0000000, +6.00000000), (+3.00000000, -2.00000000)
165(-0.340282347E+39, -0.340282347E+39), (-0.340282347E+39, -0.340282347E+39), (-0.340282347E+39, -0.340282347E+39)
166(-0.340282347E+39, -0.340282347E+39), (-0.340282347E+39, -0.340282347E+39), (-0.340282347E+39, -0.340282347E+39)
167(-0.340282347E+39, -0.340282347E+39), (-0.340282347E+39, -0.340282347E+39), (-0.340282347E+39, -0.340282347E+39)
168(-0.340282347E+39, -0.340282347E+39), (-0.340282347E+39, -0.340282347E+39), (-0.340282347E+39, -0.340282347E+39)
169(-0.340282347E+39, -0.340282347E+39), (-0.340282347E+39, -0.340282347E+39), (-0.340282347E+39, -0.340282347E+39)
170
171
Test:
test_pm_matrixUpdate
Todo:
Normal Priority: Benchmarks comparing this interface with LAPACK routines and conventional approach should be added to the documentation.


Final Remarks


If you believe this algorithm or its documentation can be improved, we appreciate your contribution and help to edit this page's documentation and source file on GitHub.
For details on the naming abbreviations, see this page.
For details on the naming conventions, see this page.
This software is distributed under the MIT license with additional terms outlined below.

  1. If you use any parts or concepts from this library to any extent, please acknowledge the usage by citing the relevant publications of the ParaMonte library.
  2. If you regenerate any parts/ideas from this library in a programming environment other than those currently supported by this ParaMonte library (i.e., other than C, C++, Fortran, MATLAB, Python, R), please also ask the end users to cite this original ParaMonte library.

This software is available to the public under a highly permissive license.
Help us justify its continued development and maintenance by acknowledging its benefit to society, distributing it, and contributing to it.

Author:
Fatemeh Bagheri, Tuesday 11:34 PM, August 10, 2021, Dallas, TX

Definition at line 4380 of file pm_matrixUpdate.F90.


The documentation for this interface was generated from the following file: