Generate and return the index of a specific element of a matrix of a specific storage in specific packing format from the corresponding index in an alternative packing format.
More...
Generate and return the index of a specific element of a matrix of a specific storage in specific packing format from the corresponding index in an alternative packing format.
Specifically, this generic interface allows the conversion of indices of upper and lower triangular matrices in
-
Rectangular Default Package to Linear Packed Package and vice versa.
-
Rectangular Default Package to Rectangular Full Package and vice versa.
- Parameters
-
[in] | dpack | : The input scalar that can be,
-
the constant lfpack only if the input argument
spack is rdpack,
-
the constant rfpack only if the input argument
spack is rdpack,
-
the constant rdpack only if the input argument
spack is rfpack or lfpack,
representing the target packing format to which the input sindex must be converted.
|
[in] | spack | : The input scalar that can be,
-
the constant lfpack only if the input argument
dpack is rdpack,
-
the constant rfpack only if the input argument
dpack is rdpack,
representing the original packing format from which the input sindex must be converted.
|
[in] | sindex | : The input scalar or vector of size (2) of type integer of default kind IK, representing the index of an element of the source matrix in spack packing format to be converted to the target output index in dpack packing format.
It must be scalar if and only if the input argument spack is set to lfpack, otherwise it must be a vector.
|
[in] | subset | : The input scalar that can be,
-
the constant uppDia indicating the upper-triangular storage of the original matrix in
spack packing.
-
the constant lowDia indicating the lower-triangular storage of the original matrix in
spack packing.
|
[in] | shape | : The input vector of size 1 or 2 representing the shape of the original upper/lower triangular matrix in the default Rectangular Standard Packing format.
This value is readily returned by the Fortran intrinsic shape() if the original/target matrix already exists in the default Rectangular Standard Packing.
|
[in] | doff | : The input scalar of type integer of default kind IK, representing the offset of the diagonal of the upper/lower triangular matrix with respect to its top-left corner element.
By definition,
-
the diagonal offset is non-positive for upper-triangular matrix storage.
-
the diagonal offset is non-negative for lower-triangular matrix storage.
-
the diagonal offset is always zero for matrices in Rectangular Full Packing (RFP) format.
-
the diagonal offset is always zero for upper/lower square matrices.
(optional, default = 0 . It can be present if and only if neither the original or the target packing is Rectangular Full Package.) |
- Returns
dindex
: The output scalar or vector of size (2)
of type integer
of default kind IK, representing the converted index of the corresponding element of the source matrix in spack
packing to the target dpack
packing format.
It is a scalar if and only if the input argument dpack
is set to lfpack, otherwise it is a vector of size 2
.
Possible calling interfaces ⛓
integer(IK) :: dindex, sindex
dindex
= getMatIndex(dpack, spack, sindex, subset, shape, doff
= doff)
Generate and return the index of a specific element of a matrix of a specific storage in specific pac...
This module contains procedures and generic interfaces for converting the indices of matrix elements ...
This module contains abstract and concrete derived types that are required for compile-time resolutio...
type(rdpack_type), parameter rdpack
This is an object instance of class rdpack_type that is exclusively used to signify Rectangular Spars...
type(lfpack_type), parameter lfpack
This is an object instance of class lfpack_type that is exclusively used to signify Linear Full conti...
type(rfpack_type), parameter rfpack
This is an object instance of class rfpack_type that is exclusively used to signify Rectangular Full ...
This module contains abstract and concrete derived types that are required for compile-time resolutio...
type(lowDia_type), parameter lowDia
This is a scalar parameter object of type lowDia_type that is exclusively used to request lower-diago...
type(uppDia_type), parameter uppDia
This is a scalar parameter object of type uppDia_type that is exclusively used to request upper-diago...
- Warning
- The condition
all(0 <= shape)
must hold for the corresponding input arguments.
The condition all([0 < sindex])
must hold for the corresponding input arguments.
The condition 0 <= shape(1) + doff .and. doff <= 0
must hold for the corresponding input arguments when subset = uppDia
.
The condition 0 <= shape(2) - doff .and. 0 <= doff
must hold for the corresponding input arguments when subset = lowDia
.
The condition all(sindex <= shape)
must hold for the corresponding input arguments when spack = rdpack
.
The condition sindex(1) <= sindex(2) - doff
must hold for the corresponding input arguments when spack = rdpack, subset = uppDia
.
The condition sindex(2) <= sindex(1) + doff
must hold for the corresponding input arguments when spack = rdpack, subset = lowDia
.
The specified input sindex
must correspond to an element within the specified storage subset
and packing spack
of the original matrix.
The condition shape(1) == shape(2)
must hold for the corresponding input arguments when spack = rfpack
or dpack = rfpack
.
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
- pm_matrixCopy
pm_matrixPack
pm_matrixSubset
Example usage ⛓
17 integer(IK) :: doff, indexLFP, indexRFP(
2), indexRDP(
2), jndexRDP(
2)
18 integer(IK),
parameter :: nrow
= 5, ncol
= 5
19 character(
2) :: matRDP(nrow, ncol)
21 type(display_type) :: disp
34 call disp%show(
"!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
35 call disp%show(
"! Upper triangle of an RDP matrix to LFP matrix.")
36 call disp%show(
"!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
41 call disp%show( matRDP , deliml
= """" )
46 call disp%show(
"matRDP(indexRDP(1), indexRDP(2))")
47 call disp%show( matRDP(indexRDP(
1), indexRDP(
2)) , deliml
= """" )
48 call disp%show(
"indexLFP = getMatIndex(lfpack, rdpack, indexRDP, uppDia, shape(matRDP, IK))")
52 call disp%show(
"call setAsserted(indexLFP == 5_IK)")
54 call disp%show(
"jndexRDP = getMatIndex(rdpack, lfpack, indexLFP, uppDia, shape(matRDP, IK)) ! revert")
58 call disp%show(
"call setAsserted(all(jndexRDP == indexRDP))")
62 call disp%show(
"indexRDP = [4, 2]; doff = -2")
63 indexRDP
= [
4,
2]; doff
= -2
64 call disp%show(
"matRDP(indexRDP(1), indexRDP(2))")
65 call disp%show( matRDP(indexRDP(
1), indexRDP(
2)) , deliml
= """" )
66 call disp%show(
"indexLFP = getMatIndex(lfpack, rdpack, indexRDP, uppDia, shape(matRDP, IK), doff)")
70 call disp%show(
"call setAsserted(indexLFP == 7_IK)")
72 call disp%show(
"jndexRDP = getMatIndex(rdpack, lfpack, indexLFP, uppDia, shape(matRDP, IK), doff) ! revert")
76 call disp%show(
"call setAsserted(all(jndexRDP == indexRDP))")
80 call disp%show(
"indexRDP = [5, 4]; doff = -2")
81 indexRDP
= [
5,
4]; doff
= -2
82 call disp%show(
"matRDP(indexRDP(1), indexRDP(2))")
83 call disp%show( matRDP(indexRDP(
1), indexRDP(
2)) , deliml
= """" )
84 call disp%show(
"indexLFP = getMatIndex(lfpack, rdpack, indexRDP, uppDia, shape(matRDP, IK), doff)")
88 call disp%show(
"call setAsserted(indexLFP == 17_IK)")
90 call disp%show(
"jndexRDP = getMatIndex(rdpack, lfpack, indexLFP, uppDia, shape(matRDP, IK), doff) ! revert")
94 call disp%show(
"call setAsserted(all(jndexRDP == indexRDP))")
98 call disp%show(
"indexRDP = [5, 5]; doff = -5")
99 indexRDP
= [
5,
5]; doff
= -5
100 call disp%show(
"matRDP(indexRDP(1), indexRDP(2))")
101 call disp%show( matRDP(indexRDP(
1), indexRDP(
2)) , deliml
= """" )
102 call disp%show(
"indexLFP = getMatIndex(lfpack, rdpack, indexRDP, uppDia, shape(matRDP, IK), doff)")
106 call disp%show(
"call setAsserted(indexLFP == 25_IK)")
108 call disp%show(
"jndexRDP = getMatIndex(rdpack, lfpack, indexLFP, uppDia, shape(matRDP, IK), doff) ! revert")
112 call disp%show(
"call setAsserted(all(jndexRDP == indexRDP))")
116 call disp%show(
"!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
117 call disp%show(
"! Lower triangle of a RDP matrix to LFP matrix.")
118 call disp%show(
"!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
123 call disp%show( matRDP , deliml
= """" )
128 call disp%show(
"matRDP(indexRDP(1), indexRDP(2))")
129 call disp%show( matRDP(indexRDP(
1), indexRDP(
2)) , deliml
= """" )
130 call disp%show(
"indexLFP = getMatIndex(lfpack, rdpack, indexRDP, lowDia, shape(matRDP, IK))")
134 call disp%show(
"call setAsserted(indexLFP == 7_IK)")
136 call disp%show(
"jndexRDP = getMatIndex(rdpack, lfpack, indexLFP, lowDia, shape(matRDP, IK)) ! revert")
140 call disp%show(
"call setAsserted(all(jndexRDP == indexRDP))")
144 call disp%show(
"indexRDP = [2, 4]; doff = +2")
145 indexRDP
= [
2,
4]; doff
= +2
146 call disp%show(
"matRDP(indexRDP(1), indexRDP(2))")
147 call disp%show( matRDP(indexRDP(
1), indexRDP(
2)) , deliml
= """" )
148 call disp%show(
"indexLFP = getMatIndex(lfpack, rdpack, indexRDP, lowDia, shape(matRDP, IK), doff) ! 16")
152 call disp%show(
"call setAsserted(indexLFP == 16_IK)")
154 call disp%show(
"jndexRDP = getMatIndex(rdpack, lfpack, indexLFP, lowDia, shape(matRDP, IK), doff) ! revert")
158 call disp%show(
"call setAsserted(all(jndexRDP == indexRDP))")
162 call disp%show(
"indexRDP = [4, 5]; doff = +2")
163 indexRDP
= [
4,
5]; doff
= +2
164 call disp%show(
"matRDP(indexRDP(1), indexRDP(2))")
165 call disp%show( matRDP(indexRDP(
1), indexRDP(
2)) , deliml
= """" )
166 call disp%show(
"indexLFP = getMatIndex(lfpack, rdpack, indexRDP, lowDia, shape(matRDP, IK), doff) ! 21")
170 call disp%show(
"call setAsserted(indexLFP == 21_IK)")
172 call disp%show(
"jndexRDP = getMatIndex(rdpack, lfpack, indexLFP, lowDia, shape(matRDP, IK), doff) ! revert")
176 call disp%show(
"call setAsserted(all(jndexRDP == indexRDP))")
180 call disp%show(
"indexRDP = [5, 5]; doff = +5")
181 indexRDP
= [
5,
5]; doff
= +5
182 call disp%show(
"matRDP(indexRDP(1), indexRDP(2))")
183 call disp%show( matRDP(indexRDP(
1), indexRDP(
2)) , deliml
= """" )
184 call disp%show(
"indexLFP = getMatIndex(lfpack, rdpack, indexRDP, lowDia, shape(matRDP, IK), doff)")
188 call disp%show(
"call setAsserted(indexLFP == 25_IK)")
190 call disp%show(
"jndexRDP = getMatIndex(rdpack, lfpack, indexLFP, lowDia, shape(matRDP, IK), doff) ! revert")
194 call disp%show(
"call setAsserted(all(jndexRDP == indexRDP))")
200 call disp%show(
"matRDP(indexRDP(1), indexRDP(2))")
201 call disp%show( matRDP(indexRDP(
1), indexRDP(
2)) , deliml
= """" )
202 call disp%show(
"indexLFP = getMatIndex(lfpack, rdpack, indexRDP, lowDia, shape(matRDP, IK)) ! 8")
206 call disp%show(
"call setAsserted(indexLFP == 8_IK)")
208 call disp%show(
"jndexRDP = getMatIndex(rdpack, lfpack, indexLFP, lowDia, shape(matRDP, IK)) ! revert")
212 call disp%show(
"call setAsserted(all(jndexRDP == indexRDP))")
216 call disp%show(
"!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
217 call disp%show(
"! Upper triangle of a RDP matrix to RFP matrix.")
218 call disp%show(
"!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
223 call disp%show( matRDP , deliml
= """" )
226 call disp%show(
"indexRDP = [2, 3];")
228 call disp%show(
"matRDP(indexRDP(1), indexRDP(2))")
229 call disp%show( matRDP(indexRDP(
1), indexRDP(
2)) , deliml
= """" )
230 call disp%show(
"indexRFP = getMatIndex(rfpack, rdpack, indexRDP, uppDia, shape(matRDP, IK))")
234 call disp%show(
"call setAsserted(all(indexRFP == [2, 1]))")
236 call disp%show(
"jndexRDP = getMatIndex(rdpack, rfpack, indexRFP, uppDia, shape(matRDP, IK)) ! revert")
240 call disp%show(
"call setAsserted(all(jndexRDP == indexRDP))")
246 call disp%show(
"matRDP(indexRDP(1), indexRDP(2))")
247 call disp%show( matRDP(indexRDP(
1), indexRDP(
2)) , deliml
= """" )
248 call disp%show(
"indexRFP = getMatIndex(rfpack, rdpack, indexRDP, uppDia, shape(matRDP, IK))")
252 call disp%show(
"call setAsserted(all(indexRFP == [5, 1]))")
254 call disp%show(
"jndexRDP = getMatIndex(rdpack, rfpack, indexRFP, uppDia, shape(matRDP, IK)) ! revert")
258 call disp%show(
"call setAsserted(all(jndexRDP == indexRDP))")
264 call disp%show(
"matRDP(indexRDP(1), indexRDP(2))")
265 call disp%show( matRDP(indexRDP(
1), indexRDP(
2)) , deliml
= """" )
266 call disp%show(
"indexRFP = getMatIndex(rfpack, rdpack, indexRDP, uppDia, shape(matRDP, IK))")
270 call disp%show(
"call setAsserted(all(indexRFP == [4, 3]))")
272 call disp%show(
"jndexRDP = getMatIndex(rdpack, rfpack, indexRFP, uppDia, shape(matRDP, IK)) ! revert")
276 call disp%show(
"call setAsserted(all(jndexRDP == indexRDP))")
282 call disp%show(
"matRDP(indexRDP(1), indexRDP(2))")
283 call disp%show( matRDP(indexRDP(
1), indexRDP(
2)) , deliml
= """" )
284 call disp%show(
"indexRFP = getMatIndex(rfpack, rdpack, indexRDP, uppDia, shape(matRDP, IK))")
288 call disp%show(
"call setAsserted(all(indexRFP == [5, 3]))")
290 call disp%show(
"jndexRDP = getMatIndex(rdpack, rfpack, indexRFP, uppDia, shape(matRDP, IK)) ! revert")
294 call disp%show(
"call setAsserted(all(jndexRDP == indexRDP))")
300 call disp%show( matRDP(
1:
4,
1:
4) , deliml
= """" )
305 call disp%show(
"matRDP(indexRDP(1), indexRDP(2))")
306 call disp%show( matRDP(indexRDP(
1), indexRDP(
2)) , deliml
= """" )
307 call disp%show(
"indexRFP = getMatIndex(rfpack, rdpack, indexRDP, uppDia, shape(matRDP, IK) - 1_IK)")
311 call disp%show(
"call setAsserted(all(indexRFP == [2, 1]))")
313 call disp%show(
"jndexRDP = getMatIndex(rdpack, rfpack, indexRFP, uppDia, shape(matRDP, IK)) ! revert")
317 call disp%show(
"call setAsserted(all(jndexRDP == indexRDP))")
323 call disp%show(
"matRDP(indexRDP(1), indexRDP(2))")
324 call disp%show( matRDP(indexRDP(
1), indexRDP(
2)) , deliml
= """" )
325 call disp%show(
"indexRFP = getMatIndex(rfpack, rdpack, indexRDP, uppDia, shape(matRDP, IK) - 1_IK)")
329 call disp%show(
"call setAsserted(all(indexRFP == [5, 2]))")
331 call disp%show(
"jndexRDP = getMatIndex(rdpack, rfpack, indexRFP, uppDia, shape(matRDP, IK)) ! revert")
335 call disp%show(
"call setAsserted(all(jndexRDP == indexRDP))")
341 call disp%show(
"matRDP(indexRDP(1), indexRDP(2))")
342 call disp%show( matRDP(indexRDP(
1), indexRDP(
2)) , deliml
= """" )
343 call disp%show(
"indexRFP = getMatIndex(rfpack, rdpack, indexRDP, uppDia, shape(matRDP, IK) - 1_IK)")
347 call disp%show(
"call setAsserted(all(indexRFP == [3, 2]))")
349 call disp%show(
"jndexRDP = getMatIndex(rdpack, rfpack, indexRFP, uppDia, shape(matRDP, IK)) ! revert")
353 call disp%show(
"call setAsserted(all(jndexRDP == indexRDP))")
359 call disp%show(
"matRDP(indexRDP(1), indexRDP(2))")
360 call disp%show( matRDP(indexRDP(
1), indexRDP(
2)) , deliml
= """" )
361 call disp%show(
"indexRFP = getMatIndex(rfpack, rdpack, indexRDP, uppDia, shape(matRDP, IK) - 1_IK)")
365 call disp%show(
"call setAsserted(all(indexRFP == [4, 2]))")
367 call disp%show(
"jndexRDP = getMatIndex(rdpack, rfpack, indexRFP, uppDia, shape(matRDP, IK)) ! revert")
371 call disp%show(
"call setAsserted(all(jndexRDP == indexRDP))")
375 call disp%show(
"!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
376 call disp%show(
"! Lower triangle of a RDP matrix to RFP matrix.")
377 call disp%show(
"!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
382 call disp%show( matRDP , deliml
= """" )
387 call disp%show(
"matRDP(indexRDP(1), indexRDP(2))")
388 call disp%show( matRDP(indexRDP(
1), indexRDP(
2)) , deliml
= """" )
389 call disp%show(
"indexRFP = getMatIndex(rfpack, rdpack, indexRDP, lowDia, shape(matRDP, IK))")
393 call disp%show(
"call setAsserted(all(indexRFP == [3, 2]))")
395 call disp%show(
"jndexRDP = getMatIndex(rdpack, rfpack, indexRFP, lowDia, shape(matRDP, IK)) ! revert")
399 call disp%show(
"call setAsserted(all(jndexRDP == indexRDP))")
405 call disp%show(
"matRDP(indexRDP(1), indexRDP(2))")
406 call disp%show( matRDP(indexRDP(
1), indexRDP(
2)) , deliml
= """" )
407 call disp%show(
"indexRFP = getMatIndex(rfpack, rdpack, indexRDP, lowDia, shape(matRDP, IK))")
411 call disp%show(
"call setAsserted(all(indexRFP == [2, 1]))")
413 call disp%show(
"jndexRDP = getMatIndex(rdpack, rfpack, indexRFP, lowDia, shape(matRDP, IK)) ! revert")
417 call disp%show(
"call setAsserted(all(jndexRDP == indexRDP))")
423 call disp%show(
"matRDP(indexRDP(1), indexRDP(2))")
424 call disp%show( matRDP(indexRDP(
1), indexRDP(
2)) , deliml
= """" )
425 call disp%show(
"indexRFP = getMatIndex(rfpack, rdpack, indexRDP, lowDia, shape(matRDP, IK))")
429 call disp%show(
"call setAsserted(all(indexRFP == [1, 3]))")
431 call disp%show(
"jndexRDP = getMatIndex(rdpack, rfpack, indexRFP, lowDia, shape(matRDP, IK)) ! revert")
435 call disp%show(
"call setAsserted(all(jndexRDP == indexRDP))")
441 call disp%show(
"matRDP(indexRDP(1), indexRDP(2))")
442 call disp%show( matRDP(indexRDP(
1), indexRDP(
2)) , deliml
= """" )
443 call disp%show(
"indexRFP = getMatIndex(rfpack, rdpack, indexRDP, lowDia, shape(matRDP, IK))")
447 call disp%show(
"call setAsserted(all(indexRFP == [2, 3]))")
449 call disp%show(
"jndexRDP = getMatIndex(rdpack, rfpack, indexRFP, lowDia, shape(matRDP, IK)) ! revert")
453 call disp%show(
"call setAsserted(all(jndexRDP == indexRDP))")
459 call disp%show( matRDP(
1:
4,
1:
4) , deliml
= """" )
464 call disp%show(
"matRDP(indexRDP(1), indexRDP(2))")
465 call disp%show( matRDP(indexRDP(
1), indexRDP(
2)) , deliml
= """" )
466 call disp%show(
"indexRFP = getMatIndex(rfpack, rdpack, indexRDP, lowDia, shape(matRDP, IK) - 1_IK)")
470 call disp%show(
"call setAsserted(all(indexRFP == [4, 2]))")
472 call disp%show(
"jndexRDP = getMatIndex(rdpack, rfpack, indexRFP, lowDia, shape(matRDP, IK) - 1_IK) ! revert")
476 call disp%show(
"call setAsserted(all(jndexRDP == indexRDP))")
482 call disp%show(
"matRDP(indexRDP(1), indexRDP(2))")
483 call disp%show( matRDP(indexRDP(
1), indexRDP(
2)) , deliml
= """" )
484 call disp%show(
"indexRFP = getMatIndex(rfpack, rdpack, indexRDP, lowDia, shape(matRDP, IK) - 1_IK)")
488 call disp%show(
"call setAsserted(all(indexRFP == [3, 2]))")
490 call disp%show(
"jndexRDP = getMatIndex(rdpack, rfpack, indexRFP, lowDia, shape(matRDP, IK) - 1_IK) ! revert")
494 call disp%show(
"call setAsserted(all(jndexRDP == indexRDP))")
500 call disp%show(
"matRDP(indexRDP(1), indexRDP(2))")
501 call disp%show( matRDP(indexRDP(
1), indexRDP(
2)) , deliml
= """" )
502 call disp%show(
"indexRFP = getMatIndex(rfpack, rdpack, indexRDP, lowDia, shape(matRDP, IK) - 1_IK)")
506 call disp%show(
"call setAsserted(all(indexRFP == [1, 2]))")
508 call disp%show(
"jndexRDP = getMatIndex(rdpack, rfpack, indexRFP, lowDia, shape(matRDP, IK) - 1_IK) ! revert")
512 call disp%show(
"call setAsserted(all(jndexRDP == indexRDP))")
518 call disp%show(
"matRDP(indexRDP(1), indexRDP(2))")
519 call disp%show( matRDP(indexRDP(
1), indexRDP(
2)) , deliml
= """" )
520 call disp%show(
"indexRFP = getMatIndex(rfpack, rdpack, indexRDP, lowDia, shape(matRDP, IK) - 1_IK)")
524 call disp%show(
"call setAsserted(all(indexRFP == [2, 2]))")
526 call disp%show(
"jndexRDP = getMatIndex(rdpack, rfpack, indexRFP, lowDia, shape(matRDP, IK) - 1_IK) ! revert")
530 call disp%show(
"call setAsserted(all(jndexRDP == indexRDP))")
Return a uniform random scalar or contiguous array of arbitrary rank of randomly uniformly distribute...
Verify the input assertion holds and if it does not, print the (optional) input message on stdout and...
Generate and return an object of type stop_type with the user-specified input attributes.
This is a generic method of the derived type display_type with pass attribute.
Generate and return the conversion of the input value to an output Fortran string,...
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.
This module contains classes and procedures for input/output (IO) or generic display operations on st...
type(display_type) disp
This is a scalar module variable an object of type display_type for general display.
This module defines the relevant Fortran kind type-parameters frequently used in the ParaMonte librar...
integer, parameter IK
The default integer kind in the ParaMonte library: int32 in Fortran, c_int32_t in C-Fortran Interoper...
integer, parameter SK
The default character kind in the ParaMonte library: kind("a") in Fortran, c_char in C-Fortran Intero...
This module contains the generic procedures for converting values of different types and kinds to For...
Generate and return an object of type display_type.
Example Unix compile command via Intel ifort
compiler ⛓
3ifort -fpp -standard-semantics -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
Example Windows Batch compile command via Intel ifort
compiler ⛓
2set PATH=..\..\..\lib;%PATH%
3ifort /fpp /standard-semantics /O3 /I:..\..\..\include main.F90 ..\..\..\lib\libparamonte*.lib /exe:main.exe
Example Unix / MinGW compile command via GNU gfortran
compiler ⛓
3gfortran -cpp -ffree-line-length-none -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
Example output ⛓
8"11",
"12",
"13",
"14",
"15"
9"21",
"22",
"23",
"24",
"25"
10"31",
"32",
"33",
"34",
"35"
11"41",
"42",
"43",
"44",
"45"
12"51",
"52",
"53",
"54",
"55"
15matRDP(indexRDP(
1), indexRDP(
2))
26indexRDP
= [
4,
2]; doff
= -2
27matRDP(indexRDP(
1), indexRDP(
2))
38indexRDP
= [
5,
4]; doff
= -2
39matRDP(indexRDP(
1), indexRDP(
2))
50indexRDP
= [
5,
5]; doff
= -5
51matRDP(indexRDP(
1), indexRDP(
2))
68"11",
"12",
"13",
"14",
"15"
69"21",
"22",
"23",
"24",
"25"
70"31",
"32",
"33",
"34",
"35"
71"41",
"42",
"43",
"44",
"45"
72"51",
"52",
"53",
"54",
"55"
75matRDP(indexRDP(
1), indexRDP(
2))
86indexRDP
= [
2,
4]; doff
= +2
87matRDP(indexRDP(
1), indexRDP(
2))
98indexRDP
= [
4,
5]; doff
= +2
99matRDP(indexRDP(
1), indexRDP(
2))
110indexRDP
= [
5,
5]; doff
= +5
111matRDP(indexRDP(
1), indexRDP(
2))
123matRDP(indexRDP(
1), indexRDP(
2))
140"11",
"12",
"13",
"14",
"15"
141"21",
"22",
"23",
"24",
"25"
142"31",
"32",
"33",
"34",
"35"
143"41",
"42",
"43",
"44",
"45"
144"51",
"52",
"53",
"54",
"55"
147matRDP(indexRDP(
1), indexRDP(
2))
159matRDP(indexRDP(
1), indexRDP(
2))
171matRDP(indexRDP(
1), indexRDP(
2))
183matRDP(indexRDP(
1), indexRDP(
2))
196"11",
"12",
"13",
"14"
197"21",
"22",
"23",
"24"
198"31",
"32",
"33",
"34"
199"41",
"42",
"43",
"44"
202matRDP(indexRDP(
1), indexRDP(
2))
214matRDP(indexRDP(
1), indexRDP(
2))
226matRDP(indexRDP(
1), indexRDP(
2))
238matRDP(indexRDP(
1), indexRDP(
2))
255"11",
"12",
"13",
"14",
"15"
256"21",
"22",
"23",
"24",
"25"
257"31",
"32",
"33",
"34",
"35"
258"41",
"42",
"43",
"44",
"45"
259"51",
"52",
"53",
"54",
"55"
262matRDP(indexRDP(
1), indexRDP(
2))
274matRDP(indexRDP(
1), indexRDP(
2))
286matRDP(indexRDP(
1), indexRDP(
2))
298matRDP(indexRDP(
1), indexRDP(
2))
311"11",
"12",
"13",
"14"
312"21",
"22",
"23",
"24"
313"31",
"32",
"33",
"34"
314"41",
"42",
"43",
"44"
317matRDP(indexRDP(
1), indexRDP(
2))
329matRDP(indexRDP(
1), indexRDP(
2))
341matRDP(indexRDP(
1), indexRDP(
2))
353matRDP(indexRDP(
1), indexRDP(
2))
- Test:
- test_pm_matrixIndex
- Todo:
- High Priority: This generic interface should be extended to convert indices of matrices from Rectangular Standard Packing to Rectangular Band Packing and vice versa.
- Todo:
- Normal Priority: The implementation of the procedures for converting indices from LFP to RDP could be likely improved for better performance.
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.
-
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.
-
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.
- Copyright
- Computational Data Science Lab
- Author:
- Amir Shahmoradi, April 23, 2017, 1:36 AM, Institute for Computational Engineering and Sciences (ICES), University of Texas at Austin
Definition at line 171 of file pm_matrixIndex.F90.