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

Generate and return the full inverse of a general or triangular matrix or a subset of the inverse of a positive-definite matrix complementary to its specified Cholesky factorization subset.
More...

Detailed Description

Generate and return the full inverse of a general or triangular matrix or a subset of the inverse of a positive-definite matrix complementary to its specified Cholesky factorization subset.

Parameters
[in,out]inv: The output or input/output matrix of the same type, kind, and shape as the input mat containing the full inverse matrix or a subset of it:
  1. If the specified input mat is a,
    1. lower-diagonal triangular matrix,
    2. upper-diagonal triangular matrix,
    3. lower-unit-diagonal triangular matrix,
    4. upper-unit-diagonal triangular matrix,
    5. LUP factorization of a general square matrix,
    6. Cholesky factorization of a positive-definite square matrix while the optional input argument subset is missing,
    then inv has intent(out) and shall contain the full inverse of the matrix corresponding to the specified mat.
  2. If the specified input mat is a Cholesky factorization, and the input argument subset is present, then inv has intent(inout).
    On output, only the specified subset of inv shall be updated with the corresponding inverse matrix triangle while the opposite triangle of inv remains untouched.
    This storage scheme for the inverse matrix is very useful for efficient packing both the Cholesky factorization and inverse of a matrix in a single contiguous almost-squqare-shaped matrix (e.g., inv(1 : ndim, 0 : ndim)).
[in]mat: The input array of rank 2 of square shape (1 : ndim, 1 : ndim) of,
  1. type complex of kind any supported by the processor (e.g., CK, CK32, CK64, or CK128),
  2. type real of kind any supported by the processor (e.g., RK, RK32, RK64, or RK128),
containing a.
  1. upper-diagonal triangular matrix,
  2. lower-diagonal triangular matrix,
  3. upper-unit-diagonal triangular matrix,
  4. lower-unit-diagonal triangular matrix,
  5. LUP factorization of a general square matrix,
  6. lower Cholesky factorization of a positive-definite matrix,
  7. upper Cholesky factorization of a positive-definite matrix,
whose inverse must be computed.
The class of the input mat is determined by the input argument auxil.
[in,out]auxil: The input scalar constant that can be:
  1. The input scalar constant upperDiag implying that the input mat is an upper-diagonal triangular matrix whose inverse is to be computed.
  2. The input scalar constant lowerDiag implying that the input mat is an lower-diagonal triangular matrix whose inverse is to be computed.
  3. The input contiguous vector of shape (1 : ndim) containing the row permutations corresponding to the LU factorization of the matrix whose inverse is to be computed.
    This argument is automatically returned as rperm along with the LU factorization from the generic interfaces of pm_matrixLUP.
    This value must be specified if and only if the input argument mat contains the LU factorization of the matrix whose inverse must be computed.
  4. The input scalar constant choUpp implying that only the upper-diagonal Cholesky factorization of the positive-definite matrix whose inverse is to be computed.
  5. The input scalar constant choLow implying that only the lower-diagonal Cholesky factorization of the positive-definite matrix whose inverse is to be computed.
[in]subset: The input scalar that can be either,
  1. the constant uppDia implying that only the upper-diagonal triangular block of inv should be returned on output while the lower triangular part of inv is not referenced within the algorithm.
  2. the constant lowDia implying that the lower-diagonal triangular block of inv should be returned on output while the lower triangular part of inv is not referenced within the algorithm.
This argument is merely a convenience to differentiate the different procedure functionalities within this generic interface.
(optional. It can be present only if auxil is set to either choLow or choUpp.)


Possible calling interfaces

use pm_matrixInv, only: choLow, choUpp
use pm_matrixInv, only: upperDiag, lowerDiag
call setMatInv(inv(1:ndim, 1:ndim), mat(1:ndim, 1:ndim), auxil)
call setMatInv(inv(1:ndim, 1:ndim), mat(1:ndim, 1:ndim), auxil, subset) ! only if subset = choLow, choUpp.
!
Generate and return the full inverse of a general or triangular matrix or a subset of the inverse of ...
This module contains abstract and concrete derived types and procedures related to the inversion of s...
Warning
The condition size(mat, 1) == size(mat, 2)) must hold for the corresponding input arguments.
The condition all(shape(inv) == shape(mat)) must hold for the corresponding input arguments.
The condition size(auxil) == shape(mat, 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.
See also
getMatInv
setMatInv
getMatChol
setMatChol
setMatLUP
lowDia
uppDia
Intel Fortran LAPACK documentation
BLAS/LAPACK equivalent:
The procedures under discussion combine, modernize, and extend the interface and functionalities of Version 3.11 of BLAS/LAPACK routine(s): SGETRI, DGETRI, CGETRI, and ZGETRI.
SPFTRI, DPFTRI, CPFTRI, and ZPFTRI.
SPOTRI, DPOTRI, CPOTRI, and ZPOTRI.
STRTRI, DTRTRI, CTRTRI, and ZTRTRI.


Example usage

1program example
2
3 use pm_io, only: getFormat
4 use pm_kind, only: SK, IK, LK, TKG => RKS
5 use pm_io, only: display_type
6 use pm_distUnif, only: getUnifRand
7 use pm_matrixInv, only: setMatInv
8 use pm_matrixInv, only: choUpp, choLow
9 use pm_matrixInv, only: upperDiag, lowerDiag
10 use pm_matrixInv, only: upperUnit, lowerUnit
11 use pm_matrixChol, only: getMatChol, uppDia, lowDia
12 use pm_matrixInit, only: getMatInit, uppLowDia
13 use pm_distCov, only: getCovRand
14 use pm_matrixCopy, only: rdpack, uppDia
15 use pm_arrayResize, only: setResized
16 use pm_matrixCopy, only: setMatCopy
17 use pm_matrixCopy, only: transHerm
18 use pm_matrixInit, only: setMatInit
19 use pm_arrayFill, only: getFilled
20 use pm_matrixLUP, only: setMatLUP
21 use pm_err, only: setAsserted
22 use pm_val2str, only: getStr
23
24 implicit none
25
26 integer(IK):: itry, info, ndim, ntry = 10
27 character(:, SK), allocatable :: cform, rform
28
29 type(display_type) :: disp
30 disp = display_type(file = "main.out.F90")
31
32 cform = getFormat(mold = [(0._TKG, 0._TKG)], ed = SK_"f", ndigit = 2_IK, signed = .true._LK)
33 rform = getFormat(mold = [0._TKG], ed = SK_"f", ndigit = 2_IK, signed = .true._LK)
34
35 call disp%skip()
36 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
37 call disp%show("! Compute inverse of an upperDiag triangular real matrix.")
38 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
39 call disp%skip()
40
41 block
42 use pm_kind, only: TKG => RKS
43 real(TKG), allocatable :: mat(:,:), inv(:,:), mul(:,:)
44 do itry = 1, ntry
45 call disp%skip
46 call disp%show("ndim = getUnifRand(1_IK, 6_IK)")
47 ndim = getUnifRand(1_IK, 6_IK)
48 call disp%show("ndim ! matrix rank")
49 call disp%show( ndim )
50 call disp%show("mat = getUnifRand(1_IK, 9_IK, ndim, ndim)")
51 mat = getUnifRand(1_IK, 9_IK, ndim, ndim)
52 call disp%show("call setMatInit(mat(2 : ndim, 1 : ndim - 1), lowDia, 0._TKG, 0._TKG)")
53 call setMatInit(mat(2 : ndim, 1 : ndim - 1), lowDia, 0._TKG, 0._TKG)
54 call disp%show("mat")
55 call disp%show( mat , format = rform )
56 call disp%show("call setResized(inv, shape(mat, IK))")
57 call setResized(inv, shape(mat, IK))
58 call disp%show("call setMatInv(inv, mat, upperDiag)")
59 call setMatInv(inv, mat, upperDiag)
60 call disp%show("inv")
61 call disp%show( inv , format = rform )
62 call disp%show("mul = matmul(mat, inv)")
63 mul = matmul(mat, inv)
64 call disp%show("mul")
65 call disp%show( mul , format = rform )
66 call disp%skip
67 end do
68 end block
69
70 call disp%skip()
71 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
72 call disp%show("! Compute inverse of a upperDiag triangular complex matrix.")
73 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
74 call disp%skip()
75
76 block
77 use pm_kind, only: TKG => RKS
78 complex(TKG), allocatable :: mat(:,:), inv(:,:), mul(:,:)
79 do itry = 1, ntry
80 call disp%skip
81 call disp%show("ndim = getUnifRand(1_IK, 6_IK)")
82 ndim = getUnifRand(1_IK, 6_IK)
83 call disp%show("ndim ! matrix rank")
84 call disp%show( ndim )
85 call disp%show("mat = getUnifRand((1., 1.), (2., 2.), ndim, ndim)")
86 mat = getUnifRand((1., 1.), (2., 2.), ndim, ndim)
87 call disp%show("call setMatInit(mat(2 : ndim, 1 : ndim - 1), lowDia, (0._TKG, 0._TKG), (0._TKG, 0._TKG))")
88 call setMatInit(mat(2 : ndim, 1 : ndim - 1), lowDia, (0._TKG, 0._TKG), (0._TKG, 0._TKG))
89 call disp%show("mat")
90 call disp%show( mat , format = cform )
91 call disp%show("call setResized(inv, shape(mat, IK))")
92 call setResized(inv, shape(mat, IK))
93 call disp%show("call setMatInv(inv, mat, upperDiag)")
94 call setMatInv(inv, mat, upperDiag)
95 call disp%show("inv")
96 call disp%show( inv , format = cform )
97 call disp%show("mul = matmul(mat, inv)")
98 mul = matmul(mat, inv)
99 call disp%show("mul")
100 call disp%show( mul , format = cform )
101 call disp%skip
102 end do
103 end block
104
105 call disp%skip()
106 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
107 call disp%show("! Compute inverse of a lowerDiag triangular real matrix.")
108 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
109 call disp%skip()
110
111 block
112 use pm_kind, only: TKG => RKS
113 real(TKG), allocatable :: mat(:,:), inv(:,:), mul(:,:)
114 do itry = 1, ntry
115 call disp%skip
116 call disp%show("ndim = getUnifRand(1_IK, 6_IK)")
117 ndim = getUnifRand(1_IK, 6_IK)
118 call disp%show("ndim ! matrix rank")
119 call disp%show( ndim )
120 call disp%show("mat = getUnifRand(1_IK, 9_IK, ndim, ndim)")
121 mat = getUnifRand(1_IK, 9_IK, ndim, ndim)
122 call disp%show("call setMatInit(mat(1 : ndim - 1, 2 : ndim), uppDia, 0._TKG, 0._TKG)")
123 call setMatInit(mat(1 : ndim - 1, 2 : ndim), uppDia, 0._TKG, 0._TKG)
124 call disp%show("mat")
125 call disp%show( mat , format = rform )
126 call disp%show("call setResized(inv, shape(mat, IK))")
127 call setResized(inv, shape(mat, IK))
128 call disp%show("call setMatInv(inv, mat, lowerDiag)")
129 call setMatInv(inv, mat, lowerDiag)
130 call disp%show("inv")
131 call disp%show( inv , format = rform )
132 call disp%show("mul = matmul(mat, inv)")
133 mul = matmul(mat, inv)
134 call disp%show("mul")
135 call disp%show( mul , format = rform )
136 call disp%skip
137 end do
138 end block
139
140 call disp%skip()
141 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
142 call disp%show("! Compute inverse of a lowerDiag triangular complex matrix.")
143 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
144 call disp%skip()
145
146 block
147 use pm_kind, only: TKG => RKS
148 complex(TKG), allocatable :: mat(:,:), inv(:,:), mul(:,:)
149 do itry = 1, ntry
150 call disp%skip
151 call disp%show("ndim = getUnifRand(1_IK, 6_IK)")
152 ndim = getUnifRand(1_IK, 6_IK)
153 call disp%show("ndim ! matrix rank")
154 call disp%show( ndim )
155 call disp%show("mat = getUnifRand((1., 1.), (2., 2.), ndim, ndim)")
156 mat = getUnifRand((1., 1.), (2., 2.), ndim, ndim)
157 call disp%show("call setMatInit(mat(1 : ndim - 1, 2 : ndim), uppDia, (0._TKG, 0._TKG), (0._TKG, 0._TKG))")
158 call setMatInit(mat(1 : ndim - 1, 2 : ndim), uppDia, (0._TKG, 0._TKG), (0._TKG, 0._TKG))
159 call disp%show("mat")
160 call disp%show( mat , format = cform )
161 call disp%show("call setResized(inv, shape(mat, IK))")
162 call setResized(inv, shape(mat, IK))
163 call disp%show("call setMatInv(inv, mat, lowerDiag)")
164 call setMatInv(inv, mat, lowerDiag)
165 call disp%show("inv")
166 call disp%show( inv , format = cform )
167 call disp%show("mul = matmul(mat, inv)")
168 mul = matmul(mat, inv)
169 call disp%show("mul")
170 call disp%show( mul , format = cform )
171 call disp%skip
172 end do
173 end block
174
175 call disp%skip()
176 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
177 call disp%show("! Compute inverse of a upperUnit triangular real matrix.")
178 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
179 call disp%skip()
180
181 block
182 use pm_kind, only: TKG => RKS
183 real(TKG), allocatable :: mat(:,:), inv(:,:), mul(:,:)
184 do itry = 1, ntry
185 call disp%skip
186 call disp%show("ndim = getUnifRand(1_IK, 6_IK)")
187 ndim = getUnifRand(1_IK, 6_IK)
188 call disp%show("ndim ! matrix rank")
189 call disp%show( ndim )
190 call disp%show("mat = getUnifRand(1_IK, 9_IK, ndim, ndim)")
191 mat = getUnifRand(1_IK, 9_IK, ndim, ndim)
192 call disp%show("call setMatInit(mat, lowDia, 0._TKG, 1._TKG)")
193 call setMatInit(mat, lowDia, 0._TKG, 1._TKG)
194 call disp%show("mat")
195 call disp%show( mat , format = rform )
196 call disp%show("call setResized(inv, shape(mat, IK))")
197 call setResized(inv, shape(mat, IK))
198 call disp%show("call setMatInv(inv, mat, upperUnit)")
199 call setMatInv(inv, mat, upperUnit)
200 call disp%show("inv")
201 call disp%show( inv , format = rform )
202 call disp%show("mul = matmul(mat, inv)")
203 mul = matmul(mat, inv)
204 call disp%show("mul")
205 call disp%show( mul , format = rform )
206 call disp%skip
207 end do
208 end block
209
210 call disp%skip()
211 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
212 call disp%show("! Compute inverse of a upperUnit triangular complex matrix.")
213 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
214 call disp%skip()
215
216 block
217 use pm_kind, only: TKG => RKS
218 complex(TKG), allocatable :: mat(:,:), inv(:,:), mul(:,:)
219 do itry = 1, ntry
220 call disp%skip
221 call disp%show("ndim = getUnifRand(1_IK, 6_IK)")
222 ndim = getUnifRand(1_IK, 6_IK)
223 call disp%show("ndim ! matrix rank")
224 call disp%show( ndim )
225 call disp%show("mat = getUnifRand((-1., -1.), (+1., +1.), ndim, ndim)")
226 mat = getUnifRand((-1., -1.), (+1., +1.), ndim, ndim)
227 call disp%show("call setMatInit(mat, lowDia, (0._TKG, 0._TKG), (1._TKG, 0._TKG))")
228 call setMatInit(mat, lowDia, (0._TKG, 0._TKG), (1._TKG, 0._TKG))
229 call disp%show("mat")
230 call disp%show( mat , format = cform )
231 call disp%show("call setResized(inv, shape(mat, IK))")
232 call setResized(inv, shape(mat, IK))
233 call disp%show("call setMatInv(inv, mat, upperUnit)")
234 call setMatInv(inv, mat, upperUnit)
235 call disp%show("inv")
236 call disp%show( inv , format = cform )
237 call disp%show("mul = matmul(mat, inv)")
238 mul = matmul(mat, inv)
239 call disp%show("mul")
240 call disp%show( mul , format = cform )
241 call disp%skip
242 end do
243 end block
244
245 call disp%skip()
246 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
247 call disp%show("! Compute inverse of a lowerUnit triangular real matrix.")
248 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
249 call disp%skip()
250
251 block
252 use pm_kind, only: TKG => RKS
253 real(TKG), allocatable :: mat(:,:), inv(:,:), mul(:,:)
254 do itry = 1, ntry
255 call disp%skip
256 call disp%show("ndim = getUnifRand(1_IK, 6_IK)")
257 ndim = getUnifRand(1_IK, 6_IK)
258 call disp%show("ndim ! matrix rank")
259 call disp%show( ndim )
260 call disp%show("mat = getUnifRand(1_IK, 9_IK, ndim, ndim)")
261 mat = getUnifRand(1_IK, 9_IK, ndim, ndim)
262 call disp%show("call setMatInit(mat, uppDia, 0._TKG, 1._TKG)")
263 call setMatInit(mat, uppDia, 0._TKG, 1._TKG)
264 call disp%show("mat")
265 call disp%show( mat , format = rform )
266 call disp%show("call setResized(inv, shape(mat, IK))")
267 call setResized(inv, shape(mat, IK))
268 call disp%show("call setMatInv(inv, mat, lowerUnit)")
269 call setMatInv(inv, mat, lowerUnit)
270 call disp%show("inv")
271 call disp%show( inv , format = rform )
272 call disp%show("mul = matmul(mat, inv)")
273 mul = matmul(mat, inv)
274 call disp%show("mul")
275 call disp%show( mul , format = rform )
276 call disp%skip
277 end do
278 end block
279
280 call disp%skip()
281 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
282 call disp%show("! Compute inverse of a lowerUnit triangular complex matrix.")
283 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
284 call disp%skip()
285
286 block
287 use pm_kind, only: TKG => RKS
288 complex(TKG), allocatable :: mat(:,:), inv(:,:), mul(:,:)
289 do itry = 1, ntry
290 call disp%skip
291 call disp%show("ndim = getUnifRand(1_IK, 6_IK)")
292 ndim = getUnifRand(1_IK, 6_IK)
293 call disp%show("ndim ! matrix rank")
294 call disp%show( ndim )
295 call disp%show("mat = getUnifRand((-1., -1.), (+1., +1.), ndim, ndim)")
296 mat = getUnifRand((-1., -1.), (+1., +1.), ndim, ndim)
297 call disp%show("call setMatInit(mat, uppDia, (0._TKG, 0._TKG), (1._TKG, 0._TKG))")
298 call setMatInit(mat, uppDia, (0._TKG, 0._TKG), (1._TKG, 0._TKG))
299 call disp%show("mat")
300 call disp%show( mat , format = cform )
301 call disp%show("call setResized(inv, shape(mat, IK))")
302 call setResized(inv, shape(mat, IK))
303 call disp%show("call setMatInv(inv, mat, lowerUnit)")
304 call setMatInv(inv, mat, lowerUnit)
305 call disp%show("inv")
306 call disp%show( inv , format = cform )
307 call disp%show("mul = matmul(mat, inv)")
308 mul = matmul(mat, inv)
309 call disp%show("mul")
310 call disp%show( mul , format = cform )
311 call disp%skip
312 end do
313 end block
314
315 call disp%skip()
316 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
317 call disp%show("! Compute inverse of a general real matrix by passing its LUP factorization.")
318 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
319 call disp%skip()
320
321 block
322 use pm_kind, only: TKG => RKS
323 integer(IK), allocatable :: rperm(:)
324 real(TKG), allocatable :: mat(:,:), lup(:,:), inv(:,:), mul(:,:)
325 do itry = 1, ntry
326 call disp%skip
327 call disp%show("mat = reshape([1, 0, 2, -1, 5, 0, 0, 3, -9], shape = [3,3], order = [2, 1])")
328 mat = reshape([1, 0, 2, -1, 5, 0, 0, 3, -9], shape = [3,3], order = [2, 1])
329 call disp%show("mat")
330 call disp%show( mat , format = rform )
331 call disp%show("call setResized(rperm, size(mat, 1, IK))")
332 call setResized(rperm, size(mat, 1, IK))
333 call disp%show("lup = mat")
334 lup = mat
335 call disp%show("lup")
336 call disp%show( lup , format = rform )
337 call disp%show("call setMatLUP(lup, rperm, info) ! compute the LUP factorization of the matrix.")
338 call setMatLUP(lup, rperm, info)
339 call disp%show("if (info /= 0) error stop 'LUP factorization failed.'")
340 if (info /= 0) error stop 'LUP factorization failed.'
341 call disp%show("lup")
342 call disp%show( lup , format = rform )
343 call disp%show("call setResized(inv, shape(mat, IK))")
344 call setResized(inv, shape(mat, IK))
345 call disp%show("call setMatInv(inv, lup, rperm) ! compute the inverse of the matrix by passing its LUP factorization.")
346 call setMatInv(inv, lup, rperm)
347 call disp%show("inv")
348 call disp%show( inv , format = rform )
349 call disp%show("mul = matmul(mat, inv)")
350 mul = matmul(mat, inv)
351 call disp%show("mul")
352 call disp%show( mul , format = rform )
353 call disp%skip
354 end do
355 end block
356
357 call disp%skip()
358 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
359 call disp%show("! Compute inverse of a general complex matrix by passing its LUP factorization.")
360 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
361 call disp%skip()
362
363 block
364 use pm_kind, only: TKG => RKS
365 integer(IK), allocatable :: rperm(:)
366 complex(TKG), parameter :: mat(*,*) = reshape( &
367 [ (2.0, 1.0), (2.4,-1.0), (2.8,-1.0), (3.2,-1.0), (3.6,-1.0), (4.0,-1.0), (4.4,-1.0), (4.8,-1.0), (5.2,-1.0) &
368 , (2.4, 1.0), (2.0, 1.0), (2.4,-1.0), (2.8,-1.0), (3.2,-1.0), (3.6,-1.0), (4.0,-1.0), (4.4,-1.0), (4.8,-1.0) &
369 , (2.8, 1.0), (2.4, 1.0), (2.0, 1.0), (2.4,-1.0), (2.8,-1.0), (3.2,-1.0), (3.6,-1.0), (4.0,-1.0), (4.4,-1.0) &
370 , (3.2, 1.0), (2.8, 1.0), (2.4, 1.0), (2.0, 1.0), (2.4,-1.0), (2.8,-1.0), (3.2,-1.0), (3.6,-1.0), (4.0,-1.0) &
371 , (3.6, 1.0), (3.2, 1.0), (2.8, 1.0), (2.4, 1.0), (2.0, 1.0), (2.4,-1.0), (2.8,-1.0), (3.2,-1.0), (3.6,-1.0) &
372 , (4.0, 1.0), (3.6, 1.0), (3.2, 1.0), (2.8, 1.0), (2.4, 1.0), (2.0, 1.0), (2.4,-1.0), (2.8,-1.0), (3.2,-1.0) &
373 , (4.4, 1.0), (4.0, 1.0), (3.6, 1.0), (3.2, 1.0), (2.8, 1.0), (2.4, 1.0), (2.0, 1.0), (2.4,-1.0), (2.8,-1.0) &
374 , (4.8, 1.0), (4.4, 1.0), (4.0, 1.0), (3.6, 1.0), (3.2, 1.0), (2.8, 1.0), (2.4, 1.0), (2.0, 1.0), (2.4,-1.0) &
375 , (5.2, 1.0), (4.8, 1.0), (4.4, 1.0), (4.0, 1.0), (3.6, 1.0), (3.2, 1.0), (2.8, 1.0), (2.4, 1.0), (2.0, 1.0) &
376 ], shape = [9, 9], order = [2, 1])
377 complex(TKG), dimension(size(mat,1), size(mat,2)) :: inv, lup, mul
378 call disp%skip
379 call disp%show("call setResized(rperm, size(mat, 1, IK))")
380 call setResized(rperm, size(mat, 1, IK))
381 call disp%show("lup = mat")
382 lup = mat
383 call disp%show("lup")
384 call disp%show( lup , format = cform )
385 call disp%show("call setMatLUP(lup, rperm, info) ! compute the LUP factorization of the matrix.")
386 call setMatLUP(lup, rperm, info)
387 call disp%show("if (info /= 0) error stop 'LUP factorization failed.'")
388 if (info /= 0) error stop 'LUP factorization failed.'
389 call disp%show("lup")
390 call disp%show( lup , format = cform )
391 call disp%show("call setMatInv(inv, lup, rperm) ! compute the inverse of the matrix by passing its LUP factorization.")
392 call setMatInv(inv, lup, rperm)
393 call disp%show("inv")
394 call disp%show( inv , format = cform )
395 call disp%show("mul = matmul(mat, inv)")
396 mul = matmul(mat, inv)
397 call disp%show("mul")
398 call disp%show( mul , format = cform )
399 call disp%skip
400 end block
401
402 call disp%skip()
403 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
404 call disp%show("! Compute the inverse of a positive-definite real matrix by passing its Cholesky factorization.")
405 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
406 call disp%skip()
407
408 block
409 use pm_kind, only: TKG => RKS
410 real(TKG), allocatable :: mat(:,:), chol(:,:), inv(:,:), mul(:,:)
411 do itry = 1, ntry
412 call disp%skip
413 call disp%show("ndim = getUnifRand(1_IK, 6_IK)")
414 ndim = getUnifRand(1_IK, 6_IK)
415 call disp%show("ndim ! matrix rank")
416 call disp%show( ndim )
417 call disp%show("mat = getCovRand(mold = 1._TKG, ndim = ndim)")
418 mat = getCovRand(mold = 1._TKG, ndim = ndim)
419 call disp%show("mat")
420 call disp%show( mat , format = rform )
421 call disp%show("chol = getMatChol(mat, subset = lowDia)")
422 chol = getMatChol(mat, subset = lowDia)
423 call disp%show("chol")
424 call disp%show( chol , format = rform )
425 call disp%show("call setResized(inv, shape(mat, IK))")
426 call setResized(inv, shape(mat, IK))
427 call disp%show("call setMatInv(inv, chol, auxil = choLow)")
428 call setMatInv(inv, chol, auxil = choLow)
429 call disp%show("inv")
430 call disp%show( inv , format = rform )
431 call disp%show("mul = matmul(mat, inv)")
432 mul = matmul(mat, inv)
433 call disp%show("mul")
434 call disp%show( mul , format = rform )
435 call disp%skip
436 end do
437 end block
438
439 call disp%skip()
440 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
441 call disp%show("! Compute the inverse of a positive-definite complex matrix by passing its Cholesky factorization.")
442 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
443 call disp%skip()
444
445 block
446 use pm_kind, only: TKG => RKS
447 integer(IK), parameter :: ndim = 3_IK
448 complex(TKG), allocatable :: chol(:,:), inv(:,:), mul(:,:)
449 complex(TKG), parameter :: mat(*,*) = reshape( [ (9.0, 0.0), (3.0, 3.0), (3.0, -3.0) &
450 , (3.0, -3.0),(18.0, 0.0), (8.0, -6.0) &
451 , (3.0, 3.0), (8.0, 6.0),(43.0, 0.0) &
452 ], shape = [ndim, ndim], order = [2, 1])
453 call disp%skip
454 call disp%show("mat")
455 call disp%show( mat , format = cform )
456 call disp%show("chol = getMatChol(mat, subset = lowDia)")
457 chol = getMatChol(mat, subset = lowDia)
458 call disp%show("chol")
459 call disp%show( chol , format = cform )
460 call disp%show("call setResized(inv, shape(mat, IK))")
461 call setResized(inv, shape(mat, IK))
462 call disp%show("call setMatInv(inv, chol, auxil = choLow)")
463 call setMatInv(inv, chol, auxil = choLow)
464 call disp%show("inv")
465 call disp%show( inv , format = cform )
466 call disp%show("mul = matmul(mat, inv)")
467 mul = matmul(mat, inv)
468 call disp%show("mul")
469 call disp%show( mul , format = cform )
470 call disp%skip
471 end block
472
473 block
474 use pm_kind, only: TKG => RKS
475 integer(IK), parameter :: ndim = 3_IK
476 complex(TKG), allocatable :: chol(:,:), inv(:,:), mul(:,:)
477 complex(TKG), parameter :: mat(*,*) = reshape( [ (9.0, 0.0), (3.0, 3.0), (3.0, -3.0) &
478 , (3.0, -3.0),(18.0, 0.0), (8.0, -6.0) &
479 , (3.0, 3.0), (8.0, 6.0),(43.0, 0.0) &
480 ], shape = [ndim, ndim], order = [2, 1])
481 call disp%skip
482 call disp%show("mat")
483 call disp%show( mat , format = cform )
484 call disp%show("chol = getMatChol(mat, subset = uppDia)")
485 chol = getMatChol(mat, subset = uppDia)
486 call disp%show("chol")
487 call disp%show( chol , format = cform )
488 call disp%show("call setResized(inv, shape(mat, IK))")
489 call setResized(inv, shape(mat, IK))
490 call disp%show("call setMatInv(inv, chol, auxil = choUpp)")
491 call setMatInv(inv, chol, auxil = choUpp)
492 call disp%show("inv")
493 call disp%show( inv , format = cform )
494 call disp%show("mul = matmul(mat, inv)")
495 mul = matmul(mat, inv)
496 call disp%show("mul")
497 call disp%show( mul , format = cform )
498 call disp%skip
499 end block
500
501 call disp%skip()
502 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
503 call disp%show("! Compute a subset of the inverse of a positive-definite real matrix by passing its Cholesky factorization.")
504 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
505 call disp%skip()
506
507 block
508 use pm_kind, only: TKG => RKS
509 real(TKG), allocatable :: mat(:,:), chol(:,:), inv(:,:), mul(:,:)
510 do itry = 1, ntry
511 call disp%skip
512 call disp%show("ndim = getUnifRand(1_IK, 6_IK)")
513 ndim = getUnifRand(1_IK, 6_IK)
514 call disp%show("ndim ! matrix rank")
515 call disp%show( ndim )
516 call disp%show("mat = getCovRand(mold = 1._TKG, ndim = ndim)")
517 mat = getCovRand(mold = 1._TKG, ndim = ndim)
518 call disp%show("mat")
519 call disp%show( mat , format = rform )
520 call disp%show("chol = getMatChol(mat, subset = lowDia)")
521 chol = getMatChol(mat, subset = lowDia)
522 call disp%show("chol")
523 call disp%show( chol , format = rform )
524 call disp%show("call setResized(inv, shape(mat, IK))")
525 call setResized(inv, shape(mat, IK))
526 call disp%skip
527 call disp%show("inv = 0")
528 inv = 0
529 call disp%show("call setMatInv(inv, chol, auxil = choLow, subset = uppDia)")
530 call setMatInv(inv, chol, auxil = choLow, subset = uppDia)
531 call disp%show("inv")
532 call disp%show( inv , format = rform )
533 call disp%show("call setMatCopy(inv(2:,1:), rdpack, inv(1:,2:), rdpack, uppDia, transHerm) ! symmetrize `inv` for multiplication.")
534 call setMatCopy(inv(2:,1:), rdpack, inv(1:,2:), rdpack, uppDia, transHerm)
535 call disp%show("inv")
536 call disp%show( inv , format = rform )
537 call disp%show("mul = matmul(mat, inv)")
538 mul = matmul(mat, inv)
539 call disp%show("mul")
540 call disp%show( mul , format = rform )
541 call disp%skip
542 call disp%show("inv = 0")
543 inv = 0
544 call disp%show("call setMatInv(inv, chol, auxil = choLow, subset = lowDia)")
545 call setMatInv(inv, chol, auxil = choLow, subset = lowDia)
546 call disp%show("inv")
547 call disp%show( inv , format = rform )
548 call disp%show("call setMatCopy(inv(1:,2:), rdpack, inv(2:,1:), rdpack, lowDia, transHerm) ! symmetrize `inv` for multiplication.")
549 call setMatCopy(inv(1:,2:), rdpack, inv(2:,1:), rdpack, lowDia, transHerm)
550 call disp%show("inv")
551 call disp%show( inv , format = rform )
552 call disp%show("mul = matmul(mat, inv)")
553 mul = matmul(mat, inv)
554 call disp%show("mul")
555 call disp%show( mul , format = rform )
556 call disp%skip
557 end do
558 end block
559
560 block
561 use pm_kind, only: TKG => RKS
562 real(TKG), allocatable :: mat(:,:), chol(:,:), inv(:,:), mul(:,:)
563 do itry = 1, ntry
564 call disp%skip
565 call disp%show("ndim = getUnifRand(1_IK, 6_IK)")
566 ndim = getUnifRand(1_IK, 6_IK)
567 call disp%show("ndim ! matrix rank")
568 call disp%show( ndim )
569 call disp%show("mat = getCovRand(mold = 1._TKG, ndim = ndim)")
570 mat = getCovRand(mold = 1._TKG, ndim = ndim)
571 call disp%show("mat")
572 call disp%show( mat , format = rform )
573 call disp%show("chol = getMatChol(mat, subset = uppDia)")
574 chol = getMatChol(mat, subset = uppDia)
575 call disp%show("chol")
576 call disp%show( chol , format = rform )
577 call disp%show("call setResized(inv, shape(mat, IK))")
578 call setResized(inv, shape(mat, IK))
579 call disp%skip
580 call disp%show("inv = 0")
581 inv = 0
582 call disp%show("call setMatInv(inv, chol, auxil = choUpp, subset = uppDia)")
583 call setMatInv(inv, chol, auxil = choUpp, subset = uppDia)
584 call disp%show("inv")
585 call disp%show( inv , format = rform )
586 call disp%show("call setMatCopy(inv(2:,1:), rdpack, inv(1:,2:), rdpack, uppDia, transHerm) ! symmetrize `inv` for multiplication.")
587 call setMatCopy(inv(2:,1:), rdpack, inv(1:,2:), rdpack, uppDia, transHerm)
588 call disp%show("inv")
589 call disp%show( inv , format = rform )
590 call disp%show("mul = matmul(mat, inv)")
591 mul = matmul(mat, inv)
592 call disp%show("mul")
593 call disp%show( mul , format = rform )
594 call disp%skip
595 call disp%show("inv = 0")
596 inv = 0
597 call disp%show("call setMatInv(inv, chol, auxil = choUpp, subset = lowDia)")
598 call setMatInv(inv, chol, auxil = choUpp, subset = lowDia)
599 call disp%show("inv")
600 call disp%show( inv , format = rform )
601 call disp%show("call setMatCopy(inv(1:,2:), rdpack, inv(2:,1:), rdpack, lowDia, transHerm) ! symmetrize `inv` for multiplication.")
602 call setMatCopy(inv(1:,2:), rdpack, inv(2:,1:), rdpack, lowDia, transHerm)
603 call disp%show("inv")
604 call disp%show( inv , format = rform )
605 call disp%show("mul = matmul(mat, inv)")
606 mul = matmul(mat, inv)
607 call disp%show("mul")
608 call disp%show( mul , format = rform )
609 call disp%skip
610 end do
611 end block
612
613 call disp%skip()
614 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
615 call disp%show("! Compute a subset of the inverse of a positive-definite complex matrix by passing its Cholesky factorization.")
616 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
617 call disp%skip()
618
619 block
620 use pm_kind, only: TKG => RKS
621 integer(IK), parameter :: ndim = 3_IK
622 complex(TKG), allocatable :: chol(:,:), inv(:,:), mul(:,:)
623 complex(TKG), parameter :: mat(*,*) = reshape( [ (9.0, 0.0), (3.0, 3.0), (3.0, -3.0) &
624 , (3.0, -3.0),(18.0, 0.0), (8.0, -6.0) &
625 , (3.0, 3.0), (8.0, 6.0),(43.0, 0.0) &
626 ], shape = [ndim, ndim], order = [2, 1])
627 call disp%skip
628 call disp%show("mat")
629 call disp%show( mat , format = cform )
630 call disp%show("chol = getMatChol(mat, subset = lowDia)")
631 chol = getMatChol(mat, subset = lowDia)
632 call disp%show("chol")
633 call disp%show( chol , format = cform )
634 call disp%show("call setResized(inv, shape(mat, IK))")
635 call setResized(inv, shape(mat, IK))
636 call disp%show("inv = 0")
637 inv = 0
638 call disp%show("call setMatInv(inv, chol, auxil = choLow, subset = uppDia)")
639 call setMatInv(inv, chol, auxil = choLow, subset = uppDia)
640 call disp%show("inv")
641 call disp%show( inv , format = cform )
642 call disp%show("call setMatCopy(inv(2:,1:), rdpack, inv(1:,2:), rdpack, uppDia, transHerm) ! symmetrize `inv` for multiplication.")
643 call setMatCopy(inv(2:,1:), rdpack, inv(1:,2:), rdpack, uppDia, transHerm)
644 call disp%show("inv")
645 call disp%show( inv , format = cform )
646 call disp%show("mul = matmul(mat, inv)")
647 mul = matmul(mat, inv)
648 call disp%show("mul")
649 call disp%show( mul , format = cform )
650 call disp%skip
651 call disp%show("inv = 0")
652 inv = 0
653 call disp%show("call setMatInv(inv, chol, auxil = choLow, subset = lowDia)")
654 call setMatInv(inv, chol, auxil = choLow, subset = lowDia)
655 call disp%show("inv")
656 call disp%show( inv , format = cform )
657 call disp%show("call setMatCopy(inv(1:,2:), rdpack, inv(2:,1:), rdpack, lowDia, transHerm) ! symmetrize `inv` for multiplication.")
658 call setMatCopy(inv(1:,2:), rdpack, inv(2:,1:), rdpack, lowDia, transHerm)
659 call disp%show("inv")
660 call disp%show( inv , format = cform )
661 call disp%show("mul = matmul(mat, inv)")
662 mul = matmul(mat, inv)
663 call disp%show("mul")
664 call disp%show( mul , format = cform )
665 call disp%skip
666 end block
667
668 block
669 use pm_kind, only: TKG => RKS
670 integer(IK), parameter :: ndim = 3_IK
671 complex(TKG), allocatable :: chol(:,:), inv(:,:), mul(:,:)
672 complex(TKG), parameter :: mat(*,*) = reshape( [ (9.0, 0.0), (3.0, 3.0), (3.0, -3.0) &
673 , (3.0, -3.0),(18.0, 0.0), (8.0, -6.0) &
674 , (3.0, 3.0), (8.0, 6.0),(43.0, 0.0) &
675 ], shape = [ndim, ndim], order = [2, 1])
676 call disp%skip
677 call disp%show("mat")
678 call disp%show( mat , format = cform )
679 call disp%show("chol = getMatChol(mat, subset = uppDia)")
680 chol = getMatChol(mat, subset = uppDia)
681 call disp%show("chol")
682 call disp%show( chol , format = cform )
683 call disp%show("call setResized(inv, shape(mat, IK))")
684 call setResized(inv, shape(mat, IK))
685 call disp%show("inv = 0")
686 inv = 0
687 call disp%show("call setMatInv(inv, chol, auxil = choUpp, subset = lowDia)")
688 call setMatInv(inv, chol, auxil = choUpp, subset = lowDia)
689 call disp%show("inv")
690 call disp%show( inv , format = cform )
691 call disp%show("call setMatCopy(inv(1:,2:), rdpack, inv(2:,1:), rdpack, lowDia, transHerm) ! symmetrize `inv` for multiplication.")
692 call setMatCopy(inv(1:,2:), rdpack, inv(2:,1:), rdpack, lowDia, transHerm)
693 call disp%show("inv")
694 call disp%show( inv , format = cform )
695 call disp%show("mul = matmul(mat, inv)")
696 mul = matmul(mat, inv)
697 call disp%show("mul")
698 call disp%show( mul , format = cform )
699 call disp%skip
700 call disp%show("inv = 0")
701 inv = 0
702 call disp%show("call setMatInv(inv, chol, auxil = choUpp, subset = uppDia)")
703 call setMatInv(inv, chol, auxil = choUpp, subset = uppDia)
704 call disp%show("inv")
705 call disp%show( inv , format = cform )
706 call disp%show("call setMatCopy(inv(2:,1:), rdpack, inv(1:,2:), rdpack, uppDia, transHerm) ! symmetrize `inv` for multiplication.")
707 call setMatCopy(inv(2:,1:), rdpack, inv(1:,2:), rdpack, uppDia, transHerm)
708 call disp%show("inv")
709 call disp%show( inv , format = cform )
710 call disp%show("mul = matmul(mat, inv)")
711 mul = matmul(mat, inv)
712 call disp%show("mul")
713 call disp%show( mul , format = cform )
714 call disp%skip
715 end block
716
717 block
718 use pm_kind, only: TKG => RKS
719 complex(TKG), allocatable :: low(:,:), upp(:,:), mat(:,:), chol(:,:), inv(:,:), mul(:,:)
720 do itry = 1, ntry
721 call disp%skip
722 call disp%show("ndim = getUnifRand(1_IK, 6_IK)")
723 ndim = getUnifRand(1_IK, 6_IK)
724 call disp%show("ndim ! matrix rank")
725 call disp%show( ndim )
726 low = getUnifRand((1._TKG, -1._TKG), (+2._TKG, +1._TKG), ndim, ndim)
727 call setMatInit(low, uppDia, (0._TKG, 0._TKG), cmplx(getUnifRand(1._TKG, 2._TKG, ndim), 0._TKG, TKG))
728 upp = transpose(conjg(low))
729 mat = matmul(low, upp)
730 call disp%show("mat")
731 call disp%show( mat , format = cform )
732 call disp%show("chol = getMatChol(mat, subset = uppDia)")
733 chol = getMatChol(mat, subset = uppDia)
734 call disp%show("chol")
735 call disp%show( chol , format = cform )
736 call disp%show("call setResized(inv, shape(mat, IK))")
737 call setResized(inv, shape(mat, IK))
738 call disp%show("inv = 0")
739 inv = 0
740 call disp%show("call setMatInv(inv, chol, auxil = choUpp, subset = lowDia)")
741 call setMatInv(inv, chol, auxil = choUpp, subset = lowDia)
742 call disp%show("inv")
743 call disp%show( inv , format = cform )
744 call disp%show("call setMatCopy(inv(1:,2:), rdpack, inv(2:,1:), rdpack, lowDia, transHerm) ! symmetrize `inv` for multiplication.")
745 call setMatCopy(inv(1:,2:), rdpack, inv(2:,1:), rdpack, lowDia, transHerm)
746 call disp%show("inv")
747 call disp%show( inv , format = cform )
748 call disp%show("mul = matmul(mat, inv)")
749 mul = matmul(mat, inv)
750 call disp%show("mul")
751 call disp%show( mul , format = cform )
752 call disp%skip
753 call disp%show("inv = 0")
754 inv = 0
755 call disp%show("call setMatInv(inv, chol, auxil = choUpp, subset = uppDia)")
756 call setMatInv(inv, chol, auxil = choUpp, subset = uppDia)
757 call disp%show("inv")
758 call disp%show( inv , format = cform )
759 call disp%show("call setMatCopy(inv(2:,1:), rdpack, inv(1:,2:), rdpack, uppDia, transHerm) ! symmetrize `inv` for multiplication.")
760 call setMatCopy(inv(2:,1:), rdpack, inv(1:,2:), rdpack, uppDia, transHerm)
761 call disp%show("inv")
762 call disp%show( inv , format = cform )
763 call disp%show("mul = matmul(mat, inv)")
764 mul = matmul(mat, inv)
765 call disp%show("mul")
766 call disp%show( mul , format = cform )
767 call disp%skip
768 end do
769 end block
770
771end program example
Generate and return an array of the specified rank and shape of arbitrary intrinsic type and kind wit...
Allocate or resize (shrink or expand) an input allocatable scalar string or array of rank 1....
Generate and return a random positive-definite (correlation or covariance) matrix using the Gram meth...
Definition: pm_distCov.F90:394
Generate and return a scalar or a contiguous array of rank 1 of length s1 of randomly uniformly distr...
Verify the input assertion holds and if it does not, print the (optional) input message on stdout and...
Definition: pm_err.F90:735
Generate and return an object of type stop_type with the user-specified input attributes.
Definition: pm_err.F90:1618
Generate and return a generic or type/kind-specific IO format with the requested specifications that ...
Definition: pm_io.F90:18485
This is a generic method of the derived type display_type with pass attribute.
Definition: pm_io.F90:11508
Generate and return the upper or the lower Cholesky factorization of the input symmetric positive-def...
Copy a desired subset of the input source matrix of arbitrary shape (:) or (:,:) to the target subset...
Generate and return a matrix of shape (shape(1), shape(2)) with the upper/lower triangle and the diag...
Set the upper/lower triangle and the diagonal elements of the input matrix of arbitrary shape (:,...
Return the LU-Pivoted decomposition of the input square matrix mat(ndim,ndim).
Generate and return the conversion of the input value to an output Fortran string,...
Definition: pm_val2str.F90:167
This module contains procedures and generic interfaces for convenient allocation and filling of array...
This module contains procedures and generic interfaces for resizing allocatable arrays of various typ...
This module contains classes and procedures for generating random matrices distributed on the space o...
Definition: pm_distCov.F90:72
This module contains classes and procedures for computing various statistical quantities related to t...
This module contains classes and procedures for reporting and handling errors.
Definition: pm_err.F90:52
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 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
This module contains procedures and generic interfaces for computing the Cholesky factorization of po...
This module contains procedures and generic interfaces relevant to copying (diagonal or upper/lower t...
This module contains procedures and generic interfaces relevant to generating and initializing matric...
This module contains procedures and generic interfaces relevant to the partially LU Pivoted decomposi...
This module contains the generic procedures for converting values of different types and kinds to For...
Definition: pm_val2str.F90:58
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
2!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3! Compute inverse of an upperDiag triangular real matrix.
4!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5
6
7ndim = getUnifRand(1_IK, 6_IK)
8ndim ! matrix rank
9+1
10mat = getUnifRand(1_IK, 9_IK, ndim, ndim)
11call setMatInit(mat(2 : ndim, 1 : ndim - 1), lowDia, 0._TKG, 0._TKG)
12mat
13 +2.00
14call setResized(inv, shape(mat, IK))
15call setMatInv(inv, mat, upperDiag)
16inv
17 +0.50
18mul = matmul(mat, inv)
19mul
20 +1.00
21
22
23ndim = getUnifRand(1_IK, 6_IK)
24ndim ! matrix rank
25+5
26mat = getUnifRand(1_IK, 9_IK, ndim, ndim)
27call setMatInit(mat(2 : ndim, 1 : ndim - 1), lowDia, 0._TKG, 0._TKG)
28mat
29 +1.00, +2.00, +3.00, +2.00, +1.00
30 +0.00, +7.00, +3.00, +7.00, +6.00
31 +0.00, +0.00, +7.00, +2.00, +8.00
32 +0.00, +0.00, +0.00, +8.00, +3.00
33 +0.00, +0.00, +0.00, +0.00, +3.00
34call setResized(inv, shape(mat, IK))
35call setMatInv(inv, mat, upperDiag)
36inv
37 +1.00, -0.29, -0.31, +0.08, +0.98
38 +0.00, +0.14, -0.06, -0.11, -0.01
39 +0.00, +0.00, +0.14, -0.04, -0.35
40 +0.00, +0.00, +0.00, +0.12, -0.12
41 +0.00, +0.00, +0.00, +0.00, +0.33
42mul = matmul(mat, inv)
43mul
44 +1.00, +0.00, +0.00, +0.00, -0.00
45 +0.00, +1.00, -0.00, +0.00, +0.00
46 +0.00, +0.00, +1.00, +0.00, -0.00
47 +0.00, +0.00, +0.00, +1.00, +0.00
48 +0.00, +0.00, +0.00, +0.00, +1.00
49
50
51ndim = getUnifRand(1_IK, 6_IK)
52ndim ! matrix rank
53+6
54mat = getUnifRand(1_IK, 9_IK, ndim, ndim)
55call setMatInit(mat(2 : ndim, 1 : ndim - 1), lowDia, 0._TKG, 0._TKG)
56mat
57 +6.00, +8.00, +7.00, +5.00, +9.00, +3.00
58 +0.00, +9.00, +7.00, +2.00, +3.00, +4.00
59 +0.00, +0.00, +6.00, +2.00, +2.00, +3.00
60 +0.00, +0.00, +0.00, +9.00, +4.00, +7.00
61 +0.00, +0.00, +0.00, +0.00, +4.00, +8.00
62 +0.00, +0.00, +0.00, +0.00, +0.00, +9.00
63call setResized(inv, shape(mat, IK))
64call setMatInv(inv, mat, upperDiag)
65inv
66 +0.17, -0.15, -0.02, -0.05, -0.20, +0.24
67 +0.00, +0.11, -0.13, +0.00, -0.02, +0.01
68 +0.00, +0.00, +0.17, -0.04, -0.05, +0.01
69 +0.00, +0.00, +0.00, +0.11, -0.11, +0.01
70 +0.00, +0.00, +0.00, +0.00, +0.25, -0.22
71 +0.00, +0.00, +0.00, +0.00, +0.00, +0.11
72mul = matmul(mat, inv)
73mul
74 +1.00, +0.00, -0.00, +0.00, +0.00, +0.00
75 +0.00, +1.00, +0.00, +0.00, +0.00, +0.00
76 +0.00, +0.00, +1.00, +0.00, +0.00, +0.00
77 +0.00, +0.00, +0.00, +1.00, +0.00, +0.00
78 +0.00, +0.00, +0.00, +0.00, +1.00, +0.00
79 +0.00, +0.00, +0.00, +0.00, +0.00, +1.00
80
81
82ndim = getUnifRand(1_IK, 6_IK)
83ndim ! matrix rank
84+6
85mat = getUnifRand(1_IK, 9_IK, ndim, ndim)
86call setMatInit(mat(2 : ndim, 1 : ndim - 1), lowDia, 0._TKG, 0._TKG)
87mat
88 +6.00, +6.00, +9.00, +5.00, +7.00, +9.00
89 +0.00, +4.00, +6.00, +8.00, +9.00, +7.00
90 +0.00, +0.00, +2.00, +8.00, +4.00, +2.00
91 +0.00, +0.00, +0.00, +6.00, +6.00, +2.00
92 +0.00, +0.00, +0.00, +0.00, +3.00, +2.00
93 +0.00, +0.00, +0.00, +0.00, +0.00, +4.00
94call setResized(inv, shape(mat, IK))
95call setMatInv(inv, mat, upperDiag)
96inv
97 +0.17, -0.25, -0.00, +0.19, -0.03, -0.02
98 +0.00, +0.25, -0.75, +0.67, -1.08, +0.15
99 +0.00, +0.00, +0.50, -0.67, +0.67, -0.25
100 +0.00, +0.00, +0.00, +0.17, -0.33, +0.08
101 +0.00, +0.00, +0.00, +0.00, +0.33, -0.17
102 +0.00, +0.00, +0.00, +0.00, +0.00, +0.25
103mul = matmul(mat, inv)
104mul
105 +1.00, +0.00, +0.00, +0.00, -0.00, +0.00
106 +0.00, +1.00, +0.00, +0.00, -0.00, +0.00
107 +0.00, +0.00, +1.00, +0.00, +0.00, +0.00
108 +0.00, +0.00, +0.00, +1.00, +0.00, +0.00
109 +0.00, +0.00, +0.00, +0.00, +1.00, +0.00
110 +0.00, +0.00, +0.00, +0.00, +0.00, +1.00
111
112
113ndim = getUnifRand(1_IK, 6_IK)
114ndim ! matrix rank
115+6
116mat = getUnifRand(1_IK, 9_IK, ndim, ndim)
117call setMatInit(mat(2 : ndim, 1 : ndim - 1), lowDia, 0._TKG, 0._TKG)
118mat
119 +7.00, +2.00, +5.00, +6.00, +5.00, +8.00
120 +0.00, +6.00, +6.00, +7.00, +8.00, +6.00
121 +0.00, +0.00, +6.00, +6.00, +8.00, +1.00
122 +0.00, +0.00, +0.00, +7.00, +1.00, +5.00
123 +0.00, +0.00, +0.00, +0.00, +2.00, +8.00
124 +0.00, +0.00, +0.00, +0.00, +0.00, +2.00
125call setResized(inv, shape(mat, IK))
126call setMatInv(inv, mat, upperDiag)
127inv
128 +0.14, -0.05, -0.07, -0.01, +0.13, -0.86
129 +0.00, +0.17, -0.17, -0.02, +0.01, -0.40
130 +0.00, +0.00, +0.17, -0.14, -0.60, +2.65
131 +0.00, +0.00, +0.00, +0.14, -0.07, -0.07
132 +0.00, +0.00, +0.00, +0.00, +0.50, -2.00
133 +0.00, +0.00, +0.00, +0.00, +0.00, +0.50
134mul = matmul(mat, inv)
135mul
136 +1.00, -0.00, +0.00, +0.00, -0.00, +0.00
137 +0.00, +1.00, +0.00, -0.00, +0.00, +0.00
138 +0.00, +0.00, +1.00, +0.00, +0.00, -0.00
139 +0.00, +0.00, +0.00, +1.00, +0.00, +0.00
140 +0.00, +0.00, +0.00, +0.00, +1.00, +0.00
141 +0.00, +0.00, +0.00, +0.00, +0.00, +1.00
142
143
144ndim = getUnifRand(1_IK, 6_IK)
145ndim ! matrix rank
146+3
147mat = getUnifRand(1_IK, 9_IK, ndim, ndim)
148call setMatInit(mat(2 : ndim, 1 : ndim - 1), lowDia, 0._TKG, 0._TKG)
149mat
150 +3.00, +9.00, +6.00
151 +0.00, +5.00, +7.00
152 +0.00, +0.00, +4.00
153call setResized(inv, shape(mat, IK))
154call setMatInv(inv, mat, upperDiag)
155inv
156 +0.33, -0.60, +0.55
157 +0.00, +0.20, -0.35
158 +0.00, +0.00, +0.25
159mul = matmul(mat, inv)
160mul
161 +1.00, +0.00, +0.00
162 +0.00, +1.00, +0.00
163 +0.00, +0.00, +1.00
164
165
166ndim = getUnifRand(1_IK, 6_IK)
167ndim ! matrix rank
168+3
169mat = getUnifRand(1_IK, 9_IK, ndim, ndim)
170call setMatInit(mat(2 : ndim, 1 : ndim - 1), lowDia, 0._TKG, 0._TKG)
171mat
172 +1.00, +6.00, +3.00
173 +0.00, +7.00, +3.00
174 +0.00, +0.00, +7.00
175call setResized(inv, shape(mat, IK))
176call setMatInv(inv, mat, upperDiag)
177inv
178 +1.00, -0.86, -0.06
179 +0.00, +0.14, -0.06
180 +0.00, +0.00, +0.14
181mul = matmul(mat, inv)
182mul
183 +1.00, +0.00, +0.00
184 +0.00, +1.00, -0.00
185 +0.00, +0.00, +1.00
186
187
188ndim = getUnifRand(1_IK, 6_IK)
189ndim ! matrix rank
190+1
191mat = getUnifRand(1_IK, 9_IK, ndim, ndim)
192call setMatInit(mat(2 : ndim, 1 : ndim - 1), lowDia, 0._TKG, 0._TKG)
193mat
194 +7.00
195call setResized(inv, shape(mat, IK))
196call setMatInv(inv, mat, upperDiag)
197inv
198 +0.14
199mul = matmul(mat, inv)
200mul
201 +1.00
202
203
204ndim = getUnifRand(1_IK, 6_IK)
205ndim ! matrix rank
206+5
207mat = getUnifRand(1_IK, 9_IK, ndim, ndim)
208call setMatInit(mat(2 : ndim, 1 : ndim - 1), lowDia, 0._TKG, 0._TKG)
209mat
210 +8.00, +4.00, +6.00, +6.00, +4.00
211 +0.00, +5.00, +5.00, +2.00, +6.00
212 +0.00, +0.00, +5.00, +8.00, +8.00
213 +0.00, +0.00, +0.00, +9.00, +8.00
214 +0.00, +0.00, +0.00, +0.00, +9.00
215call setResized(inv, shape(mat, IK))
216call setMatInv(inv, mat, upperDiag)
217inv
218 +0.12, -0.10, -0.05, -0.02, +0.07
219 +0.00, +0.20, -0.20, +0.13, -0.07
220 +0.00, +0.00, +0.20, -0.18, -0.02
221 +0.00, +0.00, +0.00, +0.11, -0.10
222 +0.00, +0.00, +0.00, +0.00, +0.11
223mul = matmul(mat, inv)
224mul
225 +1.00, +0.00, +0.00, +0.00, -0.00
226 +0.00, +1.00, +0.00, +0.00, -0.00
227 +0.00, +0.00, +1.00, +0.00, +0.00
228 +0.00, +0.00, +0.00, +1.00, +0.00
229 +0.00, +0.00, +0.00, +0.00, +1.00
230
231
232ndim = getUnifRand(1_IK, 6_IK)
233ndim ! matrix rank
234+4
235mat = getUnifRand(1_IK, 9_IK, ndim, ndim)
236call setMatInit(mat(2 : ndim, 1 : ndim - 1), lowDia, 0._TKG, 0._TKG)
237mat
238 +1.00, +4.00, +7.00, +9.00
239 +0.00, +2.00, +6.00, +9.00
240 +0.00, +0.00, +6.00, +2.00
241 +0.00, +0.00, +0.00, +1.00
242call setResized(inv, shape(mat, IK))
243call setMatInv(inv, mat, upperDiag)
244inv
245 +1.00, -2.00, +0.83, +7.33
246 +0.00, +0.50, -0.50, -3.50
247 +0.00, +0.00, +0.17, -0.33
248 +0.00, +0.00, +0.00, +1.00
249mul = matmul(mat, inv)
250mul
251 +1.00, +0.00, +0.00, +0.00
252 +0.00, +1.00, +0.00, +0.00
253 +0.00, +0.00, +1.00, +0.00
254 +0.00, +0.00, +0.00, +1.00
255
256
257!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
258! Compute inverse of a upperDiag triangular complex matrix.
259!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
260
261
262ndim = getUnifRand(1_IK, 6_IK)
263ndim ! matrix rank
264+6
265mat = getUnifRand((1., 1.), (2., 2.), ndim, ndim)
266call setMatInit(mat(2 : ndim, 1 : ndim - 1), lowDia, (0._TKG, 0._TKG), (0._TKG, 0._TKG))
267mat
268( +1.11, +1.27), ( +1.55, +2.00), ( +1.24, +1.43), ( +1.57, +1.08), ( +1.72, +1.59), ( +1.45, +1.79)
269( +0.00, +0.00), ( +1.76, +1.58), ( +1.61, +1.51), ( +1.27, +1.74), ( +1.60, +1.84), ( +1.96, +1.20)
270( +0.00, +0.00), ( +0.00, +0.00), ( +1.18, +1.82), ( +1.87, +1.42), ( +1.34, +1.23), ( +1.52, +1.81)
271( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.45, +1.18), ( +1.36, +1.30), ( +1.45, +1.05)
272( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.62, +1.20), ( +1.89, +1.78)
273( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.78, +1.66)
274call setResized(inv, shape(mat, IK))
275call setMatInv(inv, mat, upperDiag)
276inv
277( +0.39, -0.45), ( -0.50, +0.40), ( +0.11, -0.08), ( +0.17, +0.29), ( -0.05, -0.10), ( -0.26, -0.12)
278( +0.00, +0.00), ( +0.31, -0.28), ( -0.24, +0.36), ( -0.14, -0.23), ( -0.09, +0.19), ( +0.26, -0.04)
279( +0.00, +0.00), ( +0.00, +0.00), ( +0.25, -0.39), ( -0.30, +0.50), ( +0.07, -0.10), ( -0.19, +0.06)
280( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.41, -0.34), ( -0.42, +0.26), ( +0.18, +0.00)
281( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.40, -0.29), ( -0.42, +0.31)
282( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.30, -0.28)
283mul = matmul(mat, inv)
284mul
285( +1.00, +0.00), ( +0.00, -0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, -0.00), ( -0.00, +0.00)
286( +0.00, +0.00), ( +1.00, +0.00), ( +0.00, -0.00), ( +0.00, +0.00), ( -0.00, -0.00), ( -0.00, +0.00)
287( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00), ( -0.00, -0.00), ( +0.00, -0.00), ( -0.00, +0.00)
288( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00), ( +0.00, -0.00), ( -0.00, +0.00)
289( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, -0.00), ( +0.00, +0.00)
290( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00)
291
292
293ndim = getUnifRand(1_IK, 6_IK)
294ndim ! matrix rank
295+2
296mat = getUnifRand((1., 1.), (2., 2.), ndim, ndim)
297call setMatInit(mat(2 : ndim, 1 : ndim - 1), lowDia, (0._TKG, 0._TKG), (0._TKG, 0._TKG))
298mat
299( +1.25, +1.06), ( +1.16, +1.10)
300( +0.00, +0.00), ( +1.10, +1.58)
301call setResized(inv, shape(mat, IK))
302call setMatInv(inv, mat, upperDiag)
303inv
304( +0.47, -0.40), ( -0.31, +0.40)
305( +0.00, +0.00), ( +0.30, -0.43)
306mul = matmul(mat, inv)
307mul
308( +1.00, +0.00), ( -0.00, +0.00)
309( +0.00, +0.00), ( +1.00, +0.00)
310
311
312ndim = getUnifRand(1_IK, 6_IK)
313ndim ! matrix rank
314+5
315mat = getUnifRand((1., 1.), (2., 2.), ndim, ndim)
316call setMatInit(mat(2 : ndim, 1 : ndim - 1), lowDia, (0._TKG, 0._TKG), (0._TKG, 0._TKG))
317mat
318( +1.52, +1.34), ( +1.03, +1.27), ( +1.60, +1.09), ( +1.13, +1.53), ( +1.64, +1.91)
319( +0.00, +0.00), ( +1.67, +1.48), ( +1.38, +1.65), ( +1.14, +1.13), ( +1.05, +1.25)
320( +0.00, +0.00), ( +0.00, +0.00), ( +1.22, +1.10), ( +1.61, +1.11), ( +1.23, +1.25)
321( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.51, +1.63), ( +1.49, +1.11)
322( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.48, +1.83)
323call setResized(inv, shape(mat, IK))
324call setMatInv(inv, mat, upperDiag)
325inv
326( +0.37, -0.33), ( -0.31, +0.19), ( +0.05, +0.25), ( -0.22, -0.11), ( -0.04, +0.08)
327( +0.00, +0.00), ( +0.33, -0.30), ( -0.49, +0.33), ( +0.12, -0.15), ( +0.05, +0.07)
328( +0.00, +0.00), ( +0.00, +0.00), ( +0.45, -0.41), ( -0.31, +0.44), ( -0.16, -0.06)
329( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.31, -0.33), ( -0.17, +0.31)
330( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.27, -0.33)
331mul = matmul(mat, inv)
332mul
333( +1.00, +0.00), ( -0.00, -0.00), ( +0.00, +0.00), ( -0.00, -0.00), ( +0.00, -0.00)
334( +0.00, +0.00), ( +1.00, +0.00), ( +0.00, +0.00), ( -0.00, -0.00), ( +0.00, -0.00)
335( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00), ( -0.00, +0.00), ( +0.00, -0.00)
336( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00), ( +0.00, -0.00)
337( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00)
338
339
340ndim = getUnifRand(1_IK, 6_IK)
341ndim ! matrix rank
342+6
343mat = getUnifRand((1., 1.), (2., 2.), ndim, ndim)
344call setMatInit(mat(2 : ndim, 1 : ndim - 1), lowDia, (0._TKG, 0._TKG), (0._TKG, 0._TKG))
345mat
346( +1.74, +1.48), ( +1.99, +1.43), ( +1.26, +1.17), ( +1.86, +1.75), ( +1.22, +1.97), ( +1.73, +1.70)
347( +0.00, +0.00), ( +1.75, +1.94), ( +1.66, +1.39), ( +1.86, +1.52), ( +1.42, +1.73), ( +1.37, +1.52)
348( +0.00, +0.00), ( +0.00, +0.00), ( +1.70, +1.17), ( +1.54, +1.06), ( +1.40, +1.08), ( +1.57, +1.00)
349( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.83, +1.91), ( +1.66, +1.21), ( +1.96, +1.14)
350( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.43, +1.53), ( +1.24, +1.18)
351( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.33, +1.27)
352call setResized(inv, shape(mat, IK))
353call setMatInv(inv, mat, upperDiag)
354inv
355( +0.33, -0.28), ( -0.25, +0.33), ( -0.02, -0.12), ( -0.09, +0.05), ( -0.03, -0.06), ( +0.02, +0.11)
356( +0.00, +0.00), ( +0.26, -0.28), ( -0.30, +0.27), ( -0.03, +0.06), ( -0.06, -0.04), ( +0.01, -0.07)
357( +0.00, +0.00), ( +0.00, +0.00), ( +0.40, -0.27), ( -0.24, +0.25), ( -0.11, +0.00), ( -0.03, -0.02)
358( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.26, -0.27), ( -0.20, +0.31), ( -0.05, +0.11)
359( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.33, -0.35), ( -0.30, +0.32)
360( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.39, -0.38)
361mul = matmul(mat, inv)
362mul
363( +1.00, -0.00), ( +0.00, +0.00), ( -0.00, -0.00), ( -0.00, -0.00), ( -0.00, -0.00), ( +0.00, +0.00)
364( +0.00, +0.00), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, -0.00), ( +0.00, +0.00), ( +0.00, +0.00)
365( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, -0.00), ( +0.00, +0.00), ( -0.00, +0.00), ( +0.00, +0.00)
366( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, -0.00), ( -0.00, +0.00), ( +0.00, -0.00)
367( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00), ( +0.00, +0.00)
368( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, -0.00)
369
370
371ndim = getUnifRand(1_IK, 6_IK)
372ndim ! matrix rank
373+4
374mat = getUnifRand((1., 1.), (2., 2.), ndim, ndim)
375call setMatInit(mat(2 : ndim, 1 : ndim - 1), lowDia, (0._TKG, 0._TKG), (0._TKG, 0._TKG))
376mat
377( +1.12, +1.34), ( +1.22, +1.16), ( +1.25, +1.81), ( +1.08, +1.22)
378( +0.00, +0.00), ( +1.46, +1.17), ( +1.48, +1.20), ( +1.42, +1.87)
379( +0.00, +0.00), ( +0.00, +0.00), ( +1.92, +1.14), ( +1.55, +1.39)
380( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.93, +1.10)
381call setResized(inv, shape(mat, IK))
382call setMatInv(inv, mat, upperDiag)
383inv
384( +0.37, -0.44), ( -0.36, +0.37), ( -0.16, -0.02), ( +0.29, +0.06)
385( +0.00, +0.00), ( +0.42, -0.33), ( -0.39, +0.23), ( -0.14, +0.02)
386( +0.00, +0.00), ( +0.00, +0.00), ( +0.39, -0.23), ( -0.40, +0.13)
387( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.39, -0.22)
388mul = matmul(mat, inv)
389mul
390( +1.00, +0.00), ( +0.00, -0.00), ( +0.00, +0.00), ( +0.00, -0.00)
391( +0.00, +0.00), ( +1.00, -0.00), ( +0.00, +0.00), ( -0.00, -0.00)
392( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, -0.00), ( +0.00, +0.00)
393( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00)
394
395
396ndim = getUnifRand(1_IK, 6_IK)
397ndim ! matrix rank
398+2
399mat = getUnifRand((1., 1.), (2., 2.), ndim, ndim)
400call setMatInit(mat(2 : ndim, 1 : ndim - 1), lowDia, (0._TKG, 0._TKG), (0._TKG, 0._TKG))
401mat
402( +1.82, +1.85), ( +1.20, +1.98)
403( +0.00, +0.00), ( +1.53, +1.66)
404call setResized(inv, shape(mat, IK))
405call setMatInv(inv, mat, upperDiag)
406inv
407( +0.27, -0.27), ( -0.33, +0.22)
408( +0.00, +0.00), ( +0.30, -0.33)
409mul = matmul(mat, inv)
410mul
411( +1.00, +0.00), ( +0.00, +0.00)
412( +0.00, +0.00), ( +1.00, +0.00)
413
414
415ndim = getUnifRand(1_IK, 6_IK)
416ndim ! matrix rank
417+6
418mat = getUnifRand((1., 1.), (2., 2.), ndim, ndim)
419call setMatInit(mat(2 : ndim, 1 : ndim - 1), lowDia, (0._TKG, 0._TKG), (0._TKG, 0._TKG))
420mat
421( +1.96, +1.81), ( +1.13, +1.24), ( +1.38, +1.67), ( +1.88, +1.10), ( +1.45, +1.56), ( +1.39, +1.67)
422( +0.00, +0.00), ( +1.97, +1.31), ( +1.28, +1.49), ( +1.67, +1.18), ( +1.00, +1.84), ( +1.38, +2.00)
423( +0.00, +0.00), ( +0.00, +0.00), ( +1.58, +1.97), ( +1.81, +1.93), ( +1.67, +1.58), ( +1.58, +1.73)
424( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.29, +1.09), ( +1.97, +1.45), ( +1.01, +1.43)
425( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.98, +1.03), ( +1.43, +1.41)
426( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.24, +1.48)
427call setResized(inv, shape(mat, IK))
428call setMatInv(inv, mat, upperDiag)
429inv
430( +0.28, -0.25), ( -0.23, +0.13), ( -0.06, +0.12), ( +0.08, +0.04), ( -0.08, +0.01), ( +0.06, -0.05)
431( +0.00, +0.00), ( +0.35, -0.23), ( -0.27, +0.19), ( +0.05, +0.07), ( -0.12, -0.20), ( -0.05, +0.14)
432( +0.00, +0.00), ( +0.00, +0.00), ( +0.25, -0.31), ( -0.44, +0.43), ( +0.22, -0.16), ( -0.06, +0.21)
433( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.45, -0.38), ( -0.55, +0.34), ( +0.10, -0.09)
434( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.40, -0.21), ( -0.39, +0.25)
435( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.33, -0.40)
436mul = matmul(mat, inv)
437mul
438( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, -0.00), ( +0.00, -0.00), ( +0.00, +0.00)
439( +0.00, +0.00), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, -0.00), ( +0.00, +0.00)
440( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00), ( -0.00, +0.00), ( +0.00, -0.00), ( -0.00, +0.00)
441( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00), ( +0.00, -0.00), ( -0.00, +0.00)
442( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00), ( +0.00, +0.00)
443( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00)
444
445
446ndim = getUnifRand(1_IK, 6_IK)
447ndim ! matrix rank
448+3
449mat = getUnifRand((1., 1.), (2., 2.), ndim, ndim)
450call setMatInit(mat(2 : ndim, 1 : ndim - 1), lowDia, (0._TKG, 0._TKG), (0._TKG, 0._TKG))
451mat
452( +1.08, +1.89), ( +1.34, +1.69), ( +1.30, +1.27)
453( +0.00, +0.00), ( +1.24, +1.84), ( +1.30, +1.40)
454( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +1.27)
455call setResized(inv, shape(mat, IK))
456call setMatInv(inv, mat, upperDiag)
457inv
458( +0.23, -0.40), ( -0.19, +0.40), ( -0.01, -0.02)
459( +0.00, +0.00), ( +0.25, -0.37), ( -0.26, +0.46)
460( +0.00, +0.00), ( +0.00, +0.00), ( +0.38, -0.49)
461mul = matmul(mat, inv)
462mul
463( +1.00, +0.00), ( -0.00, -0.00), ( +0.00, +0.00)
464( +0.00, +0.00), ( +1.00, +0.00), ( +0.00, -0.00)
465( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, -0.00)
466
467
468ndim = getUnifRand(1_IK, 6_IK)
469ndim ! matrix rank
470+6
471mat = getUnifRand((1., 1.), (2., 2.), ndim, ndim)
472call setMatInit(mat(2 : ndim, 1 : ndim - 1), lowDia, (0._TKG, 0._TKG), (0._TKG, 0._TKG))
473mat
474( +1.51, +1.67), ( +1.75, +1.85), ( +1.12, +1.66), ( +1.03, +1.42), ( +1.58, +1.50), ( +1.36, +1.23)
475( +0.00, +0.00), ( +1.31, +1.57), ( +1.14, +1.37), ( +1.93, +1.20), ( +1.35, +1.27), ( +1.96, +1.35)
476( +0.00, +0.00), ( +0.00, +0.00), ( +1.69, +1.15), ( +1.17, +1.50), ( +1.12, +1.66), ( +1.02, +1.87)
477( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.47, +1.74), ( +1.21, +1.79), ( +1.58, +1.49)
478( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.40, +2.00), ( +1.22, +1.14)
479( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.73, +1.72)
480call setResized(inv, shape(mat, IK))
481call setMatInv(inv, mat, upperDiag)
482inv
483( +0.30, -0.33), ( -0.34, +0.43), ( +0.00, -0.09), ( -0.06, -0.21), ( +0.03, +0.22), ( +0.05, -0.12)
484( +0.00, +0.00), ( +0.31, -0.38), ( -0.35, +0.24), ( +0.12, +0.26), ( +0.02, -0.10), ( -0.00, +0.14)
485( +0.00, +0.00), ( +0.00, +0.00), ( +0.41, -0.28), ( -0.35, +0.22), ( -0.03, +0.03), ( -0.09, -0.09)
486( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.28, -0.33), ( -0.26, +0.29), ( -0.08, +0.10)
487( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.24, -0.34), ( -0.15, +0.24)
488( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.29, -0.29)
489mul = matmul(mat, inv)
490mul
491( +1.00, +0.00), ( +0.00, -0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, -0.00), ( -0.00, -0.00)
492( +0.00, +0.00), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, -0.00), ( +0.00, -0.00), ( +0.00, -0.00)
493( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00), ( -0.00, +0.00), ( +0.00, +0.00), ( -0.00, +0.00)
494( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, -0.00), ( +0.00, -0.00), ( +0.00, +0.00)
495( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00), ( -0.00, -0.00)
496( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00)
497
498
499ndim = getUnifRand(1_IK, 6_IK)
500ndim ! matrix rank
501+3
502mat = getUnifRand((1., 1.), (2., 2.), ndim, ndim)
503call setMatInit(mat(2 : ndim, 1 : ndim - 1), lowDia, (0._TKG, 0._TKG), (0._TKG, 0._TKG))
504mat
505( +1.60, +1.04), ( +1.67, +1.54), ( +1.08, +1.63)
506( +0.00, +0.00), ( +1.73, +1.61), ( +1.84, +1.27)
507( +0.00, +0.00), ( +0.00, +0.00), ( +1.62, +1.93)
508call setResized(inv, shape(mat, IK))
509call setMatInv(inv, mat, upperDiag)
510inv
511( +0.44, -0.29), ( -0.42, +0.28), ( -0.07, -0.15)
512( +0.00, +0.00), ( +0.31, -0.29), ( -0.20, +0.32)
513( +0.00, +0.00), ( +0.00, +0.00), ( +0.26, -0.30)
514mul = matmul(mat, inv)
515mul
516( +1.00, +0.00), ( -0.00, +0.00), ( +0.00, -0.00)
517( +0.00, +0.00), ( +1.00, +0.00), ( +0.00, -0.00)
518( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00)
519
520
521!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
522! Compute inverse of a lowerDiag triangular real matrix.
523!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
524
525
526ndim = getUnifRand(1_IK, 6_IK)
527ndim ! matrix rank
528+2
529mat = getUnifRand(1_IK, 9_IK, ndim, ndim)
530call setMatInit(mat(1 : ndim - 1, 2 : ndim), uppDia, 0._TKG, 0._TKG)
531mat
532 +2.00, +0.00
533 +8.00, +7.00
534call setResized(inv, shape(mat, IK))
535call setMatInv(inv, mat, lowerDiag)
536inv
537 +0.50, +0.00
538 -0.57, +0.14
539mul = matmul(mat, inv)
540mul
541 +1.00, +0.00
542 +0.00, +1.00
543
544
545ndim = getUnifRand(1_IK, 6_IK)
546ndim ! matrix rank
547+1
548mat = getUnifRand(1_IK, 9_IK, ndim, ndim)
549call setMatInit(mat(1 : ndim - 1, 2 : ndim), uppDia, 0._TKG, 0._TKG)
550mat
551 +7.00
552call setResized(inv, shape(mat, IK))
553call setMatInv(inv, mat, lowerDiag)
554inv
555 +0.14
556mul = matmul(mat, inv)
557mul
558 +1.00
559
560
561ndim = getUnifRand(1_IK, 6_IK)
562ndim ! matrix rank
563+1
564mat = getUnifRand(1_IK, 9_IK, ndim, ndim)
565call setMatInit(mat(1 : ndim - 1, 2 : ndim), uppDia, 0._TKG, 0._TKG)
566mat
567 +6.00
568call setResized(inv, shape(mat, IK))
569call setMatInv(inv, mat, lowerDiag)
570inv
571 +0.17
572mul = matmul(mat, inv)
573mul
574 +1.00
575
576
577ndim = getUnifRand(1_IK, 6_IK)
578ndim ! matrix rank
579+1
580mat = getUnifRand(1_IK, 9_IK, ndim, ndim)
581call setMatInit(mat(1 : ndim - 1, 2 : ndim), uppDia, 0._TKG, 0._TKG)
582mat
583 +2.00
584call setResized(inv, shape(mat, IK))
585call setMatInv(inv, mat, lowerDiag)
586inv
587 +0.50
588mul = matmul(mat, inv)
589mul
590 +1.00
591
592
593ndim = getUnifRand(1_IK, 6_IK)
594ndim ! matrix rank
595+1
596mat = getUnifRand(1_IK, 9_IK, ndim, ndim)
597call setMatInit(mat(1 : ndim - 1, 2 : ndim), uppDia, 0._TKG, 0._TKG)
598mat
599 +4.00
600call setResized(inv, shape(mat, IK))
601call setMatInv(inv, mat, lowerDiag)
602inv
603 +0.25
604mul = matmul(mat, inv)
605mul
606 +1.00
607
608
609ndim = getUnifRand(1_IK, 6_IK)
610ndim ! matrix rank
611+2
612mat = getUnifRand(1_IK, 9_IK, ndim, ndim)
613call setMatInit(mat(1 : ndim - 1, 2 : ndim), uppDia, 0._TKG, 0._TKG)
614mat
615 +1.00, +0.00
616 +1.00, +6.00
617call setResized(inv, shape(mat, IK))
618call setMatInv(inv, mat, lowerDiag)
619inv
620 +1.00, +0.00
621 -0.17, +0.17
622mul = matmul(mat, inv)
623mul
624 +1.00, +0.00
625 +0.00, +1.00
626
627
628ndim = getUnifRand(1_IK, 6_IK)
629ndim ! matrix rank
630+6
631mat = getUnifRand(1_IK, 9_IK, ndim, ndim)
632call setMatInit(mat(1 : ndim - 1, 2 : ndim), uppDia, 0._TKG, 0._TKG)
633mat
634 +3.00, +0.00, +0.00, +0.00, +0.00, +0.00
635 +3.00, +6.00, +0.00, +0.00, +0.00, +0.00
636 +4.00, +3.00, +6.00, +0.00, +0.00, +0.00
637 +6.00, +7.00, +3.00, +6.00, +0.00, +0.00
638 +2.00, +7.00, +1.00, +6.00, +2.00, +0.00
639 +7.00, +7.00, +2.00, +8.00, +7.00, +7.00
640call setResized(inv, shape(mat, IK))
641call setMatInv(inv, mat, lowerDiag)
642inv
643 +0.33, +0.00, +0.00, +0.00, +0.00, +0.00
644 -0.17, +0.17, +0.00, +0.00, +0.00, +0.00
645 -0.14, -0.08, +0.17, +0.00, +0.00, +0.00
646 -0.07, -0.15, -0.08, +0.17, +0.00, +0.00
647 +0.53, -0.08, +0.17, -0.50, +0.50, +0.00
648 -0.58, +0.12, -0.12, +0.31, -0.50, +0.14
649mul = matmul(mat, inv)
650mul
651 +1.00, +0.00, +0.00, +0.00, +0.00, +0.00
652 +0.00, +1.00, +0.00, +0.00, +0.00, +0.00
653 +0.00, +0.00, +1.00, +0.00, +0.00, +0.00
654 -0.00, +0.00, +0.00, +1.00, +0.00, +0.00
655 +0.00, +0.00, +0.00, +0.00, +1.00, +0.00
656 +0.00, +0.00, +0.00, +0.00, +0.00, +1.00
657
658
659ndim = getUnifRand(1_IK, 6_IK)
660ndim ! matrix rank
661+1
662mat = getUnifRand(1_IK, 9_IK, ndim, ndim)
663call setMatInit(mat(1 : ndim - 1, 2 : ndim), uppDia, 0._TKG, 0._TKG)
664mat
665 +4.00
666call setResized(inv, shape(mat, IK))
667call setMatInv(inv, mat, lowerDiag)
668inv
669 +0.25
670mul = matmul(mat, inv)
671mul
672 +1.00
673
674
675ndim = getUnifRand(1_IK, 6_IK)
676ndim ! matrix rank
677+1
678mat = getUnifRand(1_IK, 9_IK, ndim, ndim)
679call setMatInit(mat(1 : ndim - 1, 2 : ndim), uppDia, 0._TKG, 0._TKG)
680mat
681 +7.00
682call setResized(inv, shape(mat, IK))
683call setMatInv(inv, mat, lowerDiag)
684inv
685 +0.14
686mul = matmul(mat, inv)
687mul
688 +1.00
689
690
691ndim = getUnifRand(1_IK, 6_IK)
692ndim ! matrix rank
693+2
694mat = getUnifRand(1_IK, 9_IK, ndim, ndim)
695call setMatInit(mat(1 : ndim - 1, 2 : ndim), uppDia, 0._TKG, 0._TKG)
696mat
697 +3.00, +0.00
698 +5.00, +5.00
699call setResized(inv, shape(mat, IK))
700call setMatInv(inv, mat, lowerDiag)
701inv
702 +0.33, +0.00
703 -0.33, +0.20
704mul = matmul(mat, inv)
705mul
706 +1.00, +0.00
707 +0.00, +1.00
708
709
710!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
711! Compute inverse of a lowerDiag triangular complex matrix.
712!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
713
714
715ndim = getUnifRand(1_IK, 6_IK)
716ndim ! matrix rank
717+6
718mat = getUnifRand((1., 1.), (2., 2.), ndim, ndim)
719call setMatInit(mat(1 : ndim - 1, 2 : ndim), uppDia, (0._TKG, 0._TKG), (0._TKG, 0._TKG))
720mat
721( +1.37, +1.02), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
722( +1.98, +1.39), ( +1.88, +1.37), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
723( +1.91, +1.81), ( +1.63, +1.03), ( +1.25, +1.21), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
724( +1.08, +1.14), ( +1.73, +1.25), ( +1.78, +1.19), ( +1.55, +1.40), ( +0.00, +0.00), ( +0.00, +0.00)
725( +1.91, +1.96), ( +1.41, +1.97), ( +1.10, +1.37), ( +1.17, +1.53), ( +1.26, +1.84), ( +0.00, +0.00)
726( +1.56, +1.69), ( +1.09, +1.55), ( +1.47, +1.93), ( +1.70, +1.97), ( +1.48, +1.88), ( +1.91, +1.19)
727call setResized(inv, shape(mat, IK))
728call setMatInv(inv, mat, lowerDiag)
729inv
730( +0.47, -0.35), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
731( -0.48, +0.37), ( +0.35, -0.25), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
732( -0.26, +0.02), ( -0.32, +0.35), ( +0.41, -0.40), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
733( +0.34, -0.26), ( -0.05, -0.11), ( -0.36, +0.47), ( +0.35, -0.32), ( +0.00, +0.00), ( +0.00, +0.00)
734( -0.06, +0.31), ( -0.09, +0.08), ( -0.01, -0.08), ( -0.29, +0.29), ( +0.25, -0.37), ( +0.00, +0.00)
735( -0.08, +0.04), ( +0.25, -0.06), ( -0.03, -0.06), ( -0.10, +0.04), ( -0.39, +0.28), ( +0.38, -0.24)
736mul = matmul(mat, inv)
737mul
738( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
739( +0.00, +0.00), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
740( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
741( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
742( +0.00, +0.00), ( +0.00, -0.00), ( +0.00, -0.00), ( +0.00, -0.00), ( +1.00, +0.00), ( +0.00, +0.00)
743( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00)
744
745
746ndim = getUnifRand(1_IK, 6_IK)
747ndim ! matrix rank
748+5
749mat = getUnifRand((1., 1.), (2., 2.), ndim, ndim)
750call setMatInit(mat(1 : ndim - 1, 2 : ndim), uppDia, (0._TKG, 0._TKG), (0._TKG, 0._TKG))
751mat
752( +1.26, +1.95), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
753( +1.26, +1.32), ( +1.16, +1.19), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
754( +1.09, +1.30), ( +1.83, +1.70), ( +1.75, +1.99), ( +0.00, +0.00), ( +0.00, +0.00)
755( +1.00, +1.42), ( +1.90, +1.08), ( +1.05, +1.60), ( +1.66, +1.88), ( +0.00, +0.00)
756( +1.90, +1.78), ( +1.20, +1.32), ( +1.28, +1.20), ( +1.06, +1.60), ( +1.69, +1.68)
757call setResized(inv, shape(mat, IK))
758call setMatInv(inv, mat, lowerDiag)
759inv
760( +0.23, -0.36), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
761( -0.26, +0.39), ( +0.42, -0.43), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
762( +0.05, -0.16), ( -0.35, +0.44), ( +0.25, -0.28), ( +0.00, +0.00), ( +0.00, +0.00)
763( -0.14, -0.04), ( +0.09, +0.17), ( -0.22, +0.19), ( +0.26, -0.30), ( +0.00, +0.00)
764( +0.04, +0.30), ( -0.12, -0.18), ( +0.03, +0.10), ( -0.26, +0.19), ( +0.30, -0.30)
765mul = matmul(mat, inv)
766mul
767( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
768( +0.00, -0.00), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
769( -0.00, +0.00), ( +0.00, +0.00), ( +1.00, -0.00), ( +0.00, +0.00), ( +0.00, +0.00)
770( +0.00, +0.00), ( +0.00, -0.00), ( +0.00, +0.00), ( +1.00, -0.00), ( +0.00, +0.00)
771( -0.00, +0.00), ( +0.00, +0.00), ( +0.00, -0.00), ( +0.00, +0.00), ( +1.00, +0.00)
772
773
774ndim = getUnifRand(1_IK, 6_IK)
775ndim ! matrix rank
776+6
777mat = getUnifRand((1., 1.), (2., 2.), ndim, ndim)
778call setMatInit(mat(1 : ndim - 1, 2 : ndim), uppDia, (0._TKG, 0._TKG), (0._TKG, 0._TKG))
779mat
780( +1.06, +1.54), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
781( +1.97, +1.99), ( +1.70, +1.94), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
782( +1.55, +1.63), ( +1.26, +1.23), ( +1.24, +1.63), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
783( +1.36, +1.57), ( +1.13, +1.04), ( +1.14, +1.14), ( +1.13, +1.86), ( +0.00, +0.00), ( +0.00, +0.00)
784( +1.05, +1.66), ( +1.30, +1.64), ( +1.08, +1.72), ( +1.56, +1.70), ( +1.13, +1.24), ( +0.00, +0.00)
785( +1.98, +1.50), ( +1.07, +1.71), ( +1.80, +1.88), ( +1.41, +1.28), ( +1.09, +1.91), ( +1.36, +1.34)
786call setResized(inv, shape(mat, IK))
787call setMatInv(inv, mat, lowerDiag)
788inv
789( +0.30, -0.44), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
790( -0.30, +0.50), ( +0.26, -0.29), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
791( -0.08, +0.06), ( -0.18, +0.28), ( +0.30, -0.39), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
792( -0.06, +0.01), ( -0.03, +0.01), ( -0.14, +0.33), ( +0.24, -0.39), ( +0.00, +0.00), ( +0.00, +0.00)
793( +0.17, -0.21), ( -0.02, +0.03), ( -0.24, -0.06), ( -0.33, +0.54), ( +0.40, -0.44), ( +0.00, +0.00)
794( +0.04, +0.28), ( -0.01, -0.18), ( -0.04, +0.32), ( +0.31, -0.10), ( -0.58, +0.36), ( +0.37, -0.37)
795mul = matmul(mat, inv)
796mul
797( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
798( -0.00, +0.00), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
799( -0.00, +0.00), ( -0.00, +0.00), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
800( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
801( +0.00, -0.00), ( +0.00, +0.00), ( +0.00, -0.00), ( -0.00, +0.00), ( +1.00, -0.00), ( +0.00, +0.00)
802( +0.00, +0.00), ( +0.00, +0.00), ( -0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00)
803
804
805ndim = getUnifRand(1_IK, 6_IK)
806ndim ! matrix rank
807+2
808mat = getUnifRand((1., 1.), (2., 2.), ndim, ndim)
809call setMatInit(mat(1 : ndim - 1, 2 : ndim), uppDia, (0._TKG, 0._TKG), (0._TKG, 0._TKG))
810mat
811( +1.62, +1.61), ( +0.00, +0.00)
812( +1.78, +1.89), ( +1.73, +1.68)
813call setResized(inv, shape(mat, IK))
814call setMatInv(inv, mat, lowerDiag)
815inv
816( +0.31, -0.31), ( +0.00, +0.00)
817( -0.35, +0.32), ( +0.30, -0.29)
818mul = matmul(mat, inv)
819mul
820( +1.00, +0.00), ( +0.00, +0.00)
821( -0.00, +0.00), ( +1.00, -0.00)
822
823
824ndim = getUnifRand(1_IK, 6_IK)
825ndim ! matrix rank
826+5
827mat = getUnifRand((1., 1.), (2., 2.), ndim, ndim)
828call setMatInit(mat(1 : ndim - 1, 2 : ndim), uppDia, (0._TKG, 0._TKG), (0._TKG, 0._TKG))
829mat
830( +1.91, +1.99), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
831( +1.53, +1.13), ( +1.78, +1.94), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
832( +1.98, +1.47), ( +1.14, +1.37), ( +1.37, +1.48), ( +0.00, +0.00), ( +0.00, +0.00)
833( +1.67, +1.27), ( +1.05, +1.30), ( +1.11, +1.44), ( +1.44, +1.59), ( +0.00, +0.00)
834( +1.40, +1.18), ( +1.37, +1.81), ( +1.98, +1.75), ( +1.72, +1.41), ( +1.59, +1.35)
835call setResized(inv, shape(mat, IK))
836call setMatInv(inv, mat, lowerDiag)
837inv
838( +0.25, -0.26), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
839( -0.14, +0.22), ( +0.26, -0.28), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
840( -0.11, +0.18), ( -0.24, +0.24), ( +0.34, -0.36), ( +0.00, +0.00), ( +0.00, +0.00)
841( +0.03, -0.02), ( +0.01, +0.02), ( -0.31, +0.29), ( +0.31, -0.35), ( +0.00, +0.00)
842( +0.09, -0.18), ( -0.04, -0.08), ( -0.11, +0.14), ( -0.33, +0.37), ( +0.37, -0.31)
843mul = matmul(mat, inv)
844mul
845( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
846( +0.00, +0.00), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
847( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
848( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00), ( +0.00, +0.00)
849( +0.00, -0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00)
850
851
852ndim = getUnifRand(1_IK, 6_IK)
853ndim ! matrix rank
854+1
855mat = getUnifRand((1., 1.), (2., 2.), ndim, ndim)
856call setMatInit(mat(1 : ndim - 1, 2 : ndim), uppDia, (0._TKG, 0._TKG), (0._TKG, 0._TKG))
857mat
858( +1.63, +1.51)
859call setResized(inv, shape(mat, IK))
860call setMatInv(inv, mat, lowerDiag)
861inv
862( +0.33, -0.31)
863mul = matmul(mat, inv)
864mul
865( +1.00, +0.00)
866
867
868ndim = getUnifRand(1_IK, 6_IK)
869ndim ! matrix rank
870+4
871mat = getUnifRand((1., 1.), (2., 2.), ndim, ndim)
872call setMatInit(mat(1 : ndim - 1, 2 : ndim), uppDia, (0._TKG, 0._TKG), (0._TKG, 0._TKG))
873mat
874( +1.22, +1.64), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
875( +1.31, +1.97), ( +1.82, +1.92), ( +0.00, +0.00), ( +0.00, +0.00)
876( +1.40, +1.02), ( +1.56, +1.22), ( +1.56, +1.24), ( +0.00, +0.00)
877( +1.60, +1.35), ( +1.05, +1.32), ( +1.33, +1.71), ( +1.97, +1.10)
878call setResized(inv, shape(mat, IK))
879call setMatInv(inv, mat, lowerDiag)
880inv
881( +0.29, -0.39), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
882( -0.32, +0.30), ( +0.26, -0.27), ( +0.00, +0.00), ( +0.00, +0.00)
883( +0.07, +0.05), ( -0.26, +0.27), ( +0.39, -0.31), ( +0.00, +0.00)
884( -0.08, +0.12), ( +0.07, -0.03), ( -0.46, +0.13), ( +0.39, -0.22)
885mul = matmul(mat, inv)
886mul
887( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
888( +0.00, +0.00), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
889( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, -0.00), ( +0.00, +0.00)
890( +0.00, -0.00), ( +0.00, -0.00), ( +0.00, +0.00), ( +1.00, -0.00)
891
892
893ndim = getUnifRand(1_IK, 6_IK)
894ndim ! matrix rank
895+6
896mat = getUnifRand((1., 1.), (2., 2.), ndim, ndim)
897call setMatInit(mat(1 : ndim - 1, 2 : ndim), uppDia, (0._TKG, 0._TKG), (0._TKG, 0._TKG))
898mat
899( +1.40, +1.86), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
900( +1.73, +1.31), ( +1.63, +1.04), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
901( +1.46, +1.14), ( +1.93, +1.76), ( +1.26, +1.02), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
902( +1.61, +1.14), ( +1.52, +1.64), ( +1.19, +1.03), ( +1.20, +1.29), ( +0.00, +0.00), ( +0.00, +0.00)
903( +1.92, +1.56), ( +1.09, +1.29), ( +1.61, +1.75), ( +1.63, +1.66), ( +1.67, +1.30), ( +0.00, +0.00)
904( +1.55, +1.61), ( +1.88, +1.48), ( +1.70, +1.95), ( +1.75, +1.51), ( +1.27, +1.77), ( +1.02, +1.87)
905call setResized(inv, shape(mat, IK))
906call setMatInv(inv, mat, lowerDiag)
907inv
908( +0.26, -0.34), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
909( -0.32, +0.36), ( +0.44, -0.28), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
910( +0.26, -0.15), ( -0.73, +0.40), ( +0.48, -0.39), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
911( -0.02, +0.14), ( +0.05, -0.08), ( -0.39, +0.39), ( +0.39, -0.42), ( +0.00, +0.00), ( +0.00, +0.00)
912( -0.28, +0.13), ( +0.42, -0.09), ( -0.12, -0.03), ( -0.48, +0.40), ( +0.37, -0.29), ( +0.00, +0.00)
913( -0.03, -0.17), ( -0.02, +0.06), ( -0.09, +0.05), ( +0.21, +0.11), ( -0.34, +0.34), ( +0.22, -0.41)
914mul = matmul(mat, inv)
915mul
916( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
917( -0.00, -0.00), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
918( +0.00, +0.00), ( -0.00, +0.00), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
919( +0.00, -0.00), ( -0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
920( +0.00, -0.00), ( +0.00, -0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00), ( +0.00, +0.00)
921( -0.00, +0.00), ( +0.00, -0.00), ( +0.00, +0.00), ( +0.00, -0.00), ( +0.00, +0.00), ( +1.00, +0.00)
922
923
924ndim = getUnifRand(1_IK, 6_IK)
925ndim ! matrix rank
926+5
927mat = getUnifRand((1., 1.), (2., 2.), ndim, ndim)
928call setMatInit(mat(1 : ndim - 1, 2 : ndim), uppDia, (0._TKG, 0._TKG), (0._TKG, 0._TKG))
929mat
930( +1.93, +1.18), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
931( +1.37, +1.72), ( +1.18, +1.69), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
932( +1.13, +1.93), ( +1.39, +1.86), ( +1.16, +1.95), ( +0.00, +0.00), ( +0.00, +0.00)
933( +1.03, +1.56), ( +1.43, +1.13), ( +1.67, +1.83), ( +1.74, +1.61), ( +0.00, +0.00)
934( +1.30, +1.04), ( +1.77, +1.69), ( +1.02, +1.63), ( +1.30, +1.55), ( +1.15, +1.26)
935call setResized(inv, shape(mat, IK))
936call setMatInv(inv, mat, lowerDiag)
937inv
938( +0.38, -0.23), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
939( -0.39, +0.27), ( +0.28, -0.40), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
940( -0.01, -0.09), ( -0.24, +0.44), ( +0.22, -0.38), ( +0.00, +0.00), ( +0.00, +0.00)
941( -0.05, -0.03), ( +0.10, -0.11), ( -0.27, +0.38), ( +0.31, -0.29), ( +0.00, +0.00)
942( +0.25, -0.01), ( -0.13, +0.29), ( +0.01, -0.06), ( -0.38, +0.33), ( +0.40, -0.43)
943mul = matmul(mat, inv)
944mul
945( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
946( +0.00, -0.00), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
947( -0.00, +0.00), ( +0.00, +0.00), ( +1.00, -0.00), ( +0.00, +0.00), ( +0.00, +0.00)
948( +0.00, -0.00), ( +0.00, +0.00), ( +0.00, -0.00), ( +1.00, +0.00), ( +0.00, +0.00)
949( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, -0.00), ( +1.00, -0.00)
950
951
952ndim = getUnifRand(1_IK, 6_IK)
953ndim ! matrix rank
954+2
955mat = getUnifRand((1., 1.), (2., 2.), ndim, ndim)
956call setMatInit(mat(1 : ndim - 1, 2 : ndim), uppDia, (0._TKG, 0._TKG), (0._TKG, 0._TKG))
957mat
958( +1.33, +1.83), ( +0.00, +0.00)
959( +1.45, +1.94), ( +1.09, +1.01)
960call setResized(inv, shape(mat, IK))
961call setMatInv(inv, mat, lowerDiag)
962inv
963( +0.26, -0.36), ( +0.00, +0.00)
964( -0.52, +0.50), ( +0.49, -0.46)
965mul = matmul(mat, inv)
966mul
967( +1.00, +0.00), ( +0.00, +0.00)
968( +0.00, +0.00), ( +1.00, +0.00)
969
970
971!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
972! Compute inverse of a upperUnit triangular real matrix.
973!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
974
975
976ndim = getUnifRand(1_IK, 6_IK)
977ndim ! matrix rank
978+3
979mat = getUnifRand(1_IK, 9_IK, ndim, ndim)
980call setMatInit(mat, lowDia, 0._TKG, 1._TKG)
981mat
982 +1.00, +8.00, +7.00
983 +0.00, +1.00, +3.00
984 +0.00, +0.00, +1.00
985call setResized(inv, shape(mat, IK))
986call setMatInv(inv, mat, upperUnit)
987inv
988 +1.00, -8.00, +17.00
989 +0.00, +1.00, -3.00
990 +0.00, +0.00, +1.00
991mul = matmul(mat, inv)
992mul
993 +1.00, +0.00, +0.00
994 +0.00, +1.00, +0.00
995 +0.00, +0.00, +1.00
996
997
998ndim = getUnifRand(1_IK, 6_IK)
999ndim ! matrix rank
1000+5
1001mat = getUnifRand(1_IK, 9_IK, ndim, ndim)
1002call setMatInit(mat, lowDia, 0._TKG, 1._TKG)
1003mat
1004 +1.00, +5.00, +9.00, +1.00, +6.00
1005 +0.00, +1.00, +3.00, +8.00, +2.00
1006 +0.00, +0.00, +1.00, +7.00, +9.00
1007 +0.00, +0.00, +0.00, +1.00, +9.00
1008 +0.00, +0.00, +0.00, +0.00, +1.00
1009call setResized(inv, shape(mat, IK))
1010call setMatInv(inv, mat, upperUnit)
1011inv
1012 +1.00, -5.00, +6.00, -3.00, -23.00
1013 +0.00, +1.00, -3.00, +13.00, -92.00
1014 +0.00, +0.00, +1.00, -7.00, +54.00
1015 +0.00, +0.00, +0.00, +1.00, -9.00
1016 +0.00, +0.00, +0.00, +0.00, +1.00
1017mul = matmul(mat, inv)
1018mul
1019 +1.00, +0.00, +0.00, +0.00, +0.00
1020 +0.00, +1.00, +0.00, +0.00, +0.00
1021 +0.00, +0.00, +1.00, +0.00, +0.00
1022 +0.00, +0.00, +0.00, +1.00, +0.00
1023 +0.00, +0.00, +0.00, +0.00, +1.00
1024
1025
1026ndim = getUnifRand(1_IK, 6_IK)
1027ndim ! matrix rank
1028+3
1029mat = getUnifRand(1_IK, 9_IK, ndim, ndim)
1030call setMatInit(mat, lowDia, 0._TKG, 1._TKG)
1031mat
1032 +1.00, +6.00, +7.00
1033 +0.00, +1.00, +6.00
1034 +0.00, +0.00, +1.00
1035call setResized(inv, shape(mat, IK))
1036call setMatInv(inv, mat, upperUnit)
1037inv
1038 +1.00, -6.00, +29.00
1039 +0.00, +1.00, -6.00
1040 +0.00, +0.00, +1.00
1041mul = matmul(mat, inv)
1042mul
1043 +1.00, +0.00, +0.00
1044 +0.00, +1.00, +0.00
1045 +0.00, +0.00, +1.00
1046
1047
1048ndim = getUnifRand(1_IK, 6_IK)
1049ndim ! matrix rank
1050+2
1051mat = getUnifRand(1_IK, 9_IK, ndim, ndim)
1052call setMatInit(mat, lowDia, 0._TKG, 1._TKG)
1053mat
1054 +1.00, +3.00
1055 +0.00, +1.00
1056call setResized(inv, shape(mat, IK))
1057call setMatInv(inv, mat, upperUnit)
1058inv
1059 +1.00, -3.00
1060 +0.00, +1.00
1061mul = matmul(mat, inv)
1062mul
1063 +1.00, +0.00
1064 +0.00, +1.00
1065
1066
1067ndim = getUnifRand(1_IK, 6_IK)
1068ndim ! matrix rank
1069+3
1070mat = getUnifRand(1_IK, 9_IK, ndim, ndim)
1071call setMatInit(mat, lowDia, 0._TKG, 1._TKG)
1072mat
1073 +1.00, +7.00, +1.00
1074 +0.00, +1.00, +6.00
1075 +0.00, +0.00, +1.00
1076call setResized(inv, shape(mat, IK))
1077call setMatInv(inv, mat, upperUnit)
1078inv
1079 +1.00, -7.00, +41.00
1080 +0.00, +1.00, -6.00
1081 +0.00, +0.00, +1.00
1082mul = matmul(mat, inv)
1083mul
1084 +1.00, +0.00, +0.00
1085 +0.00, +1.00, +0.00
1086 +0.00, +0.00, +1.00
1087
1088
1089ndim = getUnifRand(1_IK, 6_IK)
1090ndim ! matrix rank
1091+6
1092mat = getUnifRand(1_IK, 9_IK, ndim, ndim)
1093call setMatInit(mat, lowDia, 0._TKG, 1._TKG)
1094mat
1095 +1.00, +8.00, +2.00, +7.00, +2.00, +4.00
1096 +0.00, +1.00, +5.00, +4.00, +7.00, +8.00
1097 +0.00, +0.00, +1.00, +9.00, +9.00, +1.00
1098 +0.00, +0.00, +0.00, +1.00, +1.00, +8.00
1099 +0.00, +0.00, +0.00, +0.00, +1.00, +7.00
1100 +0.00, +0.00, +0.00, +0.00, +0.00, +1.00
1101call setResized(inv, shape(mat, IK))
1102call setMatInv(inv, mat, upperUnit)
1103inv
1104 +1.00, -8.00, +38.00, -317.00, +29.00, +2355.00
1105 +0.00, +1.00, -5.00, +41.00, -3.00, -310.00
1106 +0.00, +0.00, +1.00, -9.00, -0.00, +71.00
1107 +0.00, +0.00, +0.00, +1.00, -1.00, -1.00
1108 +0.00, +0.00, +0.00, +0.00, +1.00, -7.00
1109 +0.00, +0.00, +0.00, +0.00, +0.00, +1.00
1110mul = matmul(mat, inv)
1111mul
1112 +1.00, +0.00, +0.00, +0.00, +0.00, +0.00
1113 +0.00, +1.00, +0.00, +0.00, +0.00, +0.00
1114 +0.00, +0.00, +1.00, +0.00, +0.00, +0.00
1115 +0.00, +0.00, +0.00, +1.00, +0.00, +0.00
1116 +0.00, +0.00, +0.00, +0.00, +1.00, +0.00
1117 +0.00, +0.00, +0.00, +0.00, +0.00, +1.00
1118
1119
1120ndim = getUnifRand(1_IK, 6_IK)
1121ndim ! matrix rank
1122+5
1123mat = getUnifRand(1_IK, 9_IK, ndim, ndim)
1124call setMatInit(mat, lowDia, 0._TKG, 1._TKG)
1125mat
1126 +1.00, +4.00, +2.00, +9.00, +1.00
1127 +0.00, +1.00, +1.00, +6.00, +5.00
1128 +0.00, +0.00, +1.00, +6.00, +3.00
1129 +0.00, +0.00, +0.00, +1.00, +8.00
1130 +0.00, +0.00, +0.00, +0.00, +1.00
1131call setResized(inv, shape(mat, IK))
1132call setMatInv(inv, mat, upperUnit)
1133inv
1134 +1.00, -4.00, +2.00, +3.00, -11.00
1135 +0.00, +1.00, -1.00, -0.00, -2.00
1136 +0.00, +0.00, +1.00, -6.00, +45.00
1137 +0.00, +0.00, +0.00, +1.00, -8.00
1138 +0.00, +0.00, +0.00, +0.00, +1.00
1139mul = matmul(mat, inv)
1140mul
1141 +1.00, +0.00, +0.00, +0.00, +0.00
1142 +0.00, +1.00, +0.00, +0.00, +0.00
1143 +0.00, +0.00, +1.00, +0.00, +0.00
1144 +0.00, +0.00, +0.00, +1.00, +0.00
1145 +0.00, +0.00, +0.00, +0.00, +1.00
1146
1147
1148ndim = getUnifRand(1_IK, 6_IK)
1149ndim ! matrix rank
1150+6
1151mat = getUnifRand(1_IK, 9_IK, ndim, ndim)
1152call setMatInit(mat, lowDia, 0._TKG, 1._TKG)
1153mat
1154 +1.00, +8.00, +4.00, +1.00, +6.00, +5.00
1155 +0.00, +1.00, +9.00, +1.00, +2.00, +6.00
1156 +0.00, +0.00, +1.00, +8.00, +4.00, +5.00
1157 +0.00, +0.00, +0.00, +1.00, +6.00, +4.00
1158 +0.00, +0.00, +0.00, +0.00, +1.00, +6.00
1159 +0.00, +0.00, +0.00, +0.00, +0.00, +1.00
1160call setResized(inv, shape(mat, IK))
1161call setMatInv(inv, mat, upperUnit)
1162inv
1163 +1.00, -8.00, +68.00, -537.00, +2960.00, -15909.00
1164 +0.00, +1.00, -9.00, +71.00, -392.00, +2107.00
1165 +0.00, +0.00, +1.00, -8.00, +44.00, -237.00
1166 +0.00, +0.00, +0.00, +1.00, -6.00, +32.00
1167 +0.00, +0.00, +0.00, +0.00, +1.00, -6.00
1168 +0.00, +0.00, +0.00, +0.00, +0.00, +1.00
1169mul = matmul(mat, inv)
1170mul
1171 +1.00, +0.00, +0.00, +0.00, +0.00, +0.00
1172 +0.00, +1.00, +0.00, +0.00, +0.00, +0.00
1173 +0.00, +0.00, +1.00, +0.00, +0.00, +0.00
1174 +0.00, +0.00, +0.00, +1.00, +0.00, +0.00
1175 +0.00, +0.00, +0.00, +0.00, +1.00, +0.00
1176 +0.00, +0.00, +0.00, +0.00, +0.00, +1.00
1177
1178
1179ndim = getUnifRand(1_IK, 6_IK)
1180ndim ! matrix rank
1181+5
1182mat = getUnifRand(1_IK, 9_IK, ndim, ndim)
1183call setMatInit(mat, lowDia, 0._TKG, 1._TKG)
1184mat
1185 +1.00, +7.00, +8.00, +2.00, +4.00
1186 +0.00, +1.00, +2.00, +2.00, +6.00
1187 +0.00, +0.00, +1.00, +2.00, +8.00
1188 +0.00, +0.00, +0.00, +1.00, +7.00
1189 +0.00, +0.00, +0.00, +0.00, +1.00
1190call setResized(inv, shape(mat, IK))
1191call setMatInv(inv, mat, upperUnit)
1192inv
1193 +1.00, -7.00, +6.00, -0.00, -10.00
1194 +0.00, +1.00, -2.00, +2.00, -4.00
1195 +0.00, +0.00, +1.00, -2.00, +6.00
1196 +0.00, +0.00, +0.00, +1.00, -7.00
1197 +0.00, +0.00, +0.00, +0.00, +1.00
1198mul = matmul(mat, inv)
1199mul
1200 +1.00, +0.00, +0.00, +0.00, +0.00
1201 +0.00, +1.00, +0.00, +0.00, +0.00
1202 +0.00, +0.00, +1.00, +0.00, +0.00
1203 +0.00, +0.00, +0.00, +1.00, +0.00
1204 +0.00, +0.00, +0.00, +0.00, +1.00
1205
1206
1207ndim = getUnifRand(1_IK, 6_IK)
1208ndim ! matrix rank
1209+6
1210mat = getUnifRand(1_IK, 9_IK, ndim, ndim)
1211call setMatInit(mat, lowDia, 0._TKG, 1._TKG)
1212mat
1213 +1.00, +8.00, +3.00, +1.00, +9.00, +7.00
1214 +0.00, +1.00, +6.00, +8.00, +9.00, +7.00
1215 +0.00, +0.00, +1.00, +2.00, +5.00, +9.00
1216 +0.00, +0.00, +0.00, +1.00, +2.00, +5.00
1217 +0.00, +0.00, +0.00, +0.00, +1.00, +5.00
1218 +0.00, +0.00, +0.00, +0.00, +0.00, +1.00
1219call setResized(inv, shape(mat, IK))
1220call setMatInv(inv, mat, upperUnit)
1221inv
1222 +1.00, -8.00, +45.00, -27.00, -108.00, +319.00
1223 +0.00, +1.00, -6.00, +4.00, +13.00, -38.00
1224 +0.00, +0.00, +1.00, -2.00, -1.00, +6.00
1225 +0.00, +0.00, +0.00, +1.00, -2.00, +5.00
1226 +0.00, +0.00, +0.00, +0.00, +1.00, -5.00
1227 +0.00, +0.00, +0.00, +0.00, +0.00, +1.00
1228mul = matmul(mat, inv)
1229mul
1230 +1.00, +0.00, +0.00, +0.00, +0.00, +0.00
1231 +0.00, +1.00, +0.00, +0.00, +0.00, +0.00
1232 +0.00, +0.00, +1.00, +0.00, +0.00, +0.00
1233 +0.00, +0.00, +0.00, +1.00, +0.00, +0.00
1234 +0.00, +0.00, +0.00, +0.00, +1.00, +0.00
1235 +0.00, +0.00, +0.00, +0.00, +0.00, +1.00
1236
1237
1238!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1239! Compute inverse of a upperUnit triangular complex matrix.
1240!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1241
1242
1243ndim = getUnifRand(1_IK, 6_IK)
1244ndim ! matrix rank
1245+4
1246mat = getUnifRand((-1., -1.), (+1., +1.), ndim, ndim)
1247call setMatInit(mat, lowDia, (0._TKG, 0._TKG), (1._TKG, 0._TKG))
1248mat
1249( +1.00, +0.00), ( -0.64, +0.81), ( +0.73, +0.84), ( +0.24, +0.31)
1250( +0.00, +0.00), ( +1.00, +0.00), ( -0.81, -0.97), ( -0.60, +0.31)
1251( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00), ( +0.30, +0.95)
1252( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00)
1253call setResized(inv, shape(mat, IK))
1254call setMatInv(inv, mat, upperUnit)
1255inv
1256( +1.00, +0.00), ( +0.64, -0.81), ( +0.57, -0.88), ( -1.12, -1.27)
1257( +0.00, +0.00), ( +1.00, +0.00), ( +0.81, +0.97), ( +1.28, -1.37)
1258( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00), ( -0.30, -0.95)
1259( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00)
1260mul = matmul(mat, inv)
1261mul
1262( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( -0.00, -0.00)
1263( +0.00, +0.00), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1264( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00), ( +0.00, +0.00)
1265( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00)
1266
1267
1268ndim = getUnifRand(1_IK, 6_IK)
1269ndim ! matrix rank
1270+3
1271mat = getUnifRand((-1., -1.), (+1., +1.), ndim, ndim)
1272call setMatInit(mat, lowDia, (0._TKG, 0._TKG), (1._TKG, 0._TKG))
1273mat
1274( +1.00, +0.00), ( -0.98, -0.48), ( +0.24, +0.02)
1275( +0.00, +0.00), ( +1.00, +0.00), ( -0.05, -0.86)
1276( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00)
1277call setResized(inv, shape(mat, IK))
1278call setMatInv(inv, mat, upperUnit)
1279inv
1280( +1.00, +0.00), ( +0.98, +0.48), ( -0.60, +0.86)
1281( +0.00, +0.00), ( +1.00, +0.00), ( +0.05, +0.86)
1282( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00)
1283mul = matmul(mat, inv)
1284mul
1285( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1286( +0.00, +0.00), ( +1.00, +0.00), ( +0.00, +0.00)
1287( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00)
1288
1289
1290ndim = getUnifRand(1_IK, 6_IK)
1291ndim ! matrix rank
1292+6
1293mat = getUnifRand((-1., -1.), (+1., +1.), ndim, ndim)
1294call setMatInit(mat, lowDia, (0._TKG, 0._TKG), (1._TKG, 0._TKG))
1295mat
1296( +1.00, +0.00), ( -0.26, -0.48), ( +0.34, +0.11), ( +0.21, -0.46), ( -0.04, -0.69), ( -0.75, +0.81)
1297( +0.00, +0.00), ( +1.00, +0.00), ( -0.79, -0.71), ( -0.31, +0.58), ( +0.75, +0.11), ( +0.08, -0.11)
1298( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00), ( +0.09, -0.77), ( +0.82, -0.22), ( +0.64, +0.94)
1299( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00), ( +0.44, -0.46), ( +0.78, -0.42)
1300( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00), ( -0.80, +0.88)
1301( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00)
1302call setResized(inv, shape(mat, IK))
1303call setMatInv(inv, mat, upperUnit)
1304inv
1305( +1.00, +0.00), ( +0.26, +0.48), ( -0.48, +0.45), ( -0.15, +0.05), ( +0.24, -0.27), ( +1.46, -1.20)
1306( +0.00, +0.00), ( +1.00, +0.00), ( +0.79, +0.71), ( -0.31, -0.04), ( -1.40, -0.65), ( -1.36, -0.47)
1307( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00), ( -0.09, +0.77), ( -1.14, -0.16), ( -1.95, -0.70)
1308( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00), ( -0.44, +0.46), ( -0.73, +1.17)
1309( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00), ( +0.80, -0.88)
1310( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00)
1311mul = matmul(mat, inv)
1312mul
1313( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( -0.00, +0.00), ( -0.00, +0.00)
1314( +0.00, +0.00), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( -0.00, -0.00), ( +0.00, -0.00)
1315( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, -0.00)
1316( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, -0.00)
1317( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00), ( +0.00, +0.00)
1318( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00)
1319
1320
1321ndim = getUnifRand(1_IK, 6_IK)
1322ndim ! matrix rank
1323+3
1324mat = getUnifRand((-1., -1.), (+1., +1.), ndim, ndim)
1325call setMatInit(mat, lowDia, (0._TKG, 0._TKG), (1._TKG, 0._TKG))
1326mat
1327( +1.00, +0.00), ( +0.72, +0.01), ( +0.71, +0.87)
1328( +0.00, +0.00), ( +1.00, +0.00), ( +0.60, +0.65)
1329( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00)
1330call setResized(inv, shape(mat, IK))
1331call setMatInv(inv, mat, upperUnit)
1332inv
1333( +1.00, +0.00), ( -0.72, -0.01), ( -0.29, -0.39)
1334( +0.00, +0.00), ( +1.00, +0.00), ( -0.60, -0.65)
1335( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00)
1336mul = matmul(mat, inv)
1337mul
1338( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1339( +0.00, +0.00), ( +1.00, +0.00), ( +0.00, +0.00)
1340( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00)
1341
1342
1343ndim = getUnifRand(1_IK, 6_IK)
1344ndim ! matrix rank
1345+6
1346mat = getUnifRand((-1., -1.), (+1., +1.), ndim, ndim)
1347call setMatInit(mat, lowDia, (0._TKG, 0._TKG), (1._TKG, 0._TKG))
1348mat
1349( +1.00, +0.00), ( -0.33, +0.90), ( +0.83, -0.17), ( +0.83, +0.67), ( +0.82, +0.90), ( +0.90, +0.06)
1350( +0.00, +0.00), ( +1.00, +0.00), ( -0.51, -0.76), ( -0.58, -0.18), ( +0.22, -0.28), ( +0.25, +0.78)
1351( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00), ( +0.26, +0.25), ( -0.87, +0.21), ( -0.79, -0.15)
1352( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00), ( -0.96, -0.19), ( +0.77, +0.98)
1353( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00), ( +0.20, +0.71)
1354( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00)
1355call setResized(inv, shape(mat, IK))
1356call setMatInv(inv, mat, upperUnit)
1357inv
1358( +1.00, +0.00), ( +0.33, -0.90), ( +0.02, -0.05), ( -0.50, -1.13), ( -0.90, -1.83), ( -3.49, +2.25)
1359( +0.00, +0.00), ( +1.00, +0.00), ( +0.51, +0.76), ( +0.64, -0.15), ( +1.02, +0.81), ( -0.23, -1.51)
1360( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00), ( -0.26, -0.25), ( +0.66, -0.50), ( +0.26, +0.23)
1361( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00), ( +0.96, +0.19), ( -0.83, -1.70)
1362( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00), ( -0.20, -0.71)
1363( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00)
1364mul = matmul(mat, inv)
1365mul
1366( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, -0.00)
1367( +0.00, +0.00), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, -0.00), ( -0.00, +0.00)
1368( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1369( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1370( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00), ( +0.00, +0.00)
1371( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00)
1372
1373
1374ndim = getUnifRand(1_IK, 6_IK)
1375ndim ! matrix rank
1376+6
1377mat = getUnifRand((-1., -1.), (+1., +1.), ndim, ndim)
1378call setMatInit(mat, lowDia, (0._TKG, 0._TKG), (1._TKG, 0._TKG))
1379mat
1380( +1.00, +0.00), ( +0.71, +0.22), ( +0.29, -0.39), ( +0.20, -0.50), ( +0.22, -0.38), ( +0.17, +0.15)
1381( +0.00, +0.00), ( +1.00, +0.00), ( -0.36, -0.34), ( -0.53, +0.59), ( +0.57, +0.54), ( +0.56, +0.96)
1382( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00), ( -0.97, +0.13), ( +0.90, +0.79), ( +0.54, -0.48)
1383( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00), ( +0.59, +0.61), ( +0.67, +0.69)
1384( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00), ( +0.03, -0.19)
1385( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00)
1386call setResized(inv, shape(mat, IK))
1387call setMatInv(inv, mat, upperUnit)
1388inv
1389( +1.00, +0.00), ( -0.71, -0.22), ( -0.46, +0.07), ( -1.14, +0.93), ( +1.78, +1.34), ( +1.34, +0.85)
1390( +0.00, +0.00), ( +1.00, +0.00), ( +0.36, +0.34), ( +0.92, -0.31), ( -1.35, -1.51), ( -1.42, -1.61)
1391( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00), ( +0.97, -0.13), ( -1.55, -1.30), ( -0.99, -0.36)
1392( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00), ( -0.59, -0.61), ( -0.54, -0.79)
1393( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00), ( -0.03, +0.19)
1394( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00)
1395mul = matmul(mat, inv)
1396mul
1397( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( -0.00, +0.00), ( -0.00, +0.00), ( -0.00, +0.00)
1398( +0.00, +0.00), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1399( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( -0.00, +0.00)
1400( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1401( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00), ( +0.00, +0.00)
1402( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00)
1403
1404
1405ndim = getUnifRand(1_IK, 6_IK)
1406ndim ! matrix rank
1407+3
1408mat = getUnifRand((-1., -1.), (+1., +1.), ndim, ndim)
1409call setMatInit(mat, lowDia, (0._TKG, 0._TKG), (1._TKG, 0._TKG))
1410mat
1411( +1.00, +0.00), ( +0.00, +0.61), ( -0.98, -0.79)
1412( +0.00, +0.00), ( +1.00, +0.00), ( +0.81, -0.82)
1413( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00)
1414call setResized(inv, shape(mat, IK))
1415call setMatInv(inv, mat, upperUnit)
1416inv
1417( +1.00, +0.00), ( -0.00, -0.61), ( +1.48, +1.28)
1418( +0.00, +0.00), ( +1.00, +0.00), ( -0.81, +0.82)
1419( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00)
1420mul = matmul(mat, inv)
1421mul
1422( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1423( +0.00, +0.00), ( +1.00, +0.00), ( +0.00, +0.00)
1424( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00)
1425
1426
1427ndim = getUnifRand(1_IK, 6_IK)
1428ndim ! matrix rank
1429+3
1430mat = getUnifRand((-1., -1.), (+1., +1.), ndim, ndim)
1431call setMatInit(mat, lowDia, (0._TKG, 0._TKG), (1._TKG, 0._TKG))
1432mat
1433( +1.00, +0.00), ( +0.95, +0.35), ( +0.29, -0.86)
1434( +0.00, +0.00), ( +1.00, +0.00), ( +0.56, +0.44)
1435( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00)
1436call setResized(inv, shape(mat, IK))
1437call setMatInv(inv, mat, upperUnit)
1438inv
1439( +1.00, +0.00), ( -0.95, -0.35), ( +0.09, +1.48)
1440( +0.00, +0.00), ( +1.00, +0.00), ( -0.56, -0.44)
1441( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00)
1442mul = matmul(mat, inv)
1443mul
1444( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1445( +0.00, +0.00), ( +1.00, +0.00), ( +0.00, +0.00)
1446( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00)
1447
1448
1449ndim = getUnifRand(1_IK, 6_IK)
1450ndim ! matrix rank
1451+4
1452mat = getUnifRand((-1., -1.), (+1., +1.), ndim, ndim)
1453call setMatInit(mat, lowDia, (0._TKG, 0._TKG), (1._TKG, 0._TKG))
1454mat
1455( +1.00, +0.00), ( +0.57, -0.06), ( +0.19, -0.46), ( -0.61, +0.89)
1456( +0.00, +0.00), ( +1.00, +0.00), ( -0.16, +0.94), ( +0.03, -0.92)
1457( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00), ( -0.99, +0.60)
1458( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00)
1459call setResized(inv, shape(mat, IK))
1460call setMatInv(inv, mat, upperUnit)
1461inv
1462( +1.00, +0.00), ( -0.57, +0.06), ( -0.23, +1.00), ( +0.95, -0.29)
1463( +0.00, +0.00), ( +1.00, +0.00), ( +0.16, -0.94), ( -0.43, -0.10)
1464( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00), ( +0.99, -0.60)
1465( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00)
1466mul = matmul(mat, inv)
1467mul
1468( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1469( +0.00, +0.00), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1470( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00), ( +0.00, +0.00)
1471( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00)
1472
1473
1474ndim = getUnifRand(1_IK, 6_IK)
1475ndim ! matrix rank
1476+2
1477mat = getUnifRand((-1., -1.), (+1., +1.), ndim, ndim)
1478call setMatInit(mat, lowDia, (0._TKG, 0._TKG), (1._TKG, 0._TKG))
1479mat
1480( +1.00, +0.00), ( -0.14, +0.06)
1481( +0.00, +0.00), ( +1.00, +0.00)
1482call setResized(inv, shape(mat, IK))
1483call setMatInv(inv, mat, upperUnit)
1484inv
1485( +1.00, +0.00), ( +0.14, -0.06)
1486( +0.00, +0.00), ( +1.00, +0.00)
1487mul = matmul(mat, inv)
1488mul
1489( +1.00, +0.00), ( +0.00, +0.00)
1490( +0.00, +0.00), ( +1.00, +0.00)
1491
1492
1493!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1494! Compute inverse of a lowerUnit triangular real matrix.
1495!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1496
1497
1498ndim = getUnifRand(1_IK, 6_IK)
1499ndim ! matrix rank
1500+2
1501mat = getUnifRand(1_IK, 9_IK, ndim, ndim)
1502call setMatInit(mat, uppDia, 0._TKG, 1._TKG)
1503mat
1504 +1.00, +0.00
1505 +3.00, +1.00
1506call setResized(inv, shape(mat, IK))
1507call setMatInv(inv, mat, lowerUnit)
1508inv
1509 +1.00, +0.00
1510 -3.00, +1.00
1511mul = matmul(mat, inv)
1512mul
1513 +1.00, +0.00
1514 +0.00, +1.00
1515
1516
1517ndim = getUnifRand(1_IK, 6_IK)
1518ndim ! matrix rank
1519+1
1520mat = getUnifRand(1_IK, 9_IK, ndim, ndim)
1521call setMatInit(mat, uppDia, 0._TKG, 1._TKG)
1522mat
1523 +1.00
1524call setResized(inv, shape(mat, IK))
1525call setMatInv(inv, mat, lowerUnit)
1526inv
1527 +1.00
1528mul = matmul(mat, inv)
1529mul
1530 +1.00
1531
1532
1533ndim = getUnifRand(1_IK, 6_IK)
1534ndim ! matrix rank
1535+4
1536mat = getUnifRand(1_IK, 9_IK, ndim, ndim)
1537call setMatInit(mat, uppDia, 0._TKG, 1._TKG)
1538mat
1539 +1.00, +0.00, +0.00, +0.00
1540 +9.00, +1.00, +0.00, +0.00
1541 +5.00, +1.00, +1.00, +0.00
1542 +7.00, +7.00, +1.00, +1.00
1543call setResized(inv, shape(mat, IK))
1544call setMatInv(inv, mat, lowerUnit)
1545inv
1546 +1.00, +0.00, +0.00, +0.00
1547 -9.00, +1.00, +0.00, +0.00
1548 +4.00, -1.00, +1.00, +0.00
1549 +52.00, -6.00, -1.00, +1.00
1550mul = matmul(mat, inv)
1551mul
1552 +1.00, +0.00, +0.00, +0.00
1553 +0.00, +1.00, +0.00, +0.00
1554 +0.00, +0.00, +1.00, +0.00
1555 +0.00, +0.00, +0.00, +1.00
1556
1557
1558ndim = getUnifRand(1_IK, 6_IK)
1559ndim ! matrix rank
1560+6
1561mat = getUnifRand(1_IK, 9_IK, ndim, ndim)
1562call setMatInit(mat, uppDia, 0._TKG, 1._TKG)
1563mat
1564 +1.00, +0.00, +0.00, +0.00, +0.00, +0.00
1565 +1.00, +1.00, +0.00, +0.00, +0.00, +0.00
1566 +7.00, +9.00, +1.00, +0.00, +0.00, +0.00
1567 +1.00, +8.00, +2.00, +1.00, +0.00, +0.00
1568 +9.00, +5.00, +8.00, +5.00, +1.00, +0.00
1569 +3.00, +6.00, +5.00, +8.00, +7.00, +1.00
1570call setResized(inv, shape(mat, IK))
1571call setMatInv(inv, mat, lowerUnit)
1572inv
1573 +1.00, +0.00, +0.00, +0.00, +0.00, +0.00
1574 -1.00, +1.00, +0.00, +0.00, +0.00, +0.00
1575 +2.00, -9.00, +1.00, +0.00, +0.00, +0.00
1576 +3.00, +10.00, -2.00, +1.00, +0.00, +0.00
1577 -35.00, +17.00, +2.00, -5.00, +1.00, +0.00
1578 +214.00, -160.00, -3.00, +27.00, -7.00, +1.00
1579mul = matmul(mat, inv)
1580mul
1581 +1.00, +0.00, +0.00, +0.00, +0.00, +0.00
1582 +0.00, +1.00, +0.00, +0.00, +0.00, +0.00
1583 +0.00, +0.00, +1.00, +0.00, +0.00, +0.00
1584 +0.00, +0.00, +0.00, +1.00, +0.00, +0.00
1585 +0.00, +0.00, +0.00, +0.00, +1.00, +0.00
1586 +0.00, +0.00, +0.00, +0.00, +0.00, +1.00
1587
1588
1589ndim = getUnifRand(1_IK, 6_IK)
1590ndim ! matrix rank
1591+1
1592mat = getUnifRand(1_IK, 9_IK, ndim, ndim)
1593call setMatInit(mat, uppDia, 0._TKG, 1._TKG)
1594mat
1595 +1.00
1596call setResized(inv, shape(mat, IK))
1597call setMatInv(inv, mat, lowerUnit)
1598inv
1599 +1.00
1600mul = matmul(mat, inv)
1601mul
1602 +1.00
1603
1604
1605ndim = getUnifRand(1_IK, 6_IK)
1606ndim ! matrix rank
1607+3
1608mat = getUnifRand(1_IK, 9_IK, ndim, ndim)
1609call setMatInit(mat, uppDia, 0._TKG, 1._TKG)
1610mat
1611 +1.00, +0.00, +0.00
1612 +8.00, +1.00, +0.00
1613 +6.00, +2.00, +1.00
1614call setResized(inv, shape(mat, IK))
1615call setMatInv(inv, mat, lowerUnit)
1616inv
1617 +1.00, +0.00, +0.00
1618 -8.00, +1.00, +0.00
1619 +10.00, -2.00, +1.00
1620mul = matmul(mat, inv)
1621mul
1622 +1.00, +0.00, +0.00
1623 +0.00, +1.00, +0.00
1624 +0.00, +0.00, +1.00
1625
1626
1627ndim = getUnifRand(1_IK, 6_IK)
1628ndim ! matrix rank
1629+2
1630mat = getUnifRand(1_IK, 9_IK, ndim, ndim)
1631call setMatInit(mat, uppDia, 0._TKG, 1._TKG)
1632mat
1633 +1.00, +0.00
1634 +1.00, +1.00
1635call setResized(inv, shape(mat, IK))
1636call setMatInv(inv, mat, lowerUnit)
1637inv
1638 +1.00, +0.00
1639 -1.00, +1.00
1640mul = matmul(mat, inv)
1641mul
1642 +1.00, +0.00
1643 +0.00, +1.00
1644
1645
1646ndim = getUnifRand(1_IK, 6_IK)
1647ndim ! matrix rank
1648+2
1649mat = getUnifRand(1_IK, 9_IK, ndim, ndim)
1650call setMatInit(mat, uppDia, 0._TKG, 1._TKG)
1651mat
1652 +1.00, +0.00
1653 +7.00, +1.00
1654call setResized(inv, shape(mat, IK))
1655call setMatInv(inv, mat, lowerUnit)
1656inv
1657 +1.00, +0.00
1658 -7.00, +1.00
1659mul = matmul(mat, inv)
1660mul
1661 +1.00, +0.00
1662 +0.00, +1.00
1663
1664
1665ndim = getUnifRand(1_IK, 6_IK)
1666ndim ! matrix rank
1667+5
1668mat = getUnifRand(1_IK, 9_IK, ndim, ndim)
1669call setMatInit(mat, uppDia, 0._TKG, 1._TKG)
1670mat
1671 +1.00, +0.00, +0.00, +0.00, +0.00
1672 +8.00, +1.00, +0.00, +0.00, +0.00
1673 +9.00, +3.00, +1.00, +0.00, +0.00
1674 +5.00, +5.00, +1.00, +1.00, +0.00
1675 +5.00, +9.00, +5.00, +3.00, +1.00
1676call setResized(inv, shape(mat, IK))
1677call setMatInv(inv, mat, lowerUnit)
1678inv
1679 +1.00, +0.00, +0.00, +0.00, +0.00
1680 -8.00, +1.00, +0.00, +0.00, +0.00
1681 +15.00, -3.00, +1.00, +0.00, +0.00
1682 +20.00, -2.00, -1.00, +1.00, +0.00
1683 -68.00, +12.00, -2.00, -3.00, +1.00
1684mul = matmul(mat, inv)
1685mul
1686 +1.00, +0.00, +0.00, +0.00, +0.00
1687 +0.00, +1.00, +0.00, +0.00, +0.00
1688 +0.00, +0.00, +1.00, +0.00, +0.00
1689 +0.00, +0.00, +0.00, +1.00, +0.00
1690 +0.00, +0.00, +0.00, +0.00, +1.00
1691
1692
1693ndim = getUnifRand(1_IK, 6_IK)
1694ndim ! matrix rank
1695+4
1696mat = getUnifRand(1_IK, 9_IK, ndim, ndim)
1697call setMatInit(mat, uppDia, 0._TKG, 1._TKG)
1698mat
1699 +1.00, +0.00, +0.00, +0.00
1700 +7.00, +1.00, +0.00, +0.00
1701 +1.00, +1.00, +1.00, +0.00
1702 +9.00, +8.00, +6.00, +1.00
1703call setResized(inv, shape(mat, IK))
1704call setMatInv(inv, mat, lowerUnit)
1705inv
1706 +1.00, +0.00, +0.00, +0.00
1707 -7.00, +1.00, +0.00, +0.00
1708 +6.00, -1.00, +1.00, +0.00
1709 +11.00, -2.00, -6.00, +1.00
1710mul = matmul(mat, inv)
1711mul
1712 +1.00, +0.00, +0.00, +0.00
1713 +0.00, +1.00, +0.00, +0.00
1714 +0.00, +0.00, +1.00, +0.00
1715 +0.00, +0.00, +0.00, +1.00
1716
1717
1718!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1719! Compute inverse of a lowerUnit triangular complex matrix.
1720!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1721
1722
1723ndim = getUnifRand(1_IK, 6_IK)
1724ndim ! matrix rank
1725+3
1726mat = getUnifRand((-1., -1.), (+1., +1.), ndim, ndim)
1727call setMatInit(mat, uppDia, (0._TKG, 0._TKG), (1._TKG, 0._TKG))
1728mat
1729( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1730( -0.21, +0.71), ( +1.00, +0.00), ( +0.00, +0.00)
1731( -0.36, -0.12), ( +0.16, -0.64), ( +1.00, +0.00)
1732call setResized(inv, shape(mat, IK))
1733call setMatInv(inv, mat, lowerUnit)
1734inv
1735( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1736( +0.21, -0.71), ( +1.00, +0.00), ( +0.00, +0.00)
1737( +0.78, +0.37), ( -0.16, +0.64), ( +1.00, +0.00)
1738mul = matmul(mat, inv)
1739mul
1740( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1741( +0.00, +0.00), ( +1.00, +0.00), ( +0.00, +0.00)
1742( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00)
1743
1744
1745ndim = getUnifRand(1_IK, 6_IK)
1746ndim ! matrix rank
1747+6
1748mat = getUnifRand((-1., -1.), (+1., +1.), ndim, ndim)
1749call setMatInit(mat, uppDia, (0._TKG, 0._TKG), (1._TKG, 0._TKG))
1750mat
1751( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1752( +0.61, +0.89), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1753( -0.48, -0.60), ( -0.17, +0.57), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1754( +0.36, -0.36), ( +0.20, +0.40), ( -0.89, -0.65), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1755( -0.95, +0.08), ( -0.83, +0.78), ( +0.81, -0.56), ( +0.08, -0.68), ( +1.00, +0.00), ( +0.00, +0.00)
1756( +0.96, +0.87), ( +0.94, -0.85), ( +0.91, +0.99), ( -0.14, -0.25), ( -0.78, -0.90), ( +1.00, +0.00)
1757call setResized(inv, shape(mat, IK))
1758call setMatInv(inv, mat, lowerUnit)
1759inv
1760( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1761( -0.61, -0.89), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1762( -0.13, +0.79), ( +0.17, -0.57), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1763( -1.22, +1.40), ( +0.33, -0.80), ( +0.89, +0.65), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1764( -1.44, -2.01), ( +1.52, +0.07), ( -1.33, +1.11), ( -0.08, +0.68), ( +1.00, +0.00), ( +0.00, +0.00)
1765( +1.42, -4.11), ( -0.28, +2.58), ( -2.98, -0.99), ( -0.53, +0.71), ( +0.78, +0.90), ( +1.00, +0.00)
1766mul = matmul(mat, inv)
1767mul
1768( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1769( +0.00, +0.00), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1770( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1771( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1772( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00), ( +0.00, +0.00)
1773( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00)
1774
1775
1776ndim = getUnifRand(1_IK, 6_IK)
1777ndim ! matrix rank
1778+6
1779mat = getUnifRand((-1., -1.), (+1., +1.), ndim, ndim)
1780call setMatInit(mat, uppDia, (0._TKG, 0._TKG), (1._TKG, 0._TKG))
1781mat
1782( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1783( +0.29, -0.15), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1784( +0.64, -0.26), ( +0.08, +0.12), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1785( -0.79, -0.88), ( +0.76, -0.00), ( -0.20, -0.74), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1786( -1.00, +0.69), ( -0.52, -0.95), ( +0.47, +0.32), ( +0.36, +0.41), ( +1.00, +0.00), ( +0.00, +0.00)
1787( +0.72, +0.26), ( -0.85, +0.95), ( +0.90, -0.79), ( -0.25, +0.21), ( +0.94, +0.17), ( +1.00, +0.00)
1788call setResized(inv, shape(mat, IK))
1789call setMatInv(inv, mat, lowerUnit)
1790inv
1791( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1792( -0.29, +0.15), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1793( -0.60, +0.28), ( -0.08, -0.12), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1794( +0.68, +0.37), ( -0.69, -0.08), ( +0.20, +0.74), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1795( +0.98, -1.24), ( +0.73, +1.34), ( -0.23, -0.67), ( -0.36, -0.41), ( +1.00, +0.00), ( +0.00, +0.00)
1796( -1.38, +0.36), ( +0.37, -2.16), ( -0.58, +1.60), ( +0.52, +0.23), ( -0.94, -0.17), ( +1.00, +0.00)
1797mul = matmul(mat, inv)
1798mul
1799( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1800( +0.00, +0.00), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1801( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1802( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1803( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00), ( +0.00, +0.00)
1804( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00)
1805
1806
1807ndim = getUnifRand(1_IK, 6_IK)
1808ndim ! matrix rank
1809+6
1810mat = getUnifRand((-1., -1.), (+1., +1.), ndim, ndim)
1811call setMatInit(mat, uppDia, (0._TKG, 0._TKG), (1._TKG, 0._TKG))
1812mat
1813( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1814( +0.78, -0.70), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1815( -0.22, +0.99), ( +0.59, -0.91), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1816( +0.60, -0.13), ( +0.16, -0.70), ( -0.81, -0.91), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1817( -0.70, -0.56), ( +0.96, -0.02), ( +0.48, -0.70), ( -0.45, -0.76), ( +1.00, +0.00), ( +0.00, +0.00)
1818( -0.39, -0.06), ( -0.22, +0.80), ( +0.12, +0.45), ( -0.30, +0.12), ( -0.51, +0.04), ( +1.00, +0.00)
1819call setResized(inv, shape(mat, IK))
1820call setMatInv(inv, mat, lowerUnit)
1821inv
1822( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1823( -0.78, +0.70), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1824( +0.05, -2.11), ( -0.59, +0.91), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1825( +0.99, -2.20), ( -1.47, +0.90), ( +0.81, +0.91), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1826( +5.00, +0.68), ( -2.65, -1.54), ( -0.80, +1.72), ( +0.45, +0.76), ( +1.00, +0.00), ( +0.00, +0.00)
1827( +2.42, +0.42), ( -1.04, -0.86), ( -0.10, +0.63), ( +0.56, +0.24), ( +0.51, -0.04), ( +1.00, +0.00)
1828mul = matmul(mat, inv)
1829mul
1830( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1831( +0.00, +0.00), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1832( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1833( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1834( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00), ( +0.00, +0.00)
1835( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00)
1836
1837
1838ndim = getUnifRand(1_IK, 6_IK)
1839ndim ! matrix rank
1840+4
1841mat = getUnifRand((-1., -1.), (+1., +1.), ndim, ndim)
1842call setMatInit(mat, uppDia, (0._TKG, 0._TKG), (1._TKG, 0._TKG))
1843mat
1844( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1845( -0.12, +0.12), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1846( +0.94, +0.89), ( +0.48, +0.60), ( +1.00, +0.00), ( +0.00, +0.00)
1847( +0.11, +0.42), ( -0.74, +0.41), ( -0.56, -0.03), ( +1.00, +0.00)
1848call setResized(inv, shape(mat, IK))
1849call setMatInv(inv, mat, lowerUnit)
1850inv
1851( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1852( +0.12, -0.12), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1853( -1.06, -0.91), ( -0.48, -0.60), ( +1.00, +0.00), ( +0.00, +0.00)
1854( -0.63, -1.10), ( +0.49, -0.76), ( +0.56, +0.03), ( +1.00, +0.00)
1855mul = matmul(mat, inv)
1856mul
1857( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1858( +0.00, +0.00), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1859( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00), ( +0.00, +0.00)
1860( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00)
1861
1862
1863ndim = getUnifRand(1_IK, 6_IK)
1864ndim ! matrix rank
1865+2
1866mat = getUnifRand((-1., -1.), (+1., +1.), ndim, ndim)
1867call setMatInit(mat, uppDia, (0._TKG, 0._TKG), (1._TKG, 0._TKG))
1868mat
1869( +1.00, +0.00), ( +0.00, +0.00)
1870( +0.91, +0.64), ( +1.00, +0.00)
1871call setResized(inv, shape(mat, IK))
1872call setMatInv(inv, mat, lowerUnit)
1873inv
1874( +1.00, +0.00), ( +0.00, +0.00)
1875( -0.91, -0.64), ( +1.00, +0.00)
1876mul = matmul(mat, inv)
1877mul
1878( +1.00, +0.00), ( +0.00, +0.00)
1879( +0.00, +0.00), ( +1.00, +0.00)
1880
1881
1882ndim = getUnifRand(1_IK, 6_IK)
1883ndim ! matrix rank
1884+2
1885mat = getUnifRand((-1., -1.), (+1., +1.), ndim, ndim)
1886call setMatInit(mat, uppDia, (0._TKG, 0._TKG), (1._TKG, 0._TKG))
1887mat
1888( +1.00, +0.00), ( +0.00, +0.00)
1889( +0.30, -0.56), ( +1.00, +0.00)
1890call setResized(inv, shape(mat, IK))
1891call setMatInv(inv, mat, lowerUnit)
1892inv
1893( +1.00, +0.00), ( +0.00, +0.00)
1894( -0.30, +0.56), ( +1.00, +0.00)
1895mul = matmul(mat, inv)
1896mul
1897( +1.00, +0.00), ( +0.00, +0.00)
1898( +0.00, +0.00), ( +1.00, +0.00)
1899
1900
1901ndim = getUnifRand(1_IK, 6_IK)
1902ndim ! matrix rank
1903+6
1904mat = getUnifRand((-1., -1.), (+1., +1.), ndim, ndim)
1905call setMatInit(mat, uppDia, (0._TKG, 0._TKG), (1._TKG, 0._TKG))
1906mat
1907( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1908( +0.32, +0.14), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1909( -0.94, -0.91), ( +0.83, +0.01), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1910( -0.11, +0.88), ( -0.74, +0.04), ( -0.62, -0.48), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1911( -0.65, -0.75), ( +0.33, -0.89), ( -0.45, -0.23), ( -0.87, +0.00), ( +1.00, +0.00), ( +0.00, +0.00)
1912( -0.80, -0.63), ( -0.46, +0.00), ( -0.74, -0.93), ( +0.82, +0.77), ( +0.35, +0.45), ( +1.00, +0.00)
1913call setResized(inv, shape(mat, IK))
1914call setMatInv(inv, mat, lowerUnit)
1915inv
1916( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1917( -0.32, -0.14), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1918( +1.21, +1.03), ( -0.83, -0.01), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1919( +0.12, +0.25), ( +0.23, -0.45), ( +0.62, +0.48), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1920( +1.29, +1.47), ( -0.50, +0.30), ( +0.99, +0.65), ( +0.87, -0.00), ( +1.00, +0.00), ( +0.00, +0.00)
1921( +0.91, +1.05), ( -0.37, -0.46), ( +0.55, -0.62), ( -1.13, -1.17), ( -0.35, -0.45), ( +1.00, +0.00)
1922mul = matmul(mat, inv)
1923mul
1924( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1925( +0.00, +0.00), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1926( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1927( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1928( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00), ( +0.00, +0.00)
1929( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00)
1930
1931
1932ndim = getUnifRand(1_IK, 6_IK)
1933ndim ! matrix rank
1934+4
1935mat = getUnifRand((-1., -1.), (+1., +1.), ndim, ndim)
1936call setMatInit(mat, uppDia, (0._TKG, 0._TKG), (1._TKG, 0._TKG))
1937mat
1938( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1939( -0.68, -0.06), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1940( +0.74, -0.97), ( +0.95, +0.04), ( +1.00, +0.00), ( +0.00, +0.00)
1941( -0.67, -0.75), ( -0.39, +0.95), ( -0.86, -0.36), ( +1.00, +0.00)
1942call setResized(inv, shape(mat, IK))
1943call setMatInv(inv, mat, lowerUnit)
1944inv
1945( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1946( +0.68, +0.06), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1947( -1.38, +0.89), ( -0.95, -0.04), ( +1.00, +0.00), ( +0.00, +0.00)
1948( -0.52, +0.41), ( -0.42, -1.33), ( +0.86, +0.36), ( +1.00, +0.00)
1949mul = matmul(mat, inv)
1950mul
1951( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1952( +0.00, +0.00), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1953( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00), ( +0.00, +0.00)
1954( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00)
1955
1956
1957ndim = getUnifRand(1_IK, 6_IK)
1958ndim ! matrix rank
1959+4
1960mat = getUnifRand((-1., -1.), (+1., +1.), ndim, ndim)
1961call setMatInit(mat, uppDia, (0._TKG, 0._TKG), (1._TKG, 0._TKG))
1962mat
1963( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1964( -0.03, +0.20), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1965( -0.16, +0.46), ( -0.64, -0.89), ( +1.00, +0.00), ( +0.00, +0.00)
1966( +0.86, -0.34), ( +0.97, +0.61), ( -0.32, -0.44), ( +1.00, +0.00)
1967call setResized(inv, shape(mat, IK))
1968call setMatInv(inv, mat, lowerUnit)
1969inv
1970( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1971( +0.03, -0.20), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1972( +0.35, -0.57), ( +0.64, +0.89), ( +1.00, +0.00), ( +0.00, +0.00)
1973( -0.65, +0.49), ( -1.16, -0.04), ( +0.32, +0.44), ( +1.00, +0.00)
1974mul = matmul(mat, inv)
1975mul
1976( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1977( +0.00, +0.00), ( +1.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
1978( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00), ( +0.00, +0.00)
1979( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00)
1980
1981
1982!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1983! Compute inverse of a general real matrix by passing its LUP factorization.
1984!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1985
1986
1987mat = reshape([1, 0, 2, -1, 5, 0, 0, 3, -9], shape = [3,3], order = [2, 1])
1988mat
1989 +1.00, +0.00, +2.00
1990 -1.00, +5.00, +0.00
1991 +0.00, +3.00, -9.00
1992call setResized(rperm, size(mat, 1, IK))
1993lup = mat
1994lup
1995 +1.00, +0.00, +2.00
1996 -1.00, +5.00, +0.00
1997 +0.00, +3.00, -9.00
1998call setMatLUP(lup, rperm, info) ! compute the LUP factorization of the matrix.
1999if (info /= 0) error stop 'LUP factorization failed.'
2000lup
2001 +1.00, +0.00, +2.00
2002 -1.00, +5.00, +2.00
2003 +0.00, +0.60, -10.20
2004call setResized(inv, shape(mat, IK))
2005call setMatInv(inv, lup, rperm) ! compute the inverse of the matrix by passing its LUP factorization.
2006inv
2007 +0.88, -0.12, +0.20
2008 +0.18, +0.18, +0.04
2009 +0.06, +0.06, -0.10
2010mul = matmul(mat, inv)
2011mul
2012 +1.00, +0.00, +0.00
2013 +0.00, +1.00, +0.00
2014 +0.00, +0.00, +1.00
2015
2016
2017mat = reshape([1, 0, 2, -1, 5, 0, 0, 3, -9], shape = [3,3], order = [2, 1])
2018mat
2019 +1.00, +0.00, +2.00
2020 -1.00, +5.00, +0.00
2021 +0.00, +3.00, -9.00
2022call setResized(rperm, size(mat, 1, IK))
2023lup = mat
2024lup
2025 +1.00, +0.00, +2.00
2026 -1.00, +5.00, +0.00
2027 +0.00, +3.00, -9.00
2028call setMatLUP(lup, rperm, info) ! compute the LUP factorization of the matrix.
2029if (info /= 0) error stop 'LUP factorization failed.'
2030lup
2031 +1.00, +0.00, +2.00
2032 -1.00, +5.00, +2.00
2033 +0.00, +0.60, -10.20
2034call setResized(inv, shape(mat, IK))
2035call setMatInv(inv, lup, rperm) ! compute the inverse of the matrix by passing its LUP factorization.
2036inv
2037 +0.88, -0.12, +0.20
2038 +0.18, +0.18, +0.04
2039 +0.06, +0.06, -0.10
2040mul = matmul(mat, inv)
2041mul
2042 +1.00, +0.00, +0.00
2043 +0.00, +1.00, +0.00
2044 +0.00, +0.00, +1.00
2045
2046
2047mat = reshape([1, 0, 2, -1, 5, 0, 0, 3, -9], shape = [3,3], order = [2, 1])
2048mat
2049 +1.00, +0.00, +2.00
2050 -1.00, +5.00, +0.00
2051 +0.00, +3.00, -9.00
2052call setResized(rperm, size(mat, 1, IK))
2053lup = mat
2054lup
2055 +1.00, +0.00, +2.00
2056 -1.00, +5.00, +0.00
2057 +0.00, +3.00, -9.00
2058call setMatLUP(lup, rperm, info) ! compute the LUP factorization of the matrix.
2059if (info /= 0) error stop 'LUP factorization failed.'
2060lup
2061 +1.00, +0.00, +2.00
2062 -1.00, +5.00, +2.00
2063 +0.00, +0.60, -10.20
2064call setResized(inv, shape(mat, IK))
2065call setMatInv(inv, lup, rperm) ! compute the inverse of the matrix by passing its LUP factorization.
2066inv
2067 +0.88, -0.12, +0.20
2068 +0.18, +0.18, +0.04
2069 +0.06, +0.06, -0.10
2070mul = matmul(mat, inv)
2071mul
2072 +1.00, +0.00, +0.00
2073 +0.00, +1.00, +0.00
2074 +0.00, +0.00, +1.00
2075
2076
2077mat = reshape([1, 0, 2, -1, 5, 0, 0, 3, -9], shape = [3,3], order = [2, 1])
2078mat
2079 +1.00, +0.00, +2.00
2080 -1.00, +5.00, +0.00
2081 +0.00, +3.00, -9.00
2082call setResized(rperm, size(mat, 1, IK))
2083lup = mat
2084lup
2085 +1.00, +0.00, +2.00
2086 -1.00, +5.00, +0.00
2087 +0.00, +3.00, -9.00
2088call setMatLUP(lup, rperm, info) ! compute the LUP factorization of the matrix.
2089if (info /= 0) error stop 'LUP factorization failed.'
2090lup
2091 +1.00, +0.00, +2.00
2092 -1.00, +5.00, +2.00
2093 +0.00, +0.60, -10.20
2094call setResized(inv, shape(mat, IK))
2095call setMatInv(inv, lup, rperm) ! compute the inverse of the matrix by passing its LUP factorization.
2096inv
2097 +0.88, -0.12, +0.20
2098 +0.18, +0.18, +0.04
2099 +0.06, +0.06, -0.10
2100mul = matmul(mat, inv)
2101mul
2102 +1.00, +0.00, +0.00
2103 +0.00, +1.00, +0.00
2104 +0.00, +0.00, +1.00
2105
2106
2107mat = reshape([1, 0, 2, -1, 5, 0, 0, 3, -9], shape = [3,3], order = [2, 1])
2108mat
2109 +1.00, +0.00, +2.00
2110 -1.00, +5.00, +0.00
2111 +0.00, +3.00, -9.00
2112call setResized(rperm, size(mat, 1, IK))
2113lup = mat
2114lup
2115 +1.00, +0.00, +2.00
2116 -1.00, +5.00, +0.00
2117 +0.00, +3.00, -9.00
2118call setMatLUP(lup, rperm, info) ! compute the LUP factorization of the matrix.
2119if (info /= 0) error stop 'LUP factorization failed.'
2120lup
2121 +1.00, +0.00, +2.00
2122 -1.00, +5.00, +2.00
2123 +0.00, +0.60, -10.20
2124call setResized(inv, shape(mat, IK))
2125call setMatInv(inv, lup, rperm) ! compute the inverse of the matrix by passing its LUP factorization.
2126inv
2127 +0.88, -0.12, +0.20
2128 +0.18, +0.18, +0.04
2129 +0.06, +0.06, -0.10
2130mul = matmul(mat, inv)
2131mul
2132 +1.00, +0.00, +0.00
2133 +0.00, +1.00, +0.00
2134 +0.00, +0.00, +1.00
2135
2136
2137mat = reshape([1, 0, 2, -1, 5, 0, 0, 3, -9], shape = [3,3], order = [2, 1])
2138mat
2139 +1.00, +0.00, +2.00
2140 -1.00, +5.00, +0.00
2141 +0.00, +3.00, -9.00
2142call setResized(rperm, size(mat, 1, IK))
2143lup = mat
2144lup
2145 +1.00, +0.00, +2.00
2146 -1.00, +5.00, +0.00
2147 +0.00, +3.00, -9.00
2148call setMatLUP(lup, rperm, info) ! compute the LUP factorization of the matrix.
2149if (info /= 0) error stop 'LUP factorization failed.'
2150lup
2151 +1.00, +0.00, +2.00
2152 -1.00, +5.00, +2.00
2153 +0.00, +0.60, -10.20
2154call setResized(inv, shape(mat, IK))
2155call setMatInv(inv, lup, rperm) ! compute the inverse of the matrix by passing its LUP factorization.
2156inv
2157 +0.88, -0.12, +0.20
2158 +0.18, +0.18, +0.04
2159 +0.06, +0.06, -0.10
2160mul = matmul(mat, inv)
2161mul
2162 +1.00, +0.00, +0.00
2163 +0.00, +1.00, +0.00
2164 +0.00, +0.00, +1.00
2165
2166
2167mat = reshape([1, 0, 2, -1, 5, 0, 0, 3, -9], shape = [3,3], order = [2, 1])
2168mat
2169 +1.00, +0.00, +2.00
2170 -1.00, +5.00, +0.00
2171 +0.00, +3.00, -9.00
2172call setResized(rperm, size(mat, 1, IK))
2173lup = mat
2174lup
2175 +1.00, +0.00, +2.00
2176 -1.00, +5.00, +0.00
2177 +0.00, +3.00, -9.00
2178call setMatLUP(lup, rperm, info) ! compute the LUP factorization of the matrix.
2179if (info /= 0) error stop 'LUP factorization failed.'
2180lup
2181 +1.00, +0.00, +2.00
2182 -1.00, +5.00, +2.00
2183 +0.00, +0.60, -10.20
2184call setResized(inv, shape(mat, IK))
2185call setMatInv(inv, lup, rperm) ! compute the inverse of the matrix by passing its LUP factorization.
2186inv
2187 +0.88, -0.12, +0.20
2188 +0.18, +0.18, +0.04
2189 +0.06, +0.06, -0.10
2190mul = matmul(mat, inv)
2191mul
2192 +1.00, +0.00, +0.00
2193 +0.00, +1.00, +0.00
2194 +0.00, +0.00, +1.00
2195
2196
2197mat = reshape([1, 0, 2, -1, 5, 0, 0, 3, -9], shape = [3,3], order = [2, 1])
2198mat
2199 +1.00, +0.00, +2.00
2200 -1.00, +5.00, +0.00
2201 +0.00, +3.00, -9.00
2202call setResized(rperm, size(mat, 1, IK))
2203lup = mat
2204lup
2205 +1.00, +0.00, +2.00
2206 -1.00, +5.00, +0.00
2207 +0.00, +3.00, -9.00
2208call setMatLUP(lup, rperm, info) ! compute the LUP factorization of the matrix.
2209if (info /= 0) error stop 'LUP factorization failed.'
2210lup
2211 +1.00, +0.00, +2.00
2212 -1.00, +5.00, +2.00
2213 +0.00, +0.60, -10.20
2214call setResized(inv, shape(mat, IK))
2215call setMatInv(inv, lup, rperm) ! compute the inverse of the matrix by passing its LUP factorization.
2216inv
2217 +0.88, -0.12, +0.20
2218 +0.18, +0.18, +0.04
2219 +0.06, +0.06, -0.10
2220mul = matmul(mat, inv)
2221mul
2222 +1.00, +0.00, +0.00
2223 +0.00, +1.00, +0.00
2224 +0.00, +0.00, +1.00
2225
2226
2227mat = reshape([1, 0, 2, -1, 5, 0, 0, 3, -9], shape = [3,3], order = [2, 1])
2228mat
2229 +1.00, +0.00, +2.00
2230 -1.00, +5.00, +0.00
2231 +0.00, +3.00, -9.00
2232call setResized(rperm, size(mat, 1, IK))
2233lup = mat
2234lup
2235 +1.00, +0.00, +2.00
2236 -1.00, +5.00, +0.00
2237 +0.00, +3.00, -9.00
2238call setMatLUP(lup, rperm, info) ! compute the LUP factorization of the matrix.
2239if (info /= 0) error stop 'LUP factorization failed.'
2240lup
2241 +1.00, +0.00, +2.00
2242 -1.00, +5.00, +2.00
2243 +0.00, +0.60, -10.20
2244call setResized(inv, shape(mat, IK))
2245call setMatInv(inv, lup, rperm) ! compute the inverse of the matrix by passing its LUP factorization.
2246inv
2247 +0.88, -0.12, +0.20
2248 +0.18, +0.18, +0.04
2249 +0.06, +0.06, -0.10
2250mul = matmul(mat, inv)
2251mul
2252 +1.00, +0.00, +0.00
2253 +0.00, +1.00, +0.00
2254 +0.00, +0.00, +1.00
2255
2256
2257mat = reshape([1, 0, 2, -1, 5, 0, 0, 3, -9], shape = [3,3], order = [2, 1])
2258mat
2259 +1.00, +0.00, +2.00
2260 -1.00, +5.00, +0.00
2261 +0.00, +3.00, -9.00
2262call setResized(rperm, size(mat, 1, IK))
2263lup = mat
2264lup
2265 +1.00, +0.00, +2.00
2266 -1.00, +5.00, +0.00
2267 +0.00, +3.00, -9.00
2268call setMatLUP(lup, rperm, info) ! compute the LUP factorization of the matrix.
2269if (info /= 0) error stop 'LUP factorization failed.'
2270lup
2271 +1.00, +0.00, +2.00
2272 -1.00, +5.00, +2.00
2273 +0.00, +0.60, -10.20
2274call setResized(inv, shape(mat, IK))
2275call setMatInv(inv, lup, rperm) ! compute the inverse of the matrix by passing its LUP factorization.
2276inv
2277 +0.88, -0.12, +0.20
2278 +0.18, +0.18, +0.04
2279 +0.06, +0.06, -0.10
2280mul = matmul(mat, inv)
2281mul
2282 +1.00, +0.00, +0.00
2283 +0.00, +1.00, +0.00
2284 +0.00, +0.00, +1.00
2285
2286
2287!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2288! Compute inverse of a general complex matrix by passing its LUP factorization.
2289!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2290
2291
2292call setResized(rperm, size(mat, 1, IK))
2293lup = mat
2294lup
2295( +2.00, +1.00), ( +2.40, -1.00), ( +2.80, -1.00), ( +3.20, -1.00), ( +3.60, -1.00), ( +4.00, -1.00), ( +4.40, -1.00), ( +4.80, -1.00), ( +5.20, -1.00)
2296( +2.40, +1.00), ( +2.00, +1.00), ( +2.40, -1.00), ( +2.80, -1.00), ( +3.20, -1.00), ( +3.60, -1.00), ( +4.00, -1.00), ( +4.40, -1.00), ( +4.80, -1.00)
2297( +2.80, +1.00), ( +2.40, +1.00), ( +2.00, +1.00), ( +2.40, -1.00), ( +2.80, -1.00), ( +3.20, -1.00), ( +3.60, -1.00), ( +4.00, -1.00), ( +4.40, -1.00)
2298( +3.20, +1.00), ( +2.80, +1.00), ( +2.40, +1.00), ( +2.00, +1.00), ( +2.40, -1.00), ( +2.80, -1.00), ( +3.20, -1.00), ( +3.60, -1.00), ( +4.00, -1.00)
2299( +3.60, +1.00), ( +3.20, +1.00), ( +2.80, +1.00), ( +2.40, +1.00), ( +2.00, +1.00), ( +2.40, -1.00), ( +2.80, -1.00), ( +3.20, -1.00), ( +3.60, -1.00)
2300( +4.00, +1.00), ( +3.60, +1.00), ( +3.20, +1.00), ( +2.80, +1.00), ( +2.40, +1.00), ( +2.00, +1.00), ( +2.40, -1.00), ( +2.80, -1.00), ( +3.20, -1.00)
2301( +4.40, +1.00), ( +4.00, +1.00), ( +3.60, +1.00), ( +3.20, +1.00), ( +2.80, +1.00), ( +2.40, +1.00), ( +2.00, +1.00), ( +2.40, -1.00), ( +2.80, -1.00)
2302( +4.80, +1.00), ( +4.40, +1.00), ( +4.00, +1.00), ( +3.60, +1.00), ( +3.20, +1.00), ( +2.80, +1.00), ( +2.40, +1.00), ( +2.00, +1.00), ( +2.40, -1.00)
2303( +5.20, +1.00), ( +4.80, +1.00), ( +4.40, +1.00), ( +4.00, +1.00), ( +3.60, +1.00), ( +3.20, +1.00), ( +2.80, +1.00), ( +2.40, +1.00), ( +2.00, +1.00)
2304call setMatLUP(lup, rperm, info) ! compute the LUP factorization of the matrix.
2305if (info /= 0) error stop 'LUP factorization failed.'
2306lup
2307( +5.20, +1.00), ( +4.80, +1.00), ( +4.40, +1.00), ( +4.00, +1.00), ( +3.60, +1.00), ( +3.20, +1.00), ( +2.80, +1.00), ( +2.40, +1.00), ( +2.00, +1.00)
2308( +0.41, +0.11), ( +0.56, -1.95), ( +1.13, -1.91), ( +1.69, -1.86), ( +2.25, -1.82), ( +2.81, -1.77), ( +3.38, -1.73), ( +3.94, -1.68), ( +4.50, -1.63)
2309( +0.48, +0.10), ( -0.05, -0.09), ( +0.61, -1.91), ( +1.23, -1.81), ( +1.84, -1.72), ( +2.46, -1.62), ( +3.07, -1.53), ( +3.69, -1.43), ( +4.30, -1.34)
2310( +0.55, +0.09), ( -0.04, -0.08), ( -0.06, -0.06), ( +0.67, -1.87), ( +1.35, -1.75), ( +2.02, -1.62), ( +2.69, -1.50), ( +3.37, -1.37), ( +4.04, -1.25)
2311( +0.63, +0.07), ( -0.03, -0.07), ( -0.05, -0.05), ( -0.07, -0.03), ( +0.74, -1.87), ( +1.47, -1.73), ( +2.21, -1.60), ( +2.94, -1.46), ( +3.68, -1.33)
2312( +0.70, +0.06), ( -0.03, -0.05), ( -0.04, -0.04), ( -0.05, -0.03), ( -0.06, -0.00), ( +0.79, -1.88), ( +1.58, -1.76), ( +2.38, -1.64), ( +3.17, -1.53)
2313( +0.78, +0.04), ( -0.02, -0.04), ( -0.03, -0.03), ( -0.04, -0.02), ( -0.04, -0.00), ( -0.04, +0.01), ( +0.83, -1.92), ( +1.66, -1.83), ( +2.49, -1.75)
2314( +0.85, +0.03), ( -0.01, -0.03), ( -0.02, -0.02), ( -0.03, -0.01), ( -0.03, -0.00), ( -0.03, +0.01), ( -0.02, +0.02), ( +0.84, -1.96), ( +1.68, -1.92)
2315( +0.93, +0.01), ( -0.01, -0.01), ( -0.01, -0.01), ( -0.01, -0.01), ( -0.01, -0.00), ( -0.01, +0.00), ( -0.01, +0.01), ( -0.01, +0.01), ( +0.82, -1.99)
2316call setMatInv(inv, lup, rperm) ! compute the inverse of the matrix by passing its LUP factorization.
2317inv
2318( -0.17, -0.42), ( -0.12, +0.13), ( -0.06, +0.15), ( +0.00, +0.15), ( +0.05, +0.13), ( +0.09, +0.09), ( +0.11, +0.05), ( +0.11, +0.00), ( +0.04, -0.28)
2319( +0.18, +0.43), ( -0.04, -0.55), ( -0.06, -0.03), ( -0.06, -0.01), ( -0.05, +0.01), ( -0.04, +0.03), ( -0.03, +0.04), ( -0.01, +0.04), ( +0.11, +0.00)
2320( +0.01, +0.00), ( +0.18, +0.43), ( -0.04, -0.55), ( -0.06, -0.03), ( -0.06, -0.01), ( -0.05, +0.01), ( -0.04, +0.03), ( -0.03, +0.04), ( +0.11, +0.05)
2321( +0.01, +0.00), ( +0.01, +0.00), ( +0.18, +0.43), ( -0.04, -0.55), ( -0.06, -0.03), ( -0.06, -0.01), ( -0.05, +0.01), ( -0.04, +0.03), ( +0.09, +0.09)
2322( +0.00, +0.01), ( +0.01, +0.00), ( +0.01, +0.00), ( +0.18, +0.43), ( -0.04, -0.55), ( -0.06, -0.03), ( -0.06, -0.01), ( -0.05, +0.01), ( +0.05, +0.13)
2323( +0.00, +0.01), ( +0.00, +0.01), ( +0.01, +0.00), ( +0.01, +0.00), ( +0.18, +0.43), ( -0.04, -0.55), ( -0.06, -0.03), ( -0.06, -0.01), ( +0.00, +0.15)
2324( +0.00, +0.01), ( +0.00, +0.01), ( +0.00, +0.01), ( +0.01, +0.00), ( +0.01, +0.00), ( +0.18, +0.43), ( -0.04, -0.55), ( -0.06, -0.03), ( -0.06, +0.15)
2325( -0.00, +0.01), ( +0.00, +0.01), ( +0.00, +0.01), ( +0.00, +0.01), ( +0.01, +0.00), ( +0.01, +0.00), ( +0.18, +0.43), ( -0.04, -0.55), ( -0.12, +0.13)
2326( -0.01, +0.01), ( -0.00, +0.01), ( +0.00, +0.01), ( +0.00, +0.01), ( +0.00, +0.01), ( +0.01, +0.00), ( +0.01, +0.00), ( +0.18, +0.43), ( -0.17, -0.42)
2327mul = matmul(mat, inv)
2328mul
2329( +1.00, +0.00), ( +0.00, +0.00), ( -0.00, +0.00), ( +0.00, -0.00), ( +0.00, -0.00), ( +0.00, +0.00), ( -0.00, +0.00), ( +0.00, -0.00), ( +0.00, +0.00)
2330( -0.00, +0.00), ( +1.00, +0.00), ( -0.00, +0.00), ( +0.00, +0.00), ( -0.00, -0.00), ( +0.00, +0.00), ( -0.00, +0.00), ( -0.00, +0.00), ( -0.00, +0.00)
2331( -0.00, +0.00), ( +0.00, +0.00), ( +1.00, -0.00), ( -0.00, +0.00), ( -0.00, -0.00), ( +0.00, +0.00), ( +0.00, -0.00), ( +0.00, -0.00), ( -0.00, +0.00)
2332( -0.00, +0.00), ( +0.00, -0.00), ( +0.00, -0.00), ( +1.00, -0.00), ( -0.00, -0.00), ( -0.00, +0.00), ( -0.00, -0.00), ( +0.00, +0.00), ( -0.00, +0.00)
2333( -0.00, +0.00), ( +0.00, +0.00), ( +0.00, -0.00), ( -0.00, -0.00), ( +1.00, -0.00), ( +0.00, +0.00), ( +0.00, -0.00), ( +0.00, +0.00), ( -0.00, +0.00)
2334( -0.00, +0.00), ( +0.00, -0.00), ( +0.00, +0.00), ( +0.00, -0.00), ( +0.00, +0.00), ( +1.00, -0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
2335( +0.00, +0.00), ( -0.00, -0.00), ( +0.00, -0.00), ( +0.00, -0.00), ( +0.00, -0.00), ( -0.00, +0.00), ( +1.00, +0.00), ( -0.00, +0.00), ( +0.00, +0.00)
2336( -0.00, +0.00), ( +0.00, -0.00), ( +0.00, +0.00), ( +0.00, -0.00), ( -0.00, -0.00), ( -0.00, -0.00), ( +0.00, +0.00), ( +1.00, +0.00), ( -0.00, +0.00)
2337( -0.00, -0.00), ( -0.00, +0.00), ( -0.00, +0.00), ( +0.00, +0.00), ( +0.00, -0.00), ( -0.00, +0.00), ( -0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00)
2338
2339
2340!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2341! Compute the inverse of a positive-definite real matrix by passing its Cholesky factorization.
2342!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2343
2344
2345ndim = getUnifRand(1_IK, 6_IK)
2346ndim ! matrix rank
2347+1
2348mat = getCovRand(mold = 1._TKG, ndim = ndim)
2349mat
2350 +1.00
2351chol = getMatChol(mat, subset = lowDia)
2352chol
2353 +1.00
2354call setResized(inv, shape(mat, IK))
2355call setMatInv(inv, chol, auxil = choLow)
2356inv
2357 +1.00
2358mul = matmul(mat, inv)
2359mul
2360 +1.00
2361
2362
2363ndim = getUnifRand(1_IK, 6_IK)
2364ndim ! matrix rank
2365+3
2366mat = getCovRand(mold = 1._TKG, ndim = ndim)
2367mat
2368 +1.00, -0.90, +0.75
2369 -0.90, +1.00, -0.70
2370 +0.75, -0.70, +1.00
2371chol = getMatChol(mat, subset = lowDia)
2372chol
2373 +1.00, +0.00, +0.00
2374 -0.90, +0.43, +0.00
2375 +0.75, -0.07, +0.66
2376call setResized(inv, shape(mat, IK))
2377call setMatInv(inv, chol, auxil = choLow)
2378inv
2379 +6.23, +4.66, -1.37
2380 +4.66, +5.46, +0.36
2381 -1.37, +0.36, +2.28
2382mul = matmul(mat, inv)
2383mul
2384 +1.00, -0.00, -0.00
2385 -0.00, +1.00, +0.00
2386 +0.00, -0.00, +1.00
2387
2388
2389ndim = getUnifRand(1_IK, 6_IK)
2390ndim ! matrix rank
2391+2
2392mat = getCovRand(mold = 1._TKG, ndim = ndim)
2393mat
2394 +1.00, +0.82
2395 +0.82, +1.00
2396chol = getMatChol(mat, subset = lowDia)
2397chol
2398 +1.00, +0.00
2399 +0.82, +0.57
2400call setResized(inv, shape(mat, IK))
2401call setMatInv(inv, chol, auxil = choLow)
2402inv
2403 +3.08, -2.53
2404 -2.53, +3.08
2405mul = matmul(mat, inv)
2406mul
2407 +1.00, +0.00
2408 +0.00, +1.00
2409
2410
2411ndim = getUnifRand(1_IK, 6_IK)
2412ndim ! matrix rank
2413+1
2414mat = getCovRand(mold = 1._TKG, ndim = ndim)
2415mat
2416 +1.00
2417chol = getMatChol(mat, subset = lowDia)
2418chol
2419 +1.00
2420call setResized(inv, shape(mat, IK))
2421call setMatInv(inv, chol, auxil = choLow)
2422inv
2423 +1.00
2424mul = matmul(mat, inv)
2425mul
2426 +1.00
2427
2428
2429ndim = getUnifRand(1_IK, 6_IK)
2430ndim ! matrix rank
2431+4
2432mat = getCovRand(mold = 1._TKG, ndim = ndim)
2433mat
2434 +1.00, -0.92, +0.66, -0.27
2435 -0.92, +1.00, -0.47, +0.55
2436 +0.66, -0.47, +1.00, -0.12
2437 -0.27, +0.55, -0.12, +1.00
2438chol = getMatChol(mat, subset = lowDia)
2439chol
2440 +1.00, +0.00, +0.00, +0.00
2441 -0.92, +0.39, +0.00, +0.00
2442 +0.66, +0.36, +0.66, +0.00
2443 -0.27, +0.77, -0.33, +0.47
2444call setResized(inv, shape(mat, IK))
2445call setMatInv(inv, chol, auxil = choLow)
2446inv
2447 +36.12, +35.05, -8.61, -10.46
2448 +35.05, +35.88, -7.59, -11.09
2449 -8.61, -7.59, +3.38, +2.23
2450 -10.46, -11.09, +2.23, +4.52
2451mul = matmul(mat, inv)
2452mul
2453 +1.00, +0.00, -0.00, +0.00
2454 +0.00, +1.00, +0.00, -0.00
2455 -0.00, +0.00, +1.00, +0.00
2456 +0.00, -0.00, +0.00, +1.00
2457
2458
2459ndim = getUnifRand(1_IK, 6_IK)
2460ndim ! matrix rank
2461+4
2462mat = getCovRand(mold = 1._TKG, ndim = ndim)
2463mat
2464 +1.00, +0.45, +0.89, +0.35
2465 +0.45, +1.00, +0.81, +0.94
2466 +0.89, +0.81, +1.00, +0.71
2467 +0.35, +0.94, +0.71, +1.00
2468chol = getMatChol(mat, subset = lowDia)
2469chol
2470 +1.00, +0.00, +0.00, +0.00
2471 +0.45, +0.89, +0.00, +0.00
2472 +0.89, +0.46, +0.02, +0.00
2473 +0.35, +0.88, +0.00, +0.32
2474call setResized(inv, shape(mat, IK))
2475call setMatInv(inv, chol, auxil = choLow)
2476inv
2477 +724.18, +557.54, -1096.39, +1.39
2478 +557.54, +442.71, -847.85, -8.94
2479 -1096.39, -847.85, +1662.98, -0.77
2480 +1.39, -8.94, -0.77, +9.48
2481mul = matmul(mat, inv)
2482mul
2483 +1.00, -0.00, +0.00, +0.00
2484 +0.00, +1.00, +0.00, +0.00
2485 -0.00, -0.00, +1.00, +0.00
2486 +0.00, +0.00, -0.00, +1.00
2487
2488
2489ndim = getUnifRand(1_IK, 6_IK)
2490ndim ! matrix rank
2491+1
2492mat = getCovRand(mold = 1._TKG, ndim = ndim)
2493mat
2494 +1.00
2495chol = getMatChol(mat, subset = lowDia)
2496chol
2497 +1.00
2498call setResized(inv, shape(mat, IK))
2499call setMatInv(inv, chol, auxil = choLow)
2500inv
2501 +1.00
2502mul = matmul(mat, inv)
2503mul
2504 +1.00
2505
2506
2507ndim = getUnifRand(1_IK, 6_IK)
2508ndim ! matrix rank
2509+2
2510mat = getCovRand(mold = 1._TKG, ndim = ndim)
2511mat
2512 +1.00, +0.36
2513 +0.36, +1.00
2514chol = getMatChol(mat, subset = lowDia)
2515chol
2516 +1.00, +0.00
2517 +0.36, +0.93
2518call setResized(inv, shape(mat, IK))
2519call setMatInv(inv, chol, auxil = choLow)
2520inv
2521 +1.15, -0.41
2522 -0.41, +1.15
2523mul = matmul(mat, inv)
2524mul
2525 +1.00, -0.00
2526 +0.00, +1.00
2527
2528
2529ndim = getUnifRand(1_IK, 6_IK)
2530ndim ! matrix rank
2531+3
2532mat = getCovRand(mold = 1._TKG, ndim = ndim)
2533mat
2534 +1.00, -0.89, +0.66
2535 -0.89, +1.00, -0.66
2536 +0.66, -0.66, +1.00
2537chol = getMatChol(mat, subset = lowDia)
2538chol
2539 +1.00, +0.00, +0.00
2540 -0.89, +0.45, +0.00
2541 +0.66, -0.18, +0.73
2542call setResized(inv, shape(mat, IK))
2543call setMatInv(inv, chol, auxil = choLow)
2544inv
2545 +5.02, +4.10, -0.57
2546 +4.10, +5.13, +0.73
2547 -0.57, +0.73, +1.85
2548mul = matmul(mat, inv)
2549mul
2550 +1.00, +0.00, -0.00
2551 -0.00, +1.00, +0.00
2552 -0.00, +0.00, +1.00
2553
2554
2555ndim = getUnifRand(1_IK, 6_IK)
2556ndim ! matrix rank
2557+4
2558mat = getCovRand(mold = 1._TKG, ndim = ndim)
2559mat
2560 +1.00, +0.39, +0.73, -0.50
2561 +0.39, +1.00, +0.16, -0.64
2562 +0.73, +0.16, +1.00, -0.12
2563 -0.50, -0.64, -0.12, +1.00
2564chol = getMatChol(mat, subset = lowDia)
2565chol
2566 +1.00, +0.00, +0.00, +0.00
2567 +0.39, +0.92, +0.00, +0.00
2568 +0.73, -0.14, +0.67, +0.00
2569 -0.50, -0.48, +0.27, +0.67
2570call setResized(inv, shape(mat, IK))
2571call setMatInv(inv, chol, auxil = choLow)
2572inv
2573 +3.40, -0.11, -2.30, +1.36
2574 -0.11, +1.72, -0.07, +1.04
2575 -2.30, -0.07, +2.58, -0.90
2576 +1.36, +1.04, -0.90, +2.24
2577mul = matmul(mat, inv)
2578mul
2579 +1.00, +0.00, +0.00, +0.00
2580 +0.00, +1.00, +0.00, +0.00
2581 +0.00, -0.00, +1.00, +0.00
2582 +0.00, +0.00, +0.00, +1.00
2583
2584
2585!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2586! Compute the inverse of a positive-definite complex matrix by passing its Cholesky factorization.
2587!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2588
2589
2590mat
2591( +9.00, +0.00), ( +3.00, +3.00), ( +3.00, -3.00)
2592( +3.00, -3.00), ( +18.00, +0.00), ( +8.00, -6.00)
2593( +3.00, +3.00), ( +8.00, +6.00), ( +43.00, +0.00)
2594chol = getMatChol(mat, subset = lowDia)
2595chol
2596( +3.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
2597( +1.00, -1.00), ( +4.00, +0.00), ( +0.00, +0.00)
2598( +1.00, +1.00), ( +2.00, +1.00), ( +6.00, +0.00)
2599call setResized(inv, shape(mat, IK))
2600call setMatInv(inv, chol, auxil = choLow)
2601inv
2602( +0.13, -0.00), ( -0.02, -0.03), ( -0.00, +0.01)
2603( -0.02, +0.03), ( +0.07, -0.00), ( -0.01, +0.01)
2604( -0.00, -0.01), ( -0.01, -0.01), ( +0.03, -0.00)
2605mul = matmul(mat, inv)
2606mul
2607( +1.00, +0.00), ( -0.00, -0.00), ( +0.00, -0.00)
2608( +0.00, -0.00), ( +1.00, +0.00), ( -0.00, +0.00)
2609( +0.00, +0.00), ( -0.00, -0.00), ( +1.00, -0.00)
2610
2611
2612mat
2613( +9.00, +0.00), ( +3.00, +3.00), ( +3.00, -3.00)
2614( +3.00, -3.00), ( +18.00, +0.00), ( +8.00, -6.00)
2615( +3.00, +3.00), ( +8.00, +6.00), ( +43.00, +0.00)
2616chol = getMatChol(mat, subset = uppDia)
2617chol
2618( +3.00, +0.00), ( +1.00, +1.00), ( +1.00, -1.00)
2619( +0.00, +0.00), ( +4.00, +0.00), ( +2.00, -1.00)
2620( +0.00, +0.00), ( +0.00, +0.00), ( +6.00, +0.00)
2621call setResized(inv, shape(mat, IK))
2622call setMatInv(inv, chol, auxil = choUpp)
2623inv
2624( +0.13, -0.00), ( -0.02, -0.03), ( -0.00, +0.01)
2625( -0.02, +0.03), ( +0.07, -0.00), ( -0.01, +0.01)
2626( -0.00, -0.01), ( -0.01, -0.01), ( +0.03, -0.00)
2627mul = matmul(mat, inv)
2628mul
2629( +1.00, +0.00), ( -0.00, -0.00), ( +0.00, -0.00)
2630( +0.00, -0.00), ( +1.00, +0.00), ( -0.00, +0.00)
2631( +0.00, +0.00), ( -0.00, -0.00), ( +1.00, -0.00)
2632
2633
2634!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2635! Compute a subset of the inverse of a positive-definite real matrix by passing its Cholesky factorization.
2636!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2637
2638
2639ndim = getUnifRand(1_IK, 6_IK)
2640ndim ! matrix rank
2641+6
2642mat = getCovRand(mold = 1._TKG, ndim = ndim)
2643mat
2644 +1.00, +1.00, +0.10, -0.26, -0.53, -0.18
2645 +1.00, +1.00, +0.13, -0.27, -0.55, -0.19
2646 +0.10, +0.13, +1.00, -0.46, -0.65, -0.23
2647 -0.26, -0.27, -0.46, +1.00, -0.07, +0.44
2648 -0.53, -0.55, -0.65, -0.07, +1.00, -0.07
2649 -0.18, -0.19, -0.23, +0.44, -0.07, +1.00
2650chol = getMatChol(mat, subset = lowDia)
2651chol
2652 +1.00, +0.00, +0.00, +0.00, +0.00, +0.00
2653 +1.00, +0.03, +0.00, +0.00, +0.00, +0.00
2654 +0.10, +0.91, +0.40, +0.00, +0.00, +0.00
2655 -0.26, -0.22, -0.59, +0.73, +0.00, +0.00
2656 -0.53, -0.59, -0.15, -0.58, +0.13, +0.00
2657 -0.18, -0.23, +0.00, +0.47, -0.20, +0.81
2658call setResized(inv, shape(mat, IK))
2659
2660inv = 0
2661call setMatInv(inv, chol, auxil = choLow, subset = uppDia)
2662inv
2663 +35646.79, -34981.50, +2155.17, +1020.72, +1205.54, +2.46
2664 +0.00, +34336.34, -2105.59, -995.21, -1172.19, -0.95
2665 +0.00, +0.00, +144.82, +71.08, +88.21, +2.12
2666 +0.00, +0.00, +0.00, +36.62, +44.70, +0.85
2667 +0.00, +0.00, +0.00, +0.00, +58.51, +2.33
2668 +0.00, +0.00, +0.00, +0.00, +0.00, +1.53
2669call setMatCopy(inv(2:,1:), rdpack, inv(1:,2:), rdpack, uppDia, transHerm) ! symmetrize `inv` for multiplication.
2670inv
2671 +35646.79, -34981.50, +2155.17, +1020.72, +1205.54, +2.46
2672 -34981.50, +34336.34, -2105.59, -995.21, -1172.19, -0.95
2673 +2155.17, -2105.59, +144.82, +71.08, +88.21, +2.12
2674 +1020.72, -995.21, +71.08, +36.62, +44.70, +0.85
2675 +1205.54, -1172.19, +88.21, +44.70, +58.51, +2.33
2676 +2.46, -0.95, +2.12, +0.85, +2.33, +1.53
2677mul = matmul(mat, inv)
2678mul
2679 +1.01, -0.01, +0.00, +0.00, +0.00, +0.00
2680 +0.01, +0.99, +0.00, +0.00, +0.00, +0.00
2681 +0.00, -0.00, +1.00, +0.00, +0.00, +0.00
2682 -0.00, +0.00, -0.00, +1.00, -0.00, -0.00
2683 -0.01, +0.00, -0.00, -0.00, +1.00, -0.00
2684 -0.00, +0.00, -0.00, -0.00, -0.00, +1.00
2685
2686inv = 0
2687call setMatInv(inv, chol, auxil = choLow, subset = lowDia)
2688inv
2689 +35646.79, +0.00, +0.00, +0.00, +0.00, +0.00
2690 -34981.50, +34336.34, +0.00, +0.00, +0.00, +0.00
2691 +2155.17, -2105.59, +144.82, +0.00, +0.00, +0.00
2692 +1020.72, -995.21, +71.08, +36.62, +0.00, +0.00
2693 +1205.54, -1172.19, +88.21, +44.70, +58.51, +0.00
2694 +2.46, -0.95, +2.12, +0.85, +2.33, +1.53
2695call setMatCopy(inv(1:,2:), rdpack, inv(2:,1:), rdpack, lowDia, transHerm) ! symmetrize `inv` for multiplication.
2696inv
2697 +35646.79, -34981.50, +2155.17, +1020.72, +1205.54, +2.46
2698 -34981.50, +34336.34, -2105.59, -995.21, -1172.19, -0.95
2699 +2155.17, -2105.59, +144.82, +71.08, +88.21, +2.12
2700 +1020.72, -995.21, +71.08, +36.62, +44.70, +0.85
2701 +1205.54, -1172.19, +88.21, +44.70, +58.51, +2.33
2702 +2.46, -0.95, +2.12, +0.85, +2.33, +1.53
2703mul = matmul(mat, inv)
2704mul
2705 +1.01, -0.01, +0.00, +0.00, +0.00, +0.00
2706 +0.01, +0.99, +0.00, +0.00, +0.00, +0.00
2707 +0.00, -0.00, +1.00, +0.00, +0.00, +0.00
2708 -0.00, +0.00, -0.00, +1.00, -0.00, -0.00
2709 -0.01, +0.00, -0.00, -0.00, +1.00, -0.00
2710 -0.00, +0.00, -0.00, -0.00, -0.00, +1.00
2711
2712
2713ndim = getUnifRand(1_IK, 6_IK)
2714ndim ! matrix rank
2715+6
2716mat = getCovRand(mold = 1._TKG, ndim = ndim)
2717mat
2718 +1.00, +0.37, -0.98, +0.76, +0.52, +0.13
2719 +0.37, +1.00, -0.55, +0.74, +0.49, +0.00
2720 -0.98, -0.55, +1.00, -0.84, -0.56, -0.12
2721 +0.76, +0.74, -0.84, +1.00, +0.81, -0.34
2722 +0.52, +0.49, -0.56, +0.81, +1.00, -0.57
2723 +0.13, +0.00, -0.12, -0.34, -0.57, +1.00
2724chol = getMatChol(mat, subset = lowDia)
2725chol
2726 +1.00, +0.00, +0.00, +0.00, +0.00, +0.00
2727 +0.37, +0.93, +0.00, +0.00, +0.00, +0.00
2728 -0.98, -0.20, +0.03, +0.00, +0.00, +0.00
2729 +0.76, +0.49, +0.20, +0.38, +0.00, +0.00
2730 +0.52, +0.32, +0.43, +0.46, +0.49, +0.00
2731 +0.13, -0.05, -0.35, -0.92, -0.10, +0.01
2732call setResized(inv, shape(mat, IK))
2733
2734inv = 0
2735call setMatInv(inv, chol, auxil = choLow, subset = uppDia)
2736inv
2737 +287897.06, +102052.43, +254034.48, -88731.81, -8225.84, -40146.20
2738 +0.00, +36197.50, +90009.83, -31510.19, -2917.05, -14255.86
2739 +0.00, +0.00, +224232.41, -78187.09, -7255.48, -35375.99
2740 +0.00, +0.00, +0.00, +27503.44, +2536.27, +12440.58
2741 +0.00, +0.00, +0.00, +0.00, +239.09, +1150.07
2742 +0.00, +0.00, +0.00, +0.00, +0.00, +5629.94
2743call setMatCopy(inv(2:,1:), rdpack, inv(1:,2:), rdpack, uppDia, transHerm) ! symmetrize `inv` for multiplication.
2744inv
2745 +287897.06, +102052.43, +254034.48, -88731.81, -8225.84, -40146.20
2746 +102052.43, +36197.50, +90009.83, -31510.19, -2917.05, -14255.86
2747 +254034.48, +90009.83, +224232.41, -78187.09, -7255.48, -35375.99
2748 -88731.81, -31510.19, -78187.09, +27503.44, +2536.27, +12440.58
2749 -8225.84, -2917.05, -7255.48, +2536.27, +239.09, +1150.07
2750 -40146.20, -14255.86, -35375.99, +12440.58, +1150.07, +5629.94
2751mul = matmul(mat, inv)
2752mul
2753 +1.00, -0.01, +0.00, +0.01, +0.00, +0.01
2754 -0.01, +1.00, -0.01, +0.00, +0.00, +0.00
2755 +0.01, -0.00, +1.02, -0.01, -0.00, -0.01
2756 -0.00, -0.01, +0.01, +1.01, +0.00, +0.00
2757 -0.00, +0.00, -0.00, +0.00, +1.00, -0.00
2758 -0.00, -0.00, -0.00, +0.00, +0.00, +1.00
2759
2760inv = 0
2761call setMatInv(inv, chol, auxil = choLow, subset = lowDia)
2762inv
2763 +287897.06, +0.00, +0.00, +0.00, +0.00, +0.00
2764 +102052.43, +36197.50, +0.00, +0.00, +0.00, +0.00
2765 +254034.48, +90009.83, +224232.41, +0.00, +0.00, +0.00
2766 -88731.81, -31510.19, -78187.09, +27503.44, +0.00, +0.00
2767 -8225.84, -2917.05, -7255.48, +2536.27, +239.09, +0.00
2768 -40146.20, -14255.86, -35375.99, +12440.58, +1150.07, +5629.94
2769call setMatCopy(inv(1:,2:), rdpack, inv(2:,1:), rdpack, lowDia, transHerm) ! symmetrize `inv` for multiplication.
2770inv
2771 +287897.06, +102052.43, +254034.48, -88731.81, -8225.84, -40146.20
2772 +102052.43, +36197.50, +90009.83, -31510.19, -2917.05, -14255.86
2773 +254034.48, +90009.83, +224232.41, -78187.09, -7255.48, -35375.99
2774 -88731.81, -31510.19, -78187.09, +27503.44, +2536.27, +12440.58
2775 -8225.84, -2917.05, -7255.48, +2536.27, +239.09, +1150.07
2776 -40146.20, -14255.86, -35375.99, +12440.58, +1150.07, +5629.94
2777mul = matmul(mat, inv)
2778mul
2779 +1.00, -0.01, +0.00, +0.01, +0.00, +0.01
2780 -0.01, +1.00, -0.01, +0.00, +0.00, +0.00
2781 +0.01, -0.00, +1.02, -0.01, -0.00, -0.01
2782 -0.00, -0.01, +0.01, +1.01, +0.00, +0.00
2783 -0.00, +0.00, -0.00, +0.00, +1.00, -0.00
2784 -0.00, -0.00, -0.00, +0.00, +0.00, +1.00
2785
2786
2787ndim = getUnifRand(1_IK, 6_IK)
2788ndim ! matrix rank
2789+4
2790mat = getCovRand(mold = 1._TKG, ndim = ndim)
2791mat
2792 +1.00, -0.61, -0.18, +0.44
2793 -0.61, +1.00, +0.44, -0.91
2794 -0.18, +0.44, +1.00, -0.19
2795 +0.44, -0.91, -0.19, +1.00
2796chol = getMatChol(mat, subset = lowDia)
2797chol
2798 +1.00, +0.00, +0.00, +0.00
2799 -0.61, +0.79, +0.00, +0.00
2800 -0.18, +0.42, +0.89, +0.00
2801 +0.44, -0.81, +0.26, +0.29
2802call setResized(inv, shape(mat, IK))
2803
2804inv = 0
2805call setMatInv(inv, chol, auxil = choLow, subset = uppDia)
2806inv
2807 +2.26, +4.34, -0.99, +2.76
2808 +0.00, +18.87, -4.88, +14.33
2809 +0.00, +0.00, +2.31, -3.56
2810 +0.00, +0.00, +0.00, +12.15
2811call setMatCopy(inv(2:,1:), rdpack, inv(1:,2:), rdpack, uppDia, transHerm) ! symmetrize `inv` for multiplication.
2812inv
2813 +2.26, +4.34, -0.99, +2.76
2814 +4.34, +18.87, -4.88, +14.33
2815 -0.99, -4.88, +2.31, -3.56
2816 +2.76, +14.33, -3.56, +12.15
2817mul = matmul(mat, inv)
2818mul
2819 +1.00, -0.00, -0.00, +0.00
2820 -0.00, +1.00, +0.00, -0.00
2821 -0.00, -0.00, +1.00, -0.00
2822 -0.00, -0.00, -0.00, +1.00
2823
2824inv = 0
2825call setMatInv(inv, chol, auxil = choLow, subset = lowDia)
2826inv
2827 +2.26, +0.00, +0.00, +0.00
2828 +4.34, +18.87, +0.00, +0.00
2829 -0.99, -4.88, +2.31, +0.00
2830 +2.76, +14.33, -3.56, +12.15
2831call setMatCopy(inv(1:,2:), rdpack, inv(2:,1:), rdpack, lowDia, transHerm) ! symmetrize `inv` for multiplication.
2832inv
2833 +2.26, +4.34, -0.99, +2.76
2834 +4.34, +18.87, -4.88, +14.33
2835 -0.99, -4.88, +2.31, -3.56
2836 +2.76, +14.33, -3.56, +12.15
2837mul = matmul(mat, inv)
2838mul
2839 +1.00, -0.00, -0.00, +0.00
2840 -0.00, +1.00, +0.00, -0.00
2841 -0.00, -0.00, +1.00, -0.00
2842 -0.00, -0.00, -0.00, +1.00
2843
2844
2845ndim = getUnifRand(1_IK, 6_IK)
2846ndim ! matrix rank
2847+6
2848mat = getCovRand(mold = 1._TKG, ndim = ndim)
2849mat
2850 +1.00, +0.24, +0.57, +0.75, -0.08, -0.22
2851 +0.24, +1.00, +0.80, -0.42, +0.21, -0.07
2852 +0.57, +0.80, +1.00, -0.02, +0.42, -0.15
2853 +0.75, -0.42, -0.02, +1.00, -0.15, -0.02
2854 -0.08, +0.21, +0.42, -0.15, +1.00, -0.23
2855 -0.22, -0.07, -0.15, -0.02, -0.23, +1.00
2856chol = getMatChol(mat, subset = lowDia)
2857chol
2858 +1.00, +0.00, +0.00, +0.00, +0.00, +0.00
2859 +0.24, +0.97, +0.00, +0.00, +0.00, +0.00
2860 +0.57, +0.68, +0.47, +0.00, +0.00, +0.00
2861 +0.75, -0.62, -0.06, +0.24, +0.00, +0.00
2862 -0.08, +0.24, +0.66, +0.42, +0.57, +0.00
2863 -0.22, -0.02, -0.04, +0.56, -0.79, +0.07
2864call setResized(inv, shape(mat, IK))
2865
2866inv = 0
2867call setMatInv(inv, chol, auxil = choLow, subset = uppDia)
2868inv
2869 +6548.41, -1875.30, -2852.34, -5482.83, +1571.21, +1131.91
2870 +0.00, +543.08, +811.51, +1572.74, -448.60, -324.18
2871 +0.00, +0.00, +1248.35, +2385.86, -686.09, -492.94
2872 +0.00, +0.00, +0.00, +4592.80, -1314.77, -947.68
2873 +0.00, +0.00, +0.00, +0.00, +378.60, +271.81
2874 +0.00, +0.00, +0.00, +0.00, +0.00, +196.72
2875call setMatCopy(inv(2:,1:), rdpack, inv(1:,2:), rdpack, uppDia, transHerm) ! symmetrize `inv` for multiplication.
2876inv
2877 +6548.41, -1875.30, -2852.34, -5482.83, +1571.21, +1131.91
2878 -1875.30, +543.08, +811.51, +1572.74, -448.60, -324.18
2879 -2852.34, +811.51, +1248.35, +2385.86, -686.09, -492.94
2880 -5482.83, +1572.74, +2385.86, +4592.80, -1314.77, -947.68
2881 +1571.21, -448.60, -686.09, -1314.77, +378.60, +271.81
2882 +1131.91, -324.18, -492.94, -947.68, +271.81, +196.72
2883mul = matmul(mat, inv)
2884mul
2885 +1.00, -0.00, -0.00, -0.00, +0.00, +0.00
2886 +0.00, +1.00, -0.00, -0.00, +0.00, +0.00
2887 +0.00, -0.00, +1.00, -0.00, +0.00, +0.00
2888 +0.00, -0.00, -0.00, +1.00, +0.00, +0.00
2889 +0.00, -0.00, -0.00, -0.00, +1.00, +0.00
2890 -0.00, +0.00, +0.00, +0.00, -0.00, +1.00
2891
2892inv = 0
2893call setMatInv(inv, chol, auxil = choLow, subset = lowDia)
2894inv
2895 +6548.41, +0.00, +0.00, +0.00, +0.00, +0.00
2896 -1875.30, +543.08, +0.00, +0.00, +0.00, +0.00
2897 -2852.34, +811.51, +1248.35, +0.00, +0.00, +0.00
2898 -5482.83, +1572.74, +2385.86, +4592.80, +0.00, +0.00
2899 +1571.21, -448.60, -686.09, -1314.77, +378.60, +0.00
2900 +1131.91, -324.18, -492.94, -947.68, +271.81, +196.72
2901call setMatCopy(inv(1:,2:), rdpack, inv(2:,1:), rdpack, lowDia, transHerm) ! symmetrize `inv` for multiplication.
2902inv
2903 +6548.41, -1875.30, -2852.34, -5482.83, +1571.21, +1131.91
2904 -1875.30, +543.08, +811.51, +1572.74, -448.60, -324.18
2905 -2852.34, +811.51, +1248.35, +2385.86, -686.09, -492.94
2906 -5482.83, +1572.74, +2385.86, +4592.80, -1314.77, -947.68
2907 +1571.21, -448.60, -686.09, -1314.77, +378.60, +271.81
2908 +1131.91, -324.18, -492.94, -947.68, +271.81, +196.72
2909mul = matmul(mat, inv)
2910mul
2911 +1.00, -0.00, -0.00, -0.00, +0.00, +0.00
2912 +0.00, +1.00, -0.00, -0.00, +0.00, +0.00
2913 +0.00, -0.00, +1.00, -0.00, +0.00, +0.00
2914 +0.00, -0.00, -0.00, +1.00, +0.00, +0.00
2915 +0.00, -0.00, -0.00, -0.00, +1.00, +0.00
2916 -0.00, +0.00, +0.00, +0.00, -0.00, +1.00
2917
2918
2919ndim = getUnifRand(1_IK, 6_IK)
2920ndim ! matrix rank
2921+4
2922mat = getCovRand(mold = 1._TKG, ndim = ndim)
2923mat
2924 +1.00, +0.99, +0.49, -0.78
2925 +0.99, +1.00, +0.56, -0.85
2926 +0.49, +0.56, +1.00, -0.77
2927 -0.78, -0.85, -0.77, +1.00
2928chol = getMatChol(mat, subset = lowDia)
2929chol
2930 +1.00, +0.00, +0.00, +0.00
2931 +0.99, +0.16, +0.00, +0.00
2932 +0.49, +0.48, +0.73, +0.00
2933 -0.78, -0.52, -0.20, +0.30
2934call setResized(inv, shape(mat, IK))
2935
2936inv = 0
2937call setMatInv(inv, chol, auxil = choLow, subset = uppDia)
2938inv
2939 +88.40, -103.71, -0.77, -19.88
2940 +0.00, +125.51, +1.84, +27.30
2941 +0.00, +0.00, +2.73, +3.07
2942 +0.00, +0.00, +0.00, +11.08
2943call setMatCopy(inv(2:,1:), rdpack, inv(1:,2:), rdpack, uppDia, transHerm) ! symmetrize `inv` for multiplication.
2944inv
2945 +88.40, -103.71, -0.77, -19.88
2946 -103.71, +125.51, +1.84, +27.30
2947 -0.77, +1.84, +2.73, +3.07
2948 -19.88, +27.30, +3.07, +11.08
2949mul = matmul(mat, inv)
2950mul
2951 +1.00, +0.00, -0.00, +0.00
2952 +0.00, +1.00, -0.00, +0.00
2953 +0.00, +0.00, +1.00, +0.00
2954 -0.00, -0.00, +0.00, +1.00
2955
2956inv = 0
2957call setMatInv(inv, chol, auxil = choLow, subset = lowDia)
2958inv
2959 +88.40, +0.00, +0.00, +0.00
2960 -103.71, +125.51, +0.00, +0.00
2961 -0.77, +1.84, +2.73, +0.00
2962 -19.88, +27.30, +3.07, +11.08
2963call setMatCopy(inv(1:,2:), rdpack, inv(2:,1:), rdpack, lowDia, transHerm) ! symmetrize `inv` for multiplication.
2964inv
2965 +88.40, -103.71, -0.77, -19.88
2966 -103.71, +125.51, +1.84, +27.30
2967 -0.77, +1.84, +2.73, +3.07
2968 -19.88, +27.30, +3.07, +11.08
2969mul = matmul(mat, inv)
2970mul
2971 +1.00, +0.00, -0.00, +0.00
2972 +0.00, +1.00, -0.00, +0.00
2973 +0.00, +0.00, +1.00, +0.00
2974 -0.00, -0.00, +0.00, +1.00
2975
2976
2977ndim = getUnifRand(1_IK, 6_IK)
2978ndim ! matrix rank
2979+2
2980mat = getCovRand(mold = 1._TKG, ndim = ndim)
2981mat
2982 +1.00, -0.73
2983 -0.73, +1.00
2984chol = getMatChol(mat, subset = lowDia)
2985chol
2986 +1.00, +0.00
2987 -0.73, +0.68
2988call setResized(inv, shape(mat, IK))
2989
2990inv = 0
2991call setMatInv(inv, chol, auxil = choLow, subset = uppDia)
2992inv
2993 +2.17, +1.59
2994 +0.00, +2.17
2995call setMatCopy(inv(2:,1:), rdpack, inv(1:,2:), rdpack, uppDia, transHerm) ! symmetrize `inv` for multiplication.
2996inv
2997 +2.17, +1.59
2998 +1.59, +2.17
2999mul = matmul(mat, inv)
3000mul
3001 +1.00, -0.00
3002 +0.00, +1.00
3003
3004inv = 0
3005call setMatInv(inv, chol, auxil = choLow, subset = lowDia)
3006inv
3007 +2.17, +0.00
3008 +1.59, +2.17
3009call setMatCopy(inv(1:,2:), rdpack, inv(2:,1:), rdpack, lowDia, transHerm) ! symmetrize `inv` for multiplication.
3010inv
3011 +2.17, +1.59
3012 +1.59, +2.17
3013mul = matmul(mat, inv)
3014mul
3015 +1.00, -0.00
3016 +0.00, +1.00
3017
3018
3019ndim = getUnifRand(1_IK, 6_IK)
3020ndim ! matrix rank
3021+2
3022mat = getCovRand(mold = 1._TKG, ndim = ndim)
3023mat
3024 +1.00, +0.66
3025 +0.66, +1.00
3026chol = getMatChol(mat, subset = lowDia)
3027chol
3028 +1.00, +0.00
3029 +0.66, +0.75
3030call setResized(inv, shape(mat, IK))
3031
3032inv = 0
3033call setMatInv(inv, chol, auxil = choLow, subset = uppDia)
3034inv
3035 +1.77, -1.17
3036 +0.00, +1.77
3037call setMatCopy(inv(2:,1:), rdpack, inv(1:,2:), rdpack, uppDia, transHerm) ! symmetrize `inv` for multiplication.
3038inv
3039 +1.77, -1.17
3040 -1.17, +1.77
3041mul = matmul(mat, inv)
3042mul
3043 +1.00, +0.00
3044 +0.00, +1.00
3045
3046inv = 0
3047call setMatInv(inv, chol, auxil = choLow, subset = lowDia)
3048inv
3049 +1.77, +0.00
3050 -1.17, +1.77
3051call setMatCopy(inv(1:,2:), rdpack, inv(2:,1:), rdpack, lowDia, transHerm) ! symmetrize `inv` for multiplication.
3052inv
3053 +1.77, -1.17
3054 -1.17, +1.77
3055mul = matmul(mat, inv)
3056mul
3057 +1.00, +0.00
3058 +0.00, +1.00
3059
3060
3061ndim = getUnifRand(1_IK, 6_IK)
3062ndim ! matrix rank
3063+2
3064mat = getCovRand(mold = 1._TKG, ndim = ndim)
3065mat
3066 +1.00, +0.61
3067 +0.61, +1.00
3068chol = getMatChol(mat, subset = lowDia)
3069chol
3070 +1.00, +0.00
3071 +0.61, +0.79
3072call setResized(inv, shape(mat, IK))
3073
3074inv = 0
3075call setMatInv(inv, chol, auxil = choLow, subset = uppDia)
3076inv
3077 +1.60, -0.98
3078 +0.00, +1.60
3079call setMatCopy(inv(2:,1:), rdpack, inv(1:,2:), rdpack, uppDia, transHerm) ! symmetrize `inv` for multiplication.
3080inv
3081 +1.60, -0.98
3082 -0.98, +1.60
3083mul = matmul(mat, inv)
3084mul
3085 +1.00, +0.00
3086 +0.00, +1.00
3087
3088inv = 0
3089call setMatInv(inv, chol, auxil = choLow, subset = lowDia)
3090inv
3091 +1.60, +0.00
3092 -0.98, +1.60
3093call setMatCopy(inv(1:,2:), rdpack, inv(2:,1:), rdpack, lowDia, transHerm) ! symmetrize `inv` for multiplication.
3094inv
3095 +1.60, -0.98
3096 -0.98, +1.60
3097mul = matmul(mat, inv)
3098mul
3099 +1.00, +0.00
3100 +0.00, +1.00
3101
3102
3103ndim = getUnifRand(1_IK, 6_IK)
3104ndim ! matrix rank
3105+6
3106mat = getCovRand(mold = 1._TKG, ndim = ndim)
3107mat
3108 +1.00, +0.60, +0.37, +0.63, +0.45, -0.02
3109 +0.60, +1.00, +0.84, +0.36, +0.07, -0.23
3110 +0.37, +0.84, +1.00, +0.02, +0.28, -0.38
3111 +0.63, +0.36, +0.02, +1.00, +0.37, -0.20
3112 +0.45, +0.07, +0.28, +0.37, +1.00, -0.10
3113 -0.02, -0.23, -0.38, -0.20, -0.10, +1.00
3114chol = getMatChol(mat, subset = lowDia)
3115chol
3116 +1.00, +0.00, +0.00, +0.00, +0.00, +0.00
3117 +0.60, +0.80, +0.00, +0.00, +0.00, +0.00
3118 +0.37, +0.77, +0.51, +0.00, +0.00, +0.00
3119 +0.63, -0.02, -0.40, +0.66, +0.00, +0.00
3120 +0.45, -0.25, +0.60, +0.48, +0.37, +0.00
3121 -0.02, -0.28, -0.31, -0.48, +0.68, +0.36
3122call setResized(inv, shape(mat, IK))
3123
3124inv = 0
3125call setMatInv(inv, chol, auxil = choLow, subset = uppDia)
3126inv
3127 +6.32, -25.85, +23.94, +9.84, -11.14, +3.97
3128 +0.00, +181.65, -176.39, -81.05, +76.00, -33.30
3129 +0.00, +0.00, +173.09, +79.68, -74.06, +33.16
3130 +0.00, +0.00, +0.00, +38.49, -34.20, +15.63
3131 +0.00, +0.00, +0.00, +0.00, +33.12, -13.96
3132 +0.00, +0.00, +0.00, +0.00, +0.00, +7.56
3133call setMatCopy(inv(2:,1:), rdpack, inv(1:,2:), rdpack, uppDia, transHerm) ! symmetrize `inv` for multiplication.
3134inv
3135 +6.32, -25.85, +23.94, +9.84, -11.14, +3.97
3136 -25.85, +181.65, -176.39, -81.05, +76.00, -33.30
3137 +23.94, -176.39, +173.09, +79.68, -74.06, +33.16
3138 +9.84, -81.05, +79.68, +38.49, -34.20, +15.63
3139 -11.14, +76.00, -74.06, -34.20, +33.12, -13.96
3140 +3.97, -33.30, +33.16, +15.63, -13.96, +7.56
3141mul = matmul(mat, inv)
3142mul
3143 +1.00, +0.00, -0.00, -0.00, +0.00, -0.00
3144 -0.00, +1.00, -0.00, -0.00, +0.00, -0.00
3145 -0.00, +0.00, +1.00, -0.00, +0.00, -0.00
3146 -0.00, +0.00, -0.00, +1.00, +0.00, -0.00
3147 -0.00, +0.00, -0.00, -0.00, +1.00, -0.00
3148 +0.00, -0.00, +0.00, +0.00, -0.00, +1.00
3149
3150inv = 0
3151call setMatInv(inv, chol, auxil = choLow, subset = lowDia)
3152inv
3153 +6.32, +0.00, +0.00, +0.00, +0.00, +0.00
3154 -25.85, +181.65, +0.00, +0.00, +0.00, +0.00
3155 +23.94, -176.39, +173.09, +0.00, +0.00, +0.00
3156 +9.84, -81.05, +79.68, +38.49, +0.00, +0.00
3157 -11.14, +76.00, -74.06, -34.20, +33.12, +0.00
3158 +3.97, -33.30, +33.16, +15.63, -13.96, +7.56
3159call setMatCopy(inv(1:,2:), rdpack, inv(2:,1:), rdpack, lowDia, transHerm) ! symmetrize `inv` for multiplication.
3160inv
3161 +6.32, -25.85, +23.94, +9.84, -11.14, +3.97
3162 -25.85, +181.65, -176.39, -81.05, +76.00, -33.30
3163 +23.94, -176.39, +173.09, +79.68, -74.06, +33.16
3164 +9.84, -81.05, +79.68, +38.49, -34.20, +15.63
3165 -11.14, +76.00, -74.06, -34.20, +33.12, -13.96
3166 +3.97, -33.30, +33.16, +15.63, -13.96, +7.56
3167mul = matmul(mat, inv)
3168mul
3169 +1.00, +0.00, -0.00, -0.00, +0.00, -0.00
3170 -0.00, +1.00, -0.00, -0.00, +0.00, -0.00
3171 -0.00, +0.00, +1.00, -0.00, +0.00, -0.00
3172 -0.00, +0.00, -0.00, +1.00, +0.00, -0.00
3173 -0.00, +0.00, -0.00, -0.00, +1.00, -0.00
3174 +0.00, -0.00, +0.00, +0.00, -0.00, +1.00
3175
3176
3177ndim = getUnifRand(1_IK, 6_IK)
3178ndim ! matrix rank
3179+3
3180mat = getCovRand(mold = 1._TKG, ndim = ndim)
3181mat
3182 +1.00, -0.89, +0.09
3183 -0.89, +1.00, +0.27
3184 +0.09, +0.27, +1.00
3185chol = getMatChol(mat, subset = lowDia)
3186chol
3187 +1.00, +0.00, +0.00
3188 -0.89, +0.46, +0.00
3189 +0.09, +0.76, +0.65
3190call setResized(inv, shape(mat, IK))
3191
3192inv = 0
3193call setMatInv(inv, chol, auxil = choLow, subset = uppDia)
3194inv
3195 +10.16, +9.98, -3.61
3196 +0.00, +10.90, -3.85
3197 +0.00, +0.00, +2.37
3198call setMatCopy(inv(2:,1:), rdpack, inv(1:,2:), rdpack, uppDia, transHerm) ! symmetrize `inv` for multiplication.
3199inv
3200 +10.16, +9.98, -3.61
3201 +9.98, +10.90, -3.85
3202 -3.61, -3.85, +2.37
3203mul = matmul(mat, inv)
3204mul
3205 +1.00, +0.00, -0.00
3206 +0.00, +1.00, +0.00
3207 +0.00, +0.00, +1.00
3208
3209inv = 0
3210call setMatInv(inv, chol, auxil = choLow, subset = lowDia)
3211inv
3212 +10.16, +0.00, +0.00
3213 +9.98, +10.90, +0.00
3214 -3.61, -3.85, +2.37
3215call setMatCopy(inv(1:,2:), rdpack, inv(2:,1:), rdpack, lowDia, transHerm) ! symmetrize `inv` for multiplication.
3216inv
3217 +10.16, +9.98, -3.61
3218 +9.98, +10.90, -3.85
3219 -3.61, -3.85, +2.37
3220mul = matmul(mat, inv)
3221mul
3222 +1.00, +0.00, -0.00
3223 +0.00, +1.00, +0.00
3224 +0.00, +0.00, +1.00
3225
3226
3227ndim = getUnifRand(1_IK, 6_IK)
3228ndim ! matrix rank
3229+3
3230mat = getCovRand(mold = 1._TKG, ndim = ndim)
3231mat
3232 +1.00, +0.90, +0.69
3233 +0.90, +1.00, +0.63
3234 +0.69, +0.63, +1.00
3235chol = getMatChol(mat, subset = uppDia)
3236chol
3237 +1.00, +0.90, +0.69
3238 +0.00, +0.43, +0.02
3239 +0.00, +0.00, +0.72
3240call setResized(inv, shape(mat, IK))
3241
3242inv = 0
3243call setMatInv(inv, chol, auxil = choUpp, subset = uppDia)
3244inv
3245 +6.16, -4.76, -1.27
3246 +0.00, +5.33, -0.07
3247 +0.00, +0.00, +1.92
3248call setMatCopy(inv(2:,1:), rdpack, inv(1:,2:), rdpack, uppDia, transHerm) ! symmetrize `inv` for multiplication.
3249inv
3250 +6.16, -4.76, -1.27
3251 -4.76, +5.33, -0.07
3252 -1.27, -0.07, +1.92
3253mul = matmul(mat, inv)
3254mul
3255 +1.00, +0.00, +0.00
3256 +0.00, +1.00, +0.00
3257 +0.00, +0.00, +1.00
3258
3259inv = 0
3260call setMatInv(inv, chol, auxil = choUpp, subset = lowDia)
3261inv
3262 +6.16, +0.00, +0.00
3263 -4.76, +5.33, +0.00
3264 -1.27, -0.07, +1.92
3265call setMatCopy(inv(1:,2:), rdpack, inv(2:,1:), rdpack, lowDia, transHerm) ! symmetrize `inv` for multiplication.
3266inv
3267 +6.16, -4.76, -1.27
3268 -4.76, +5.33, -0.07
3269 -1.27, -0.07, +1.92
3270mul = matmul(mat, inv)
3271mul
3272 +1.00, +0.00, +0.00
3273 +0.00, +1.00, +0.00
3274 +0.00, +0.00, +1.00
3275
3276
3277ndim = getUnifRand(1_IK, 6_IK)
3278ndim ! matrix rank
3279+6
3280mat = getCovRand(mold = 1._TKG, ndim = ndim)
3281mat
3282 +1.00, -1.00, +0.29, -0.55, +0.02, +0.35
3283 -1.00, +1.00, -0.23, +0.59, -0.08, -0.37
3284 +0.29, -0.23, +1.00, -0.03, -0.59, +0.05
3285 -0.55, +0.59, -0.03, +1.00, -0.68, -0.79
3286 +0.02, -0.08, -0.59, -0.68, +1.00, +0.58
3287 +0.35, -0.37, +0.05, -0.79, +0.58, +1.00
3288chol = getMatChol(mat, subset = uppDia)
3289chol
3290 +1.00, -1.00, +0.29, -0.55, +0.02, +0.35
3291 +0.00, +0.08, +0.77, +0.50, -0.72, -0.28
3292 +0.00, +0.00, +0.56, -0.44, -0.07, +0.29
3293 +0.00, +0.00, +0.00, +0.51, -0.68, -0.65
3294 +0.00, +0.00, +0.00, +0.00, +0.11, -0.52
3295 +0.00, +0.00, +0.00, +0.00, +0.00, +0.13
3296call setResized(inv, shape(mat, IK))
3297
3298inv = 0
3299call setMatInv(inv, chol, auxil = choUpp, subset = uppDia)
3300inv
3301 +206071.31, +214051.69, -22558.56, -28192.10, -17660.49, -3491.07
3302 +0.00, +222343.73, -23433.43, -29287.73, -18347.41, -3626.55
3303 +0.00, +0.00, +2473.55, +3090.33, +1938.74, +381.63
3304 +0.00, +0.00, +0.00, +3867.47, +2424.31, +479.60
3305 +0.00, +0.00, +0.00, +0.00, +1523.47, +298.56
3306 +0.00, +0.00, +0.00, +0.00, +0.00, +62.00
3307call setMatCopy(inv(2:,1:), rdpack, inv(1:,2:), rdpack, uppDia, transHerm) ! symmetrize `inv` for multiplication.
3308inv
3309 +206071.31, +214051.69, -22558.56, -28192.10, -17660.49, -3491.07
3310 +214051.69, +222343.73, -23433.43, -29287.73, -18347.41, -3626.55
3311 -22558.56, -23433.43, +2473.55, +3090.33, +1938.74, +381.63
3312 -28192.10, -29287.73, +3090.33, +3867.47, +2424.31, +479.60
3313 -17660.49, -18347.41, +1938.74, +2424.31, +1523.47, +298.56
3314 -3491.07, -3626.55, +381.63, +479.60, +298.56, +62.00
3315mul = matmul(mat, inv)
3316mul
3317 +0.97, -0.02, +0.00, +0.00, +0.00, +0.00
3318 +0.03, +1.02, -0.00, -0.00, -0.00, -0.00
3319 -0.01, -0.01, +1.00, +0.00, +0.00, +0.00
3320 +0.02, +0.02, -0.00, +1.00, -0.00, -0.00
3321 -0.00, -0.00, +0.00, +0.00, +1.00, +0.00
3322 -0.01, -0.01, +0.00, +0.00, +0.00, +1.00
3323
3324inv = 0
3325call setMatInv(inv, chol, auxil = choUpp, subset = lowDia)
3326inv
3327 +206071.31, +0.00, +0.00, +0.00, +0.00, +0.00
3328 +214051.69, +222343.73, +0.00, +0.00, +0.00, +0.00
3329 -22558.56, -23433.43, +2473.55, +0.00, +0.00, +0.00
3330 -28192.10, -29287.73, +3090.33, +3867.47, +0.00, +0.00
3331 -17660.49, -18347.41, +1938.74, +2424.31, +1523.47, +0.00
3332 -3491.07, -3626.55, +381.63, +479.60, +298.56, +62.00
3333call setMatCopy(inv(1:,2:), rdpack, inv(2:,1:), rdpack, lowDia, transHerm) ! symmetrize `inv` for multiplication.
3334inv
3335 +206071.31, +214051.69, -22558.56, -28192.10, -17660.49, -3491.07
3336 +214051.69, +222343.73, -23433.43, -29287.73, -18347.41, -3626.55
3337 -22558.56, -23433.43, +2473.55, +3090.33, +1938.74, +381.63
3338 -28192.10, -29287.73, +3090.33, +3867.47, +2424.31, +479.60
3339 -17660.49, -18347.41, +1938.74, +2424.31, +1523.47, +298.56
3340 -3491.07, -3626.55, +381.63, +479.60, +298.56, +62.00
3341mul = matmul(mat, inv)
3342mul
3343 +0.97, -0.02, +0.00, +0.00, +0.00, +0.00
3344 +0.03, +1.02, -0.00, -0.00, -0.00, -0.00
3345 -0.01, -0.01, +1.00, +0.00, +0.00, +0.00
3346 +0.02, +0.02, -0.00, +1.00, -0.00, -0.00
3347 -0.00, -0.00, +0.00, +0.00, +1.00, +0.00
3348 -0.01, -0.01, +0.00, +0.00, +0.00, +1.00
3349
3350
3351ndim = getUnifRand(1_IK, 6_IK)
3352ndim ! matrix rank
3353+6
3354mat = getCovRand(mold = 1._TKG, ndim = ndim)
3355mat
3356 +1.00, -0.74, +0.52, +0.19, +0.29, -0.55
3357 -0.74, +1.00, -0.06, -0.38, +0.18, +0.72
3358 +0.52, -0.06, +1.00, +0.40, +0.39, -0.43
3359 +0.19, -0.38, +0.40, +1.00, +0.28, -0.41
3360 +0.29, +0.18, +0.39, +0.28, +1.00, +0.40
3361 -0.55, +0.72, -0.43, -0.41, +0.40, +1.00
3362chol = getMatChol(mat, subset = uppDia)
3363chol
3364 +1.00, -0.74, +0.52, +0.19, +0.29, -0.55
3365 +0.00, +0.67, +0.48, -0.35, +0.59, +0.46
3366 +0.00, +0.00, +0.71, +0.66, -0.06, -0.53
3367 +0.00, +0.00, +0.00, +0.63, +0.74, +0.33
3368 +0.00, +0.00, +0.00, +0.00, +0.13, +0.07
3369 +0.00, +0.00, +0.00, +0.00, +0.00, +0.30
3370call setResized(inv, shape(mat, IK))
3371
3372inv = 0
3373call setMatInv(inv, chol, auxil = choUpp, subset = uppDia)
3374inv
3375 +352.23, +341.36, -174.84, +169.88, -141.57, -1.56
3376 +0.00, +335.25, -172.75, +164.44, -134.33, -7.35
3377 +0.00, +0.00, +91.58, -83.90, +66.44, +6.92
3378 +0.00, +0.00, +0.00, +83.64, -69.48, +0.75
3379 +0.00, +0.00, +0.00, +0.00, +61.64, -5.48
3380 +0.00, +0.00, +0.00, +0.00, +0.00, +10.92
3381call setMatCopy(inv(2:,1:), rdpack, inv(1:,2:), rdpack, uppDia, transHerm) ! symmetrize `inv` for multiplication.
3382inv
3383 +352.23, +341.36, -174.84, +169.88, -141.57, -1.56
3384 +341.36, +335.25, -172.75, +164.44, -134.33, -7.35
3385 -174.84, -172.75, +91.58, -83.90, +66.44, +6.92
3386 +169.88, +164.44, -83.90, +83.64, -69.48, +0.75
3387 -141.57, -134.33, +66.44, -69.48, +61.64, -5.48
3388 -1.56, -7.35, +6.92, +0.75, -5.48, +10.92
3389mul = matmul(mat, inv)
3390mul
3391 +1.00, -0.00, +0.00, -0.00, -0.00, +0.00
3392 -0.00, +1.00, -0.00, +0.00, +0.00, -0.00
3393 +0.00, -0.00, +1.00, +0.00, -0.00, +0.00
3394 +0.00, +0.00, -0.00, +1.00, -0.00, +0.00
3395 -0.00, -0.00, +0.00, -0.00, +1.00, +0.00
3396 -0.00, +0.00, -0.00, -0.00, +0.00, +1.00
3397
3398inv = 0
3399call setMatInv(inv, chol, auxil = choUpp, subset = lowDia)
3400inv
3401 +352.23, +0.00, +0.00, +0.00, +0.00, +0.00
3402 +341.36, +335.25, +0.00, +0.00, +0.00, +0.00
3403 -174.84, -172.75, +91.58, +0.00, +0.00, +0.00
3404 +169.88, +164.44, -83.90, +83.64, +0.00, +0.00
3405 -141.57, -134.33, +66.44, -69.48, +61.64, +0.00
3406 -1.56, -7.35, +6.92, +0.75, -5.48, +10.92
3407call setMatCopy(inv(1:,2:), rdpack, inv(2:,1:), rdpack, lowDia, transHerm) ! symmetrize `inv` for multiplication.
3408inv
3409 +352.23, +341.36, -174.84, +169.88, -141.57, -1.56
3410 +341.36, +335.25, -172.75, +164.44, -134.33, -7.35
3411 -174.84, -172.75, +91.58, -83.90, +66.44, +6.92
3412 +169.88, +164.44, -83.90, +83.64, -69.48, +0.75
3413 -141.57, -134.33, +66.44, -69.48, +61.64, -5.48
3414 -1.56, -7.35, +6.92, +0.75, -5.48, +10.92
3415mul = matmul(mat, inv)
3416mul
3417 +1.00, -0.00, +0.00, -0.00, -0.00, +0.00
3418 -0.00, +1.00, -0.00, +0.00, +0.00, -0.00
3419 +0.00, -0.00, +1.00, +0.00, -0.00, +0.00
3420 +0.00, +0.00, -0.00, +1.00, -0.00, +0.00
3421 -0.00, -0.00, +0.00, -0.00, +1.00, +0.00
3422 -0.00, +0.00, -0.00, -0.00, +0.00, +1.00
3423
3424
3425ndim = getUnifRand(1_IK, 6_IK)
3426ndim ! matrix rank
3427+5
3428mat = getCovRand(mold = 1._TKG, ndim = ndim)
3429mat
3430 +1.00, +0.56, -0.09, -0.93, +0.62
3431 +0.56, +1.00, -0.44, -0.28, +0.66
3432 -0.09, -0.44, +1.00, +0.12, -0.29
3433 -0.93, -0.28, +0.12, +1.00, -0.55
3434 +0.62, +0.66, -0.29, -0.55, +1.00
3435chol = getMatChol(mat, subset = uppDia)
3436chol
3437 +1.00, +0.56, -0.09, -0.93, +0.62
3438 +0.00, +0.83, -0.47, +0.29, +0.38
3439 +0.00, +0.00, +0.88, +0.19, -0.06
3440 +0.00, +0.00, +0.00, +0.14, -0.54
3441 +0.00, +0.00, +0.00, +0.00, +0.43
3442call setResized(inv, shape(mat, IK))
3443
3444inv = 0
3445call setMatInv(inv, chol, auxil = choUpp, subset = uppDia)
3446inv
3447 +160.43, -77.18, -30.19, +143.29, +21.97
3448 +0.00, +39.16, +15.07, -69.16, -11.87
3449 +0.00, +0.00, +6.92, -26.97, -4.14
3450 +0.00, +0.00, +0.00, +129.44, +20.58
3451 +0.00, +0.00, +0.00, +0.00, +5.38
3452call setMatCopy(inv(2:,1:), rdpack, inv(1:,2:), rdpack, uppDia, transHerm) ! symmetrize `inv` for multiplication.
3453inv
3454 +160.43, -77.18, -30.19, +143.29, +21.97
3455 -77.18, +39.16, +15.07, -69.16, -11.87
3456 -30.19, +15.07, +6.92, -26.97, -4.14
3457 +143.29, -69.16, -26.97, +129.44, +20.58
3458 +21.97, -11.87, -4.14, +20.58, +5.38
3459mul = matmul(mat, inv)
3460mul
3461 +1.00, +0.00, +0.00, -0.00, +0.00
3462 +0.00, +1.00, -0.00, +0.00, +0.00
3463 +0.00, -0.00, +1.00, +0.00, +0.00
3464 -0.00, -0.00, -0.00, +1.00, -0.00
3465 +0.00, +0.00, +0.00, -0.00, +1.00
3466
3467inv = 0
3468call setMatInv(inv, chol, auxil = choUpp, subset = lowDia)
3469inv
3470 +160.43, +0.00, +0.00, +0.00, +0.00
3471 -77.18, +39.16, +0.00, +0.00, +0.00
3472 -30.19, +15.07, +6.92, +0.00, +0.00
3473 +143.29, -69.16, -26.97, +129.44, +0.00
3474 +21.97, -11.87, -4.14, +20.58, +5.38
3475call setMatCopy(inv(1:,2:), rdpack, inv(2:,1:), rdpack, lowDia, transHerm) ! symmetrize `inv` for multiplication.
3476inv
3477 +160.43, -77.18, -30.19, +143.29, +21.97
3478 -77.18, +39.16, +15.07, -69.16, -11.87
3479 -30.19, +15.07, +6.92, -26.97, -4.14
3480 +143.29, -69.16, -26.97, +129.44, +20.58
3481 +21.97, -11.87, -4.14, +20.58, +5.38
3482mul = matmul(mat, inv)
3483mul
3484 +1.00, +0.00, +0.00, -0.00, +0.00
3485 +0.00, +1.00, -0.00, +0.00, +0.00
3486 +0.00, -0.00, +1.00, +0.00, +0.00
3487 -0.00, -0.00, -0.00, +1.00, -0.00
3488 +0.00, +0.00, +0.00, -0.00, +1.00
3489
3490
3491ndim = getUnifRand(1_IK, 6_IK)
3492ndim ! matrix rank
3493+5
3494mat = getCovRand(mold = 1._TKG, ndim = ndim)
3495mat
3496 +1.00, -0.38, +0.09, +0.69, -0.54
3497 -0.38, +1.00, +0.65, +0.07, +0.78
3498 +0.09, +0.65, +1.00, +0.74, +0.68
3499 +0.69, +0.07, +0.74, +1.00, +0.07
3500 -0.54, +0.78, +0.68, +0.07, +1.00
3501chol = getMatChol(mat, subset = uppDia)
3502chol
3503 +1.00, -0.38, +0.09, +0.69, -0.54
3504 +0.00, +0.92, +0.74, +0.36, +0.61
3505 +0.00, +0.00, +0.66, +0.63, +0.40
3506 +0.00, +0.00, +0.00, +0.10, -0.32
3507 +0.00, +0.00, +0.00, +0.00, +0.26
3508call setResized(inv, shape(mat, IK))
3509
3510inv = 0
3511call setMatInv(inv, chol, auxil = choUpp, subset = uppDia)
3512inv
3513 +40.38, -34.40, +105.02, -102.20, -15.39
3514 +0.00, +35.81, -102.76, +96.25, +16.42
3515 +0.00, +0.00, +317.36, -296.48, -57.50
3516 +0.00, +0.00, +0.00, +280.95, +51.03
3517 +0.00, +0.00, +0.00, +0.00, +15.27
3518call setMatCopy(inv(2:,1:), rdpack, inv(1:,2:), rdpack, uppDia, transHerm) ! symmetrize `inv` for multiplication.
3519inv
3520 +40.38, -34.40, +105.02, -102.20, -15.39
3521 -34.40, +35.81, -102.76, +96.25, +16.42
3522 +105.02, -102.76, +317.36, -296.48, -57.50
3523 -102.20, +96.25, -296.48, +280.95, +51.03
3524 -15.39, +16.42, -57.50, +51.03, +15.27
3525mul = matmul(mat, inv)
3526mul
3527 +1.00, -0.00, +0.00, +0.00, -0.00
3528 +0.00, +1.00, +0.00, -0.00, -0.00
3529 +0.00, -0.00, +1.00, -0.00, -0.00
3530 +0.00, -0.00, +0.00, +1.00, -0.00
3531 +0.00, -0.00, +0.00, -0.00, +1.00
3532
3533inv = 0
3534call setMatInv(inv, chol, auxil = choUpp, subset = lowDia)
3535inv
3536 +40.38, +0.00, +0.00, +0.00, +0.00
3537 -34.40, +35.81, +0.00, +0.00, +0.00
3538 +105.02, -102.76, +317.36, +0.00, +0.00
3539 -102.20, +96.25, -296.48, +280.95, +0.00
3540 -15.39, +16.42, -57.50, +51.03, +15.27
3541call setMatCopy(inv(1:,2:), rdpack, inv(2:,1:), rdpack, lowDia, transHerm) ! symmetrize `inv` for multiplication.
3542inv
3543 +40.38, -34.40, +105.02, -102.20, -15.39
3544 -34.40, +35.81, -102.76, +96.25, +16.42
3545 +105.02, -102.76, +317.36, -296.48, -57.50
3546 -102.20, +96.25, -296.48, +280.95, +51.03
3547 -15.39, +16.42, -57.50, +51.03, +15.27
3548mul = matmul(mat, inv)
3549mul
3550 +1.00, -0.00, +0.00, +0.00, -0.00
3551 +0.00, +1.00, +0.00, -0.00, -0.00
3552 +0.00, -0.00, +1.00, -0.00, -0.00
3553 +0.00, -0.00, +0.00, +1.00, -0.00
3554 +0.00, -0.00, +0.00, -0.00, +1.00
3555
3556
3557ndim = getUnifRand(1_IK, 6_IK)
3558ndim ! matrix rank
3559+2
3560mat = getCovRand(mold = 1._TKG, ndim = ndim)
3561mat
3562 +1.00, +0.03
3563 +0.03, +1.00
3564chol = getMatChol(mat, subset = uppDia)
3565chol
3566 +1.00, +0.03
3567 +0.00, +1.00
3568call setResized(inv, shape(mat, IK))
3569
3570inv = 0
3571call setMatInv(inv, chol, auxil = choUpp, subset = uppDia)
3572inv
3573 +1.00, -0.03
3574 +0.00, +1.00
3575call setMatCopy(inv(2:,1:), rdpack, inv(1:,2:), rdpack, uppDia, transHerm) ! symmetrize `inv` for multiplication.
3576inv
3577 +1.00, -0.03
3578 -0.03, +1.00
3579mul = matmul(mat, inv)
3580mul
3581 +1.00, +0.00
3582 -0.00, +1.00
3583
3584inv = 0
3585call setMatInv(inv, chol, auxil = choUpp, subset = lowDia)
3586inv
3587 +1.00, +0.00
3588 -0.03, +1.00
3589call setMatCopy(inv(1:,2:), rdpack, inv(2:,1:), rdpack, lowDia, transHerm) ! symmetrize `inv` for multiplication.
3590inv
3591 +1.00, -0.03
3592 -0.03, +1.00
3593mul = matmul(mat, inv)
3594mul
3595 +1.00, +0.00
3596 -0.00, +1.00
3597
3598
3599ndim = getUnifRand(1_IK, 6_IK)
3600ndim ! matrix rank
3601+5
3602mat = getCovRand(mold = 1._TKG, ndim = ndim)
3603mat
3604 +1.00, -0.53, -0.77, -0.56, +0.59
3605 -0.53, +1.00, +0.45, -0.26, -0.05
3606 -0.77, +0.45, +1.00, +0.09, -0.63
3607 -0.56, -0.26, +0.09, +1.00, -0.33
3608 +0.59, -0.05, -0.63, -0.33, +1.00
3609chol = getMatChol(mat, subset = uppDia)
3610chol
3611 +1.00, -0.53, -0.77, -0.56, +0.59
3612 +0.00, +0.85, +0.05, -0.66, +0.31
3613 +0.00, +0.00, +0.63, -0.49, -0.30
3614 +0.00, +0.00, +0.00, +0.11, +0.53
3615 +0.00, +0.00, +0.00, +0.00, +0.44
3616call setResized(inv, shape(mat, IK))
3617
3618inv = 0
3619call setMatInv(inv, chol, auxil = choUpp, subset = uppDia)
3620inv
3621 +559.21, +272.38, +250.97, +346.91, -42.39
3622 +0.00, +134.18, +121.26, +169.31, -21.08
3623 +0.00, +0.00, +114.98, +155.69, -17.59
3624 +0.00, +0.00, +0.00, +216.43, -25.88
3625 +0.00, +0.00, +0.00, +0.00, +5.23
3626call setMatCopy(inv(2:,1:), rdpack, inv(1:,2:), rdpack, uppDia, transHerm) ! symmetrize `inv` for multiplication.
3627inv
3628 +559.21, +272.38, +250.97, +346.91, -42.39
3629 +272.38, +134.18, +121.26, +169.31, -21.08
3630 +250.97, +121.26, +114.98, +155.69, -17.59
3631 +346.91, +169.31, +155.69, +216.43, -25.88
3632 -42.39, -21.08, -17.59, -25.88, +5.23
3633mul = matmul(mat, inv)
3634mul
3635 +1.00, +0.00, +0.00, +0.00, -0.00
3636 -0.00, +1.00, -0.00, -0.00, -0.00
3637 -0.00, -0.00, +1.00, -0.00, -0.00
3638 -0.00, +0.00, -0.00, +1.00, -0.00
3639 +0.00, +0.00, +0.00, +0.00, +1.00
3640
3641inv = 0
3642call setMatInv(inv, chol, auxil = choUpp, subset = lowDia)
3643inv
3644 +559.21, +0.00, +0.00, +0.00, +0.00
3645 +272.38, +134.18, +0.00, +0.00, +0.00
3646 +250.97, +121.26, +114.98, +0.00, +0.00
3647 +346.91, +169.31, +155.69, +216.43, +0.00
3648 -42.39, -21.08, -17.59, -25.88, +5.23
3649call setMatCopy(inv(1:,2:), rdpack, inv(2:,1:), rdpack, lowDia, transHerm) ! symmetrize `inv` for multiplication.
3650inv
3651 +559.21, +272.38, +250.97, +346.91, -42.39
3652 +272.38, +134.18, +121.26, +169.31, -21.08
3653 +250.97, +121.26, +114.98, +155.69, -17.59
3654 +346.91, +169.31, +155.69, +216.43, -25.88
3655 -42.39, -21.08, -17.59, -25.88, +5.23
3656mul = matmul(mat, inv)
3657mul
3658 +1.00, +0.00, +0.00, +0.00, -0.00
3659 -0.00, +1.00, -0.00, -0.00, -0.00
3660 -0.00, -0.00, +1.00, -0.00, -0.00
3661 -0.00, +0.00, -0.00, +1.00, -0.00
3662 +0.00, +0.00, +0.00, +0.00, +1.00
3663
3664
3665ndim = getUnifRand(1_IK, 6_IK)
3666ndim ! matrix rank
3667+4
3668mat = getCovRand(mold = 1._TKG, ndim = ndim)
3669mat
3670 +1.00, -0.98, -0.65, -0.23
3671 -0.98, +1.00, +0.47, +0.06
3672 -0.65, +0.47, +1.00, +0.80
3673 -0.23, +0.06, +0.80, +1.00
3674chol = getMatChol(mat, subset = uppDia)
3675chol
3676 +1.00, -0.98, -0.65, -0.23
3677 +0.00, +0.22, -0.74, -0.75
3678 +0.00, +0.00, +0.19, +0.54
3679 +0.00, +0.00, +0.00, +0.31
3680call setResized(inv, shape(mat, IK))
3681
3682inv = 0
3683call setMatInv(inv, chol, auxil = choUpp, subset = uppDia)
3684inv
3685 +1016.49, +846.63, +319.51, -77.20
3686 +0.00, +707.21, +263.65, -62.43
3687 +0.00, +0.00, +106.24, -28.80
3688 +0.00, +0.00, +0.00, +10.40
3689call setMatCopy(inv(2:,1:), rdpack, inv(1:,2:), rdpack, uppDia, transHerm) ! symmetrize `inv` for multiplication.
3690inv
3691 +1016.49, +846.63, +319.51, -77.20
3692 +846.63, +707.21, +263.65, -62.43
3693 +319.51, +263.65, +106.24, -28.80
3694 -77.20, -62.43, -28.80, +10.40
3695mul = matmul(mat, inv)
3696mul
3697 +1.00, +0.00, +0.00, -0.00
3698 -0.00, +1.00, -0.00, +0.00
3699 -0.00, -0.00, +1.00, +0.00
3700 -0.00, -0.00, -0.00, +1.00
3701
3702inv = 0
3703call setMatInv(inv, chol, auxil = choUpp, subset = lowDia)
3704inv
3705 +1016.49, +0.00, +0.00, +0.00
3706 +846.63, +707.21, +0.00, +0.00
3707 +319.51, +263.65, +106.24, +0.00
3708 -77.20, -62.43, -28.80, +10.40
3709call setMatCopy(inv(1:,2:), rdpack, inv(2:,1:), rdpack, lowDia, transHerm) ! symmetrize `inv` for multiplication.
3710inv
3711 +1016.49, +846.63, +319.51, -77.20
3712 +846.63, +707.21, +263.65, -62.43
3713 +319.51, +263.65, +106.24, -28.80
3714 -77.20, -62.43, -28.80, +10.40
3715mul = matmul(mat, inv)
3716mul
3717 +1.00, +0.00, +0.00, -0.00
3718 -0.00, +1.00, -0.00, +0.00
3719 -0.00, -0.00, +1.00, +0.00
3720 -0.00, -0.00, -0.00, +1.00
3721
3722
3723ndim = getUnifRand(1_IK, 6_IK)
3724ndim ! matrix rank
3725+1
3726mat = getCovRand(mold = 1._TKG, ndim = ndim)
3727mat
3728 +1.00
3729chol = getMatChol(mat, subset = uppDia)
3730chol
3731 +1.00
3732call setResized(inv, shape(mat, IK))
3733
3734inv = 0
3735call setMatInv(inv, chol, auxil = choUpp, subset = uppDia)
3736inv
3737 +1.00
3738call setMatCopy(inv(2:,1:), rdpack, inv(1:,2:), rdpack, uppDia, transHerm) ! symmetrize `inv` for multiplication.
3739inv
3740 +1.00
3741mul = matmul(mat, inv)
3742mul
3743 +1.00
3744
3745inv = 0
3746call setMatInv(inv, chol, auxil = choUpp, subset = lowDia)
3747inv
3748 +1.00
3749call setMatCopy(inv(1:,2:), rdpack, inv(2:,1:), rdpack, lowDia, transHerm) ! symmetrize `inv` for multiplication.
3750inv
3751 +1.00
3752mul = matmul(mat, inv)
3753mul
3754 +1.00
3755
3756
3757ndim = getUnifRand(1_IK, 6_IK)
3758ndim ! matrix rank
3759+1
3760mat = getCovRand(mold = 1._TKG, ndim = ndim)
3761mat
3762 +1.00
3763chol = getMatChol(mat, subset = uppDia)
3764chol
3765 +1.00
3766call setResized(inv, shape(mat, IK))
3767
3768inv = 0
3769call setMatInv(inv, chol, auxil = choUpp, subset = uppDia)
3770inv
3771 +1.00
3772call setMatCopy(inv(2:,1:), rdpack, inv(1:,2:), rdpack, uppDia, transHerm) ! symmetrize `inv` for multiplication.
3773inv
3774 +1.00
3775mul = matmul(mat, inv)
3776mul
3777 +1.00
3778
3779inv = 0
3780call setMatInv(inv, chol, auxil = choUpp, subset = lowDia)
3781inv
3782 +1.00
3783call setMatCopy(inv(1:,2:), rdpack, inv(2:,1:), rdpack, lowDia, transHerm) ! symmetrize `inv` for multiplication.
3784inv
3785 +1.00
3786mul = matmul(mat, inv)
3787mul
3788 +1.00
3789
3790
3791!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3792! Compute a subset of the inverse of a positive-definite complex matrix by passing its Cholesky factorization.
3793!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3794
3795
3796mat
3797( +9.00, +0.00), ( +3.00, +3.00), ( +3.00, -3.00)
3798( +3.00, -3.00), ( +18.00, +0.00), ( +8.00, -6.00)
3799( +3.00, +3.00), ( +8.00, +6.00), ( +43.00, +0.00)
3800chol = getMatChol(mat, subset = lowDia)
3801chol
3802( +3.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
3803( +1.00, -1.00), ( +4.00, +0.00), ( +0.00, +0.00)
3804( +1.00, +1.00), ( +2.00, +1.00), ( +6.00, +0.00)
3805call setResized(inv, shape(mat, IK))
3806inv = 0
3807call setMatInv(inv, chol, auxil = choLow, subset = uppDia)
3808inv
3809( +0.13, +0.00), ( -0.02, -0.03), ( -0.00, +0.01)
3810( +0.00, +0.00), ( +0.07, +0.00), ( -0.01, +0.01)
3811( +0.00, +0.00), ( +0.00, +0.00), ( +0.03, +0.00)
3812call setMatCopy(inv(2:,1:), rdpack, inv(1:,2:), rdpack, uppDia, transHerm) ! symmetrize `inv` for multiplication.
3813inv
3814( +0.13, +0.00), ( -0.02, -0.03), ( -0.00, +0.01)
3815( -0.02, +0.03), ( +0.07, +0.00), ( -0.01, +0.01)
3816( -0.00, -0.01), ( -0.01, -0.01), ( +0.03, +0.00)
3817mul = matmul(mat, inv)
3818mul
3819( +1.00, +0.00), ( -0.00, -0.00), ( +0.00, -0.00)
3820( +0.00, -0.00), ( +1.00, +0.00), ( -0.00, +0.00)
3821( +0.00, +0.00), ( -0.00, -0.00), ( +1.00, -0.00)
3822
3823inv = 0
3824call setMatInv(inv, chol, auxil = choLow, subset = lowDia)
3825inv
3826( +0.13, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
3827( -0.02, +0.03), ( +0.07, +0.00), ( +0.00, +0.00)
3828( -0.00, -0.01), ( -0.01, -0.01), ( +0.03, +0.00)
3829call setMatCopy(inv(1:,2:), rdpack, inv(2:,1:), rdpack, lowDia, transHerm) ! symmetrize `inv` for multiplication.
3830inv
3831( +0.13, +0.00), ( -0.02, -0.03), ( -0.00, +0.01)
3832( -0.02, +0.03), ( +0.07, +0.00), ( -0.01, +0.01)
3833( -0.00, -0.01), ( -0.01, -0.01), ( +0.03, +0.00)
3834mul = matmul(mat, inv)
3835mul
3836( +1.00, +0.00), ( -0.00, -0.00), ( +0.00, -0.00)
3837( +0.00, -0.00), ( +1.00, +0.00), ( -0.00, +0.00)
3838( +0.00, +0.00), ( -0.00, -0.00), ( +1.00, -0.00)
3839
3840
3841mat
3842( +9.00, +0.00), ( +3.00, +3.00), ( +3.00, -3.00)
3843( +3.00, -3.00), ( +18.00, +0.00), ( +8.00, -6.00)
3844( +3.00, +3.00), ( +8.00, +6.00), ( +43.00, +0.00)
3845chol = getMatChol(mat, subset = uppDia)
3846chol
3847( +3.00, +0.00), ( +1.00, +1.00), ( +1.00, -1.00)
3848( +0.00, +0.00), ( +4.00, +0.00), ( +2.00, -1.00)
3849( +0.00, +0.00), ( +0.00, +0.00), ( +6.00, +0.00)
3850call setResized(inv, shape(mat, IK))
3851inv = 0
3852call setMatInv(inv, chol, auxil = choUpp, subset = lowDia)
3853inv
3854( +0.13, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
3855( -0.02, +0.03), ( +0.07, +0.00), ( +0.00, +0.00)
3856( -0.00, -0.01), ( -0.01, -0.01), ( +0.03, +0.00)
3857call setMatCopy(inv(1:,2:), rdpack, inv(2:,1:), rdpack, lowDia, transHerm) ! symmetrize `inv` for multiplication.
3858inv
3859( +0.13, +0.00), ( -0.02, -0.03), ( -0.00, +0.01)
3860( -0.02, +0.03), ( +0.07, +0.00), ( -0.01, +0.01)
3861( -0.00, -0.01), ( -0.01, -0.01), ( +0.03, +0.00)
3862mul = matmul(mat, inv)
3863mul
3864( +1.00, +0.00), ( -0.00, -0.00), ( +0.00, -0.00)
3865( +0.00, -0.00), ( +1.00, +0.00), ( -0.00, +0.00)
3866( +0.00, +0.00), ( -0.00, -0.00), ( +1.00, -0.00)
3867
3868inv = 0
3869call setMatInv(inv, chol, auxil = choUpp, subset = uppDia)
3870inv
3871( +0.13, +0.00), ( -0.02, -0.03), ( -0.00, +0.01)
3872( +0.00, +0.00), ( +0.07, +0.00), ( -0.01, +0.01)
3873( +0.00, +0.00), ( +0.00, +0.00), ( +0.03, +0.00)
3874call setMatCopy(inv(2:,1:), rdpack, inv(1:,2:), rdpack, uppDia, transHerm) ! symmetrize `inv` for multiplication.
3875inv
3876( +0.13, +0.00), ( -0.02, -0.03), ( -0.00, +0.01)
3877( -0.02, +0.03), ( +0.07, +0.00), ( -0.01, +0.01)
3878( -0.00, -0.01), ( -0.01, -0.01), ( +0.03, +0.00)
3879mul = matmul(mat, inv)
3880mul
3881( +1.00, +0.00), ( -0.00, -0.00), ( +0.00, -0.00)
3882( +0.00, -0.00), ( +1.00, +0.00), ( -0.00, +0.00)
3883( +0.00, +0.00), ( -0.00, -0.00), ( +1.00, -0.00)
3884
3885
3886ndim = getUnifRand(1_IK, 6_IK)
3887ndim ! matrix rank
3888+3
3889mat
3890( +2.47, +0.00), ( +1.61, -0.29), ( +1.61, +1.28)
3891( +1.61, +0.29), ( +2.08, +0.00), ( +2.16, +0.66)
3892( +1.61, -1.28), ( +2.16, -0.66), ( +5.00, +0.00)
3893chol = getMatChol(mat, subset = uppDia)
3894chol
3895( +1.57, +0.00), ( +1.02, -0.19), ( +1.03, +0.81)
3896( +0.00, +0.00), ( +1.00, +0.00), ( +1.26, -0.36)
3897( +0.00, +0.00), ( +0.00, +0.00), ( +1.26, +0.00)
3898call setResized(inv, shape(mat, IK))
3899inv = 0
3900call setMatInv(inv, chol, auxil = choUpp, subset = lowDia)
3901inv
3902( +1.36, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
3903( -0.95, -0.80), ( +2.07, +0.00), ( +0.00, +0.00)
3904( +0.08, +0.57), ( -0.79, -0.23), ( +0.63, +0.00)
3905call setMatCopy(inv(1:,2:), rdpack, inv(2:,1:), rdpack, lowDia, transHerm) ! symmetrize `inv` for multiplication.
3906inv
3907( +1.36, +0.00), ( -0.95, +0.80), ( +0.08, -0.57)
3908( -0.95, -0.80), ( +2.07, +0.00), ( -0.79, +0.23)
3909( +0.08, +0.57), ( -0.79, -0.23), ( +0.63, +0.00)
3910mul = matmul(mat, inv)
3911mul
3912( +1.00, -0.00), ( +0.00, -0.00), ( -0.00, +0.00)
3913( -0.00, +0.00), ( +1.00, +0.00), ( -0.00, +0.00)
3914( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00)
3915
3916inv = 0
3917call setMatInv(inv, chol, auxil = choUpp, subset = uppDia)
3918inv
3919( +1.36, +0.00), ( -0.95, +0.80), ( +0.08, -0.57)
3920( +0.00, +0.00), ( +2.07, +0.00), ( -0.79, +0.23)
3921( +0.00, +0.00), ( +0.00, +0.00), ( +0.63, +0.00)
3922call setMatCopy(inv(2:,1:), rdpack, inv(1:,2:), rdpack, uppDia, transHerm) ! symmetrize `inv` for multiplication.
3923inv
3924( +1.36, +0.00), ( -0.95, +0.80), ( +0.08, -0.57)
3925( -0.95, -0.80), ( +2.07, +0.00), ( -0.79, +0.23)
3926( +0.08, +0.57), ( -0.79, -0.23), ( +0.63, +0.00)
3927mul = matmul(mat, inv)
3928mul
3929( +1.00, -0.00), ( +0.00, -0.00), ( -0.00, +0.00)
3930( -0.00, +0.00), ( +1.00, +0.00), ( -0.00, +0.00)
3931( +0.00, +0.00), ( +0.00, +0.00), ( +1.00, +0.00)
3932
3933
3934ndim = getUnifRand(1_IK, 6_IK)
3935ndim ! matrix rank
3936+1
3937mat
3938( +2.92, +0.00)
3939chol = getMatChol(mat, subset = uppDia)
3940chol
3941( +1.71, +0.00)
3942call setResized(inv, shape(mat, IK))
3943inv = 0
3944call setMatInv(inv, chol, auxil = choUpp, subset = lowDia)
3945inv
3946( +0.34, +0.00)
3947call setMatCopy(inv(1:,2:), rdpack, inv(2:,1:), rdpack, lowDia, transHerm) ! symmetrize `inv` for multiplication.
3948inv
3949( +0.34, +0.00)
3950mul = matmul(mat, inv)
3951mul
3952( +1.00, +0.00)
3953
3954inv = 0
3955call setMatInv(inv, chol, auxil = choUpp, subset = uppDia)
3956inv
3957( +0.34, +0.00)
3958call setMatCopy(inv(2:,1:), rdpack, inv(1:,2:), rdpack, uppDia, transHerm) ! symmetrize `inv` for multiplication.
3959inv
3960( +0.34, +0.00)
3961mul = matmul(mat, inv)
3962mul
3963( +1.00, +0.00)
3964
3965
3966ndim = getUnifRand(1_IK, 6_IK)
3967ndim ! matrix rank
3968+5
3969mat
3970( +3.60, +0.00), ( +3.50, -0.61), ( +3.79, +0.48), ( +2.18, -1.18), ( +3.39, -1.23)
3971( +3.50, +0.61), ( +4.79, +0.00), ( +5.45, +0.11), ( +3.80, -1.60), ( +5.72, -0.44)
3972( +3.79, -0.48), ( +5.45, -0.11), ( +8.64, +0.00), ( +6.79, -1.28), ( +8.09, +0.79)
3973( +2.18, +1.18), ( +3.80, +1.60), ( +6.79, +1.28), ( +9.30, +0.00), ( +10.38, +1.60)
3974( +3.39, +1.23), ( +5.72, +0.44), ( +8.09, -0.79), ( +10.38, -1.60), ( +16.85, +0.00)
3975chol = getMatChol(mat, subset = uppDia)
3976chol
3977( +1.90, +0.00), ( +1.85, -0.32), ( +2.00, +0.25), ( +1.15, -0.62), ( +1.79, -0.65)
3978( +0.00, +0.00), ( +1.13, +0.00), ( +1.63, -0.88), ( +1.31, -0.73), ( +1.95, +0.16)
3979( +0.00, +0.00), ( +0.00, +0.00), ( +1.08, +0.00), ( +1.74, +0.25), ( +1.53, +0.51)
3980( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.50, +0.00), ( +1.78, -0.59)
3981( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.80, +0.00)
3982call setResized(inv, shape(mat, IK))
3983inv = 0
3984call setMatInv(inv, chol, auxil = choUpp, subset = lowDia)
3985inv
3986( +2.98, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
3987( -1.97, -2.14), ( +4.15, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
3988( +0.11, +1.99), ( -2.39, -0.86), ( +2.36, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
3989( +0.05, -0.58), ( +0.92, +0.13), ( -1.03, -0.13), ( +0.92, +0.00), ( +0.00, +0.00)
3990( -0.11, -0.03), ( -0.25, -0.09), ( +0.18, +0.25), ( -0.36, -0.12), ( +0.31, +0.00)
3991call setMatCopy(inv(1:,2:), rdpack, inv(2:,1:), rdpack, lowDia, transHerm) ! symmetrize `inv` for multiplication.
3992inv
3993( +2.98, +0.00), ( -1.97, +2.14), ( +0.11, -1.99), ( +0.05, +0.58), ( -0.11, +0.03)
3994( -1.97, -2.14), ( +4.15, +0.00), ( -2.39, +0.86), ( +0.92, -0.13), ( -0.25, +0.09)
3995( +0.11, +1.99), ( -2.39, -0.86), ( +2.36, +0.00), ( -1.03, +0.13), ( +0.18, -0.25)
3996( +0.05, -0.58), ( +0.92, +0.13), ( -1.03, -0.13), ( +0.92, +0.00), ( -0.36, +0.12)
3997( -0.11, -0.03), ( -0.25, -0.09), ( +0.18, +0.25), ( -0.36, -0.12), ( +0.31, +0.00)
3998mul = matmul(mat, inv)
3999mul
4000( +1.00, +0.00), ( -0.00, +0.00), ( -0.00, -0.00), ( +0.00, +0.00), ( +0.00, +0.00)
4001( +0.00, +0.00), ( +1.00, +0.00), ( -0.00, -0.00), ( -0.00, +0.00), ( +0.00, -0.00)
4002( +0.00, +0.00), ( -0.00, +0.00), ( +1.00, -0.00), ( -0.00, +0.00), ( +0.00, +0.00)
4003( +0.00, +0.00), ( -0.00, +0.00), ( -0.00, -0.00), ( +1.00, +0.00), ( -0.00, +0.00)
4004( +0.00, -0.00), ( +0.00, +0.00), ( -0.00, -0.00), ( -0.00, +0.00), ( +1.00, +0.00)
4005
4006inv = 0
4007call setMatInv(inv, chol, auxil = choUpp, subset = uppDia)
4008inv
4009( +2.98, +0.00), ( -1.97, +2.14), ( +0.11, -1.99), ( +0.05, +0.58), ( -0.11, +0.03)
4010( +0.00, +0.00), ( +4.15, +0.00), ( -2.39, +0.86), ( +0.92, -0.13), ( -0.25, +0.09)
4011( +0.00, +0.00), ( +0.00, +0.00), ( +2.36, +0.00), ( -1.03, +0.13), ( +0.18, -0.25)
4012( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.92, +0.00), ( -0.36, +0.12)
4013( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.31, +0.00)
4014call setMatCopy(inv(2:,1:), rdpack, inv(1:,2:), rdpack, uppDia, transHerm) ! symmetrize `inv` for multiplication.
4015inv
4016( +2.98, +0.00), ( -1.97, +2.14), ( +0.11, -1.99), ( +0.05, +0.58), ( -0.11, +0.03)
4017( -1.97, -2.14), ( +4.15, +0.00), ( -2.39, +0.86), ( +0.92, -0.13), ( -0.25, +0.09)
4018( +0.11, +1.99), ( -2.39, -0.86), ( +2.36, +0.00), ( -1.03, +0.13), ( +0.18, -0.25)
4019( +0.05, -0.58), ( +0.92, +0.13), ( -1.03, -0.13), ( +0.92, +0.00), ( -0.36, +0.12)
4020( -0.11, -0.03), ( -0.25, -0.09), ( +0.18, +0.25), ( -0.36, -0.12), ( +0.31, +0.00)
4021mul = matmul(mat, inv)
4022mul
4023( +1.00, +0.00), ( -0.00, +0.00), ( -0.00, -0.00), ( +0.00, +0.00), ( +0.00, +0.00)
4024( +0.00, +0.00), ( +1.00, +0.00), ( -0.00, -0.00), ( -0.00, +0.00), ( +0.00, -0.00)
4025( +0.00, +0.00), ( -0.00, +0.00), ( +1.00, -0.00), ( -0.00, +0.00), ( +0.00, +0.00)
4026( +0.00, +0.00), ( -0.00, +0.00), ( -0.00, -0.00), ( +1.00, +0.00), ( -0.00, +0.00)
4027( +0.00, -0.00), ( +0.00, +0.00), ( -0.00, -0.00), ( -0.00, +0.00), ( +1.00, +0.00)
4028
4029
4030ndim = getUnifRand(1_IK, 6_IK)
4031ndim ! matrix rank
4032+5
4033mat
4034( +1.91, +0.00), ( +1.54, +0.80), ( +2.75, +0.85), ( +1.54, +0.30), ( +2.43, +0.02)
4035( +1.54, -0.80), ( +4.22, +0.00), ( +5.33, +0.06), ( +3.10, -1.96), ( +3.70, -2.62)
4036( +2.75, -0.85), ( +5.33, -0.06), ( +8.75, +0.00), ( +5.10, -1.54), ( +6.55, -4.15)
4037( +1.54, -0.30), ( +3.10, +1.96), ( +5.10, +1.54), ( +7.54, +0.00), ( +8.01, -2.69)
4038( +2.43, -0.02), ( +3.70, +2.62), ( +6.55, +4.15), ( +8.01, +2.69), ( +13.93, +0.00)
4039chol = getMatChol(mat, subset = uppDia)
4040chol
4041( +1.38, +0.00), ( +1.11, +0.58), ( +1.99, +0.62), ( +1.11, +0.22), ( +1.76, +0.02)
4042( +0.00, +0.00), ( +1.63, +0.00), ( +1.70, +0.33), ( +1.07, -0.96), ( +1.07, -1.00)
4043( +0.00, +0.00), ( +0.00, +0.00), ( +1.19, +0.00), ( +1.05, +0.58), ( +1.30, -0.88)
4044( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.66, +0.00), ( +1.87, -0.36)
4045( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.62, +0.00)
4046call setResized(inv, shape(mat, IK))
4047inv = 0
4048call setMatInv(inv, chol, auxil = choUpp, subset = lowDia)
4049inv
4050( +1.59, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
4051( +0.41, +1.00), ( +2.47, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
4052( -0.91, -0.50), ( -1.57, +0.60), ( +1.53, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
4053( +0.42, -0.24), ( -0.13, -1.03), ( -0.23, +0.65), ( +0.87, +0.00), ( +0.00, +0.00)
4054( -0.21, +0.22), ( +0.06, +0.51), ( +0.00, -0.42), ( -0.43, -0.08), ( +0.38, +0.00)
4055call setMatCopy(inv(1:,2:), rdpack, inv(2:,1:), rdpack, lowDia, transHerm) ! symmetrize `inv` for multiplication.
4056inv
4057( +1.59, +0.00), ( +0.41, -1.00), ( -0.91, +0.50), ( +0.42, +0.24), ( -0.21, -0.22)
4058( +0.41, +1.00), ( +2.47, +0.00), ( -1.57, -0.60), ( -0.13, +1.03), ( +0.06, -0.51)
4059( -0.91, -0.50), ( -1.57, +0.60), ( +1.53, +0.00), ( -0.23, -0.65), ( +0.00, +0.42)
4060( +0.42, -0.24), ( -0.13, -1.03), ( -0.23, +0.65), ( +0.87, +0.00), ( -0.43, +0.08)
4061( -0.21, +0.22), ( +0.06, +0.51), ( +0.00, -0.42), ( -0.43, -0.08), ( +0.38, +0.00)
4062mul = matmul(mat, inv)
4063mul
4064( +1.00, +0.00), ( +0.00, +0.00), ( -0.00, -0.00), ( +0.00, -0.00), ( -0.00, -0.00)
4065( +0.00, +0.00), ( +1.00, -0.00), ( -0.00, +0.00), ( +0.00, -0.00), ( -0.00, +0.00)
4066( +0.00, -0.00), ( +0.00, -0.00), ( +1.00, +0.00), ( +0.00, -0.00), ( -0.00, +0.00)
4067( +0.00, +0.00), ( -0.00, -0.00), ( -0.00, -0.00), ( +1.00, +0.00), ( -0.00, +0.00)
4068( +0.00, +0.00), ( +0.00, -0.00), ( -0.00, -0.00), ( +0.00, +0.00), ( +1.00, +0.00)
4069
4070inv = 0
4071call setMatInv(inv, chol, auxil = choUpp, subset = uppDia)
4072inv
4073( +1.59, +0.00), ( +0.41, -1.00), ( -0.91, +0.50), ( +0.42, +0.24), ( -0.21, -0.22)
4074( +0.00, +0.00), ( +2.47, +0.00), ( -1.57, -0.60), ( -0.13, +1.03), ( +0.06, -0.51)
4075( +0.00, +0.00), ( +0.00, +0.00), ( +1.53, +0.00), ( -0.23, -0.65), ( +0.00, +0.42)
4076( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.87, +0.00), ( -0.43, +0.08)
4077( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.38, +0.00)
4078call setMatCopy(inv(2:,1:), rdpack, inv(1:,2:), rdpack, uppDia, transHerm) ! symmetrize `inv` for multiplication.
4079inv
4080( +1.59, +0.00), ( +0.41, -1.00), ( -0.91, +0.50), ( +0.42, +0.24), ( -0.21, -0.22)
4081( +0.41, +1.00), ( +2.47, +0.00), ( -1.57, -0.60), ( -0.13, +1.03), ( +0.06, -0.51)
4082( -0.91, -0.50), ( -1.57, +0.60), ( +1.53, +0.00), ( -0.23, -0.65), ( +0.00, +0.42)
4083( +0.42, -0.24), ( -0.13, -1.03), ( -0.23, +0.65), ( +0.87, +0.00), ( -0.43, +0.08)
4084( -0.21, +0.22), ( +0.06, +0.51), ( +0.00, -0.42), ( -0.43, -0.08), ( +0.38, +0.00)
4085mul = matmul(mat, inv)
4086mul
4087( +1.00, +0.00), ( +0.00, +0.00), ( -0.00, -0.00), ( +0.00, -0.00), ( -0.00, -0.00)
4088( +0.00, +0.00), ( +1.00, -0.00), ( -0.00, +0.00), ( +0.00, -0.00), ( -0.00, +0.00)
4089( +0.00, -0.00), ( +0.00, -0.00), ( +1.00, +0.00), ( +0.00, -0.00), ( -0.00, +0.00)
4090( +0.00, +0.00), ( -0.00, -0.00), ( -0.00, -0.00), ( +1.00, +0.00), ( -0.00, +0.00)
4091( +0.00, +0.00), ( +0.00, -0.00), ( -0.00, -0.00), ( +0.00, +0.00), ( +1.00, +0.00)
4092
4093
4094ndim = getUnifRand(1_IK, 6_IK)
4095ndim ! matrix rank
4096+2
4097mat
4098( +3.28, +0.00), ( +2.06, +1.76)
4099( +2.06, -1.76), ( +5.32, +0.00)
4100chol = getMatChol(mat, subset = uppDia)
4101chol
4102( +1.81, +0.00), ( +1.14, +0.97)
4103( +0.00, +0.00), ( +1.75, +0.00)
4104call setResized(inv, shape(mat, IK))
4105inv = 0
4106call setMatInv(inv, chol, auxil = choUpp, subset = lowDia)
4107inv
4108( +0.53, +0.00), ( +0.00, +0.00)
4109( -0.20, +0.17), ( +0.32, +0.00)
4110call setMatCopy(inv(1:,2:), rdpack, inv(2:,1:), rdpack, lowDia, transHerm) ! symmetrize `inv` for multiplication.
4111inv
4112( +0.53, +0.00), ( -0.20, -0.17)
4113( -0.20, +0.17), ( +0.32, +0.00)
4114mul = matmul(mat, inv)
4115mul
4116( +1.00, -0.00), ( -0.00, +0.00)
4117( -0.00, +0.00), ( +1.00, +0.00)
4118
4119inv = 0
4120call setMatInv(inv, chol, auxil = choUpp, subset = uppDia)
4121inv
4122( +0.53, +0.00), ( -0.20, -0.17)
4123( +0.00, +0.00), ( +0.32, +0.00)
4124call setMatCopy(inv(2:,1:), rdpack, inv(1:,2:), rdpack, uppDia, transHerm) ! symmetrize `inv` for multiplication.
4125inv
4126( +0.53, +0.00), ( -0.20, -0.17)
4127( -0.20, +0.17), ( +0.32, +0.00)
4128mul = matmul(mat, inv)
4129mul
4130( +1.00, -0.00), ( -0.00, +0.00)
4131( -0.00, +0.00), ( +1.00, +0.00)
4132
4133
4134ndim = getUnifRand(1_IK, 6_IK)
4135ndim ! matrix rank
4136+5
4137mat
4138( +1.48, +0.00), ( +2.10, +1.03), ( +1.58, +1.17), ( +1.87, -1.12), ( +1.55, -0.26)
4139( +2.10, -1.03), ( +6.09, +0.00), ( +5.70, +1.91), ( +3.77, -2.91), ( +4.32, -0.33)
4140( +1.58, -1.17), ( +5.70, -1.91), ( +8.26, +0.00), ( +4.94, -3.69), ( +6.78, -1.95)
4141( +1.87, +1.12), ( +3.77, +2.91), ( +4.94, +3.69), ( +7.55, +0.00), ( +7.94, +0.59)
4142( +1.55, +0.26), ( +4.32, +0.33), ( +6.78, +1.95), ( +7.94, -0.59), ( +12.63, +0.00)
4143chol = getMatChol(mat, subset = uppDia)
4144chol
4145( +1.21, +0.00), ( +1.73, +0.85), ( +1.30, +0.96), ( +1.54, -0.92), ( +1.28, -0.21)
4146( +0.00, +0.00), ( +1.54, +0.00), ( +1.70, +0.88), ( +1.23, -0.01), ( +1.49, +0.73)
4147( +0.00, +0.00), ( +0.00, +0.00), ( +1.40, +0.00), ( +1.23, +0.06), ( +1.54, -0.27)
4148( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.14, +0.00), ( +1.83, -0.65)
4149( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +1.42, +0.00)
4150call setResized(inv, shape(mat, IK))
4151inv = 0
4152call setMatInv(inv, chol, auxil = choUpp, subset = lowDia)
4153inv
4154( +2.51, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
4155( -0.43, +0.68), ( +1.86, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
4156( +0.13, +0.12), ( -0.61, +0.84), ( +1.20, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
4157( +0.02, -0.89), ( +0.02, -1.17), ( -1.02, -0.06), ( +2.21, +0.00), ( +0.00, +0.00)
4158( -0.17, +0.20), ( -0.10, +0.43), ( +0.17, +0.12), ( -0.79, -0.28), ( +0.49, +0.00)
4159call setMatCopy(inv(1:,2:), rdpack, inv(2:,1:), rdpack, lowDia, transHerm) ! symmetrize `inv` for multiplication.
4160inv
4161( +2.51, +0.00), ( -0.43, -0.68), ( +0.13, -0.12), ( +0.02, +0.89), ( -0.17, -0.20)
4162( -0.43, +0.68), ( +1.86, +0.00), ( -0.61, -0.84), ( +0.02, +1.17), ( -0.10, -0.43)
4163( +0.13, +0.12), ( -0.61, +0.84), ( +1.20, +0.00), ( -1.02, +0.06), ( +0.17, -0.12)
4164( +0.02, -0.89), ( +0.02, -1.17), ( -1.02, -0.06), ( +2.21, +0.00), ( -0.79, +0.28)
4165( -0.17, +0.20), ( -0.10, +0.43), ( +0.17, +0.12), ( -0.79, -0.28), ( +0.49, +0.00)
4166mul = matmul(mat, inv)
4167mul
4168( +1.00, +0.00), ( +0.00, -0.00), ( -0.00, -0.00), ( +0.00, -0.00), ( -0.00, +0.00)
4169( +0.00, -0.00), ( +1.00, -0.00), ( -0.00, +0.00), ( +0.00, -0.00), ( -0.00, +0.00)
4170( +0.00, -0.00), ( +0.00, -0.00), ( +1.00, -0.00), ( +0.00, -0.00), ( -0.00, +0.00)
4171( +0.00, -0.00), ( +0.00, -0.00), ( -0.00, -0.00), ( +1.00, +0.00), ( -0.00, -0.00)
4172( +0.00, -0.00), ( -0.00, -0.00), ( +0.00, +0.00), ( +0.00, -0.00), ( +1.00, +0.00)
4173
4174inv = 0
4175call setMatInv(inv, chol, auxil = choUpp, subset = uppDia)
4176inv
4177( +2.51, +0.00), ( -0.43, -0.68), ( +0.13, -0.12), ( +0.02, +0.89), ( -0.17, -0.20)
4178( +0.00, +0.00), ( +1.86, +0.00), ( -0.61, -0.84), ( +0.02, +1.17), ( -0.10, -0.43)
4179( +0.00, +0.00), ( +0.00, +0.00), ( +1.20, +0.00), ( -1.02, +0.06), ( +0.17, -0.12)
4180( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +2.21, +0.00), ( -0.79, +0.28)
4181( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.00, +0.00), ( +0.49, +0.00)
4182call setMatCopy(inv(2:,1:), rdpack, inv(1:,2:), rdpack, uppDia, transHerm) ! symmetrize `inv` for multiplication.
4183inv
4184( +2.51, +0.00), ( -0.43, -0.68), ( +0.13, -0.12), ( +0.02, +0.89), ( -0.17, -0.20)
4185( -0.43, +0.68), ( +1.86, +0.00), ( -0.61, -0.84), ( +0.02, +1.17), ( -0.10, -0.43)
4186( +0.13, +0.12), ( -0.61, +0.84), ( +1.20, +0.00), ( -1.02, +0.06), ( +0.17, -0.12)
4187( +0.02, -0.89), ( +0.02, -1.17), ( -1.02, -0.06), ( +2.21, +0.00), ( -0.79, +0.28)
4188( -0.17, +0.20), ( -0.10, +0.43), ( +0.17, +0.12), ( -0.79, -0.28), ( +0.49, +0.00)
4189mul = matmul(mat, inv)
4190mul
4191( +1.00, +0.00), ( +0.00, -0.00), ( -0.00, -0.00), ( +0.00, -0.00), ( -0.00, +0.00)
4192( +0.00, -0.00), ( +1.00, -0.00), ( -0.00, +0.00), ( +0.00, -0.00), ( -0.00, +0.00)
4193( +0.00, -0.00), ( +0.00, -0.00), ( +1.00, -0.00), ( +0.00, -0.00), ( -0.00, +0.00)
4194( +0.00, -0.00), ( +0.00, -0.00), ( -0.00, -0.00), ( +1.00, +0.00), ( -0.00, -0.00)
4195( +0.00, -0.00), ( -0.00, -0.00), ( +0.00, +0.00), ( +0.00, -0.00), ( +1.00, +0.00)
4196
4197
4198ndim = getUnifRand(1_IK, 6_IK)
4199ndim ! matrix rank
4200+1
4201mat
4202( +2.19, +0.00)
4203chol = getMatChol(mat, subset = uppDia)
4204chol
4205( +1.48, +0.00)
4206call setResized(inv, shape(mat, IK))
4207inv = 0
4208call setMatInv(inv, chol, auxil = choUpp, subset = lowDia)
4209inv
4210( +0.46, +0.00)
4211call setMatCopy(inv(1:,2:), rdpack, inv(2:,1:), rdpack, lowDia, transHerm) ! symmetrize `inv` for multiplication.
4212inv
4213( +0.46, +0.00)
4214mul = matmul(mat, inv)
4215mul
4216( +1.00, +0.00)
4217
4218inv = 0
4219call setMatInv(inv, chol, auxil = choUpp, subset = uppDia)
4220inv
4221( +0.46, +0.00)
4222call setMatCopy(inv(2:,1:), rdpack, inv(1:,2:), rdpack, uppDia, transHerm) ! symmetrize `inv` for multiplication.
4223inv
4224( +0.46, +0.00)
4225mul = matmul(mat, inv)
4226mul
4227( +1.00, +0.00)
4228
4229
4230ndim = getUnifRand(1_IK, 6_IK)
4231ndim ! matrix rank
4232+3
4233mat
4234( +1.13, +0.00), ( +1.40, +0.13), ( +1.92, +0.82)
4235( +1.40, -0.13), ( +3.42, +0.00), ( +3.83, +0.29)
4236( +1.92, -0.82), ( +3.83, -0.29), ( +6.53, +0.00)
4237chol = getMatChol(mat, subset = uppDia)
4238chol
4239( +1.06, +0.00), ( +1.31, +0.13), ( +1.81, +0.77)
4240( +0.00, +0.00), ( +1.29, +0.00), ( +1.05, -0.39)
4241( +0.00, +0.00), ( +0.00, +0.00), ( +1.19, +0.00)
4242call setResized(inv, shape(mat, IK))
4243inv = 0
4244call setMatInv(inv, chol, auxil = choUpp, subset = lowDia)
4245inv
4246( +2.83, +0.00), ( +0.00, +0.00), ( +0.00, +0.00)
4247( -0.57, -0.65), ( +1.13, +0.00), ( +0.00, +0.00)
4248( -0.47, +0.71), ( -0.58, -0.21), ( +0.71, +0.00)
4249call setMatCopy(inv(1:,2:), rdpack, inv(2:,1:), rdpack, lowDia, transHerm) ! symmetrize `inv` for multiplication.
4250inv
4251( +2.83, +0.00), ( -0.57, +0.65), ( -0.47, -0.71)
4252( -0.57, -0.65), ( +1.13, +0.00), ( -0.58, +0.21)
4253( -0.47, +0.71), ( -0.58, -0.21), ( +0.71, +0.00)
4254mul = matmul(mat, inv)
4255mul
4256( +1.00, -0.00), ( +0.00, +0.00), ( +0.00, +0.00)
4257( +0.00, -0.00), ( +1.00, +0.00), ( -0.00, +0.00)
4258( +0.00, +0.00), ( -0.00, +0.00), ( +1.00, +0.00)
4259
4260inv = 0
4261call setMatInv(inv, chol, auxil = choUpp, subset = uppDia)
4262inv
4263( +2.83, +0.00), ( -0.57, +0.65), ( -0.47, -0.71)
4264( +0.00, +0.00), ( +1.13, +0.00), ( -0.58, +0.21)
4265( +0.00, +0.00), ( +0.00, +0.00), ( +0.71, +0.00)
4266call setMatCopy(inv(2:,1:), rdpack, inv(1:,2:), rdpack, uppDia, transHerm) ! symmetrize `inv` for multiplication.
4267inv
4268( +2.83, +0.00), ( -0.57, +0.65), ( -0.47, -0.71)
4269( -0.57, -0.65), ( +1.13, +0.00), ( -0.58, +0.21)
4270( -0.47, +0.71), ( -0.58, -0.21), ( +0.71, +0.00)
4271mul = matmul(mat, inv)
4272mul
4273( +1.00, -0.00), ( +0.00, +0.00), ( +0.00, +0.00)
4274( +0.00, -0.00), ( +1.00, +0.00), ( -0.00, +0.00)
4275( +0.00, +0.00), ( -0.00, +0.00), ( +1.00, +0.00)
4276
4277
4278ndim = getUnifRand(1_IK, 6_IK)
4279ndim ! matrix rank
4280+1
4281mat
4282( +1.63, +0.00)
4283chol = getMatChol(mat, subset = uppDia)
4284chol
4285( +1.28, +0.00)
4286call setResized(inv, shape(mat, IK))
4287inv = 0
4288call setMatInv(inv, chol, auxil = choUpp, subset = lowDia)
4289inv
4290( +0.61, +0.00)
4291call setMatCopy(inv(1:,2:), rdpack, inv(2:,1:), rdpack, lowDia, transHerm) ! symmetrize `inv` for multiplication.
4292inv
4293( +0.61, +0.00)
4294mul = matmul(mat, inv)
4295mul
4296( +1.00, +0.00)
4297
4298inv = 0
4299call setMatInv(inv, chol, auxil = choUpp, subset = uppDia)
4300inv
4301( +0.61, +0.00)
4302call setMatCopy(inv(2:,1:), rdpack, inv(1:,2:), rdpack, uppDia, transHerm) ! symmetrize `inv` for multiplication.
4303inv
4304( +0.61, +0.00)
4305mul = matmul(mat, inv)
4306mul
4307( +1.00, +0.00)
4308
4309
4310ndim = getUnifRand(1_IK, 6_IK)
4311ndim ! matrix rank
4312+2
4313mat
4314( +1.06, +0.00), ( +1.93, +0.85)
4315( +1.93, -0.85), ( +7.50, +0.00)
4316chol = getMatChol(mat, subset = uppDia)
4317chol
4318( +1.03, +0.00), ( +1.88, +0.82)
4319( +0.00, +0.00), ( +1.82, +0.00)
4320call setResized(inv, shape(mat, IK))
4321inv = 0
4322call setMatInv(inv, chol, auxil = choUpp, subset = lowDia)
4323inv
4324( +2.15, +0.00), ( +0.00, +0.00)
4325( -0.55, +0.24), ( +0.30, +0.00)
4326call setMatCopy(inv(1:,2:), rdpack, inv(2:,1:), rdpack, lowDia, transHerm) ! symmetrize `inv` for multiplication.
4327inv
4328( +2.15, +0.00), ( -0.55, -0.24)
4329( -0.55, +0.24), ( +0.30, +0.00)
4330mul = matmul(mat, inv)
4331mul
4332( +1.00, -0.00), ( +0.00, +0.00)
4333( +0.00, +0.00), ( +1.00, +0.00)
4334
4335inv = 0
4336call setMatInv(inv, chol, auxil = choUpp, subset = uppDia)
4337inv
4338( +2.15, +0.00), ( -0.55, -0.24)
4339( +0.00, +0.00), ( +0.30, +0.00)
4340call setMatCopy(inv(2:,1:), rdpack, inv(1:,2:), rdpack, uppDia, transHerm) ! symmetrize `inv` for multiplication.
4341inv
4342( +2.15, +0.00), ( -0.55, -0.24)
4343( -0.55, +0.24), ( +0.30, +0.00)
4344mul = matmul(mat, inv)
4345mul
4346( +1.00, -0.00), ( +0.00, +0.00)
4347( +0.00, +0.00), ( +1.00, +0.00)
4348
4349
Test:
test_pm_matrixInv
Todo:
High Priority: The functionality of this generic interface must be extended to fully dispatch to LAPACK inverse matrix routines where appropriate.


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:
Amir Shahmoradi, Apr 21, 2017, 1:54 AM, Institute for Computational Engineering and Sciences (ICES), The University of Texas Austin

Definition at line 1788 of file pm_matrixInv.F90.


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