You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the following, all sparse kinds will be presented in two main flavors: a data-less type `<matrix>_type` useful for topological graph operations. And real/complex valued types `<matrix>_<kind>` containing the `data` buffer for the matrix values. The following rectangular matrix will be used to showcase how each sparse matrix holds the data internally:
@@ -135,14 +135,14 @@ Experimental
135
135
The Sliced ELLPACK format `SELLC` is a variation of the `ELLPACK` format. This modification reduces the storage size compared to the `ELLPACK` format but maintaining its efficient data access scheme. It can be seen as an intermediate format between `CSR` and `ELLPACK`. For more details read [the reference](https://arxiv.org/pdf/1307.6209v1)
Type-bound procedures to enable adding or requesting data in/from a sparse matrix.
145
+
Type-bound procedures to enable adding data in a sparse matrix.
146
146
147
147
### Syntax
148
148
@@ -151,19 +151,32 @@ Type-bound procedures to enable adding or requesting data in/from a sparse matri
151
151
152
152
### Arguments
153
153
154
-
`i`, `intent(in)`: Shall be an integer value or rank-1 array.
155
-
`j`, `intent(in)`: Shall be an integer value or rank-1 array.
156
-
`v`, `intent(in)`: Shall be a `real` or `complex` value or rank-2 array. The type shall be in accordance to the declared sparse matrix object.
154
+
`i`: Shall be an integer value or rank-1 array. It is an `intent(in)` argument.
155
+
156
+
`j`: Shall be an integer value or rank-1 array. It is an `intent(in)` argument.
157
+
158
+
`v`: Shall be a `real` or `complex` value or rank-2 array. The type shall be in accordance to the declared sparse matrix object. It is an `intent(in)` argument.
159
+
160
+
## `at`- sparse matrix data accessors
161
+
162
+
### Status
163
+
164
+
Experimental
165
+
166
+
### Description
167
+
Type-bound procedures to enable requesting data from a sparse matrix.
157
168
158
169
### Syntax
159
170
160
171
`v = matrix%at(i,j)`
161
172
162
173
### Arguments
163
174
164
-
`i`, `intent(in)` : Shall be an integer value.
165
-
`j`, `intent(in)` : Shall be an integer value.
166
-
`v`, `result` : Shall be a `real` or `complex` value in accordance to the declared sparse matrix object. If the `ij` tuple is within the sparse pattern, `v` contains the value in the data buffer. If the `ij` tuple is outside the sparse pattern, `v` is equal `0`. If the `ij` tuple is outside the matrix pattern `(nrows,ncols)`, `v` is `NaN`.
175
+
`i` : Shall be an integer value. It is an `intent(in)` argument.
176
+
177
+
`j` : Shall be an integer value. It is an `intent(in)` argument.
178
+
179
+
`v` : Shall be a `real` or `complex` value in accordance to the declared sparse matrix object. If the `ij` tuple is within the sparse pattern, `v` contains the value in the data buffer. If the `ij` tuple is outside the sparse pattern, `v` is equal `0`. If the `ij` tuple is outside the matrix pattern `(nrows,ncols)`, `v` is `NaN`.
167
180
168
181
## Example
169
182
```fortran
@@ -189,18 +202,18 @@ $$y=\alpha*M*x+\beta*y$$
189
202
190
203
### Arguments
191
204
192
-
`matrix`, `intent(in)`: Shall be a `real` or `complex` sparse type matrix.
205
+
`matrix`: Shall be a `real` or `complex` sparse type matrix. It is an `intent(in)` argument.
193
206
194
-
`vec_x`, `intent(in)`: Shall be a rank-1 or rank-2 array of `real` or `complex` type array.
207
+
`vec_x`: Shall be a rank-1 or rank-2 array of `real` or `complex` type array. It is an `intent(in)` argument.
195
208
196
-
`vec_y`, `intent(inout)`: Shall be a rank-1 or rank-2 array of `real` or `complex` type array.
209
+
`vec_y`: Shall be a rank-1 or rank-2 array of `real` or `complex` type array. . It is an `intent(inout)` argument.
197
210
198
-
`alpha`, `intent(in)`, `optional` : Shall be a scalar value of the same type as `vec_x`. Default value `alpha=1`.
211
+
`alpha`, `optional` : Shall be a scalar value of the same type as `vec_x`. Default value `alpha=1`. It is an `intent(in)` argument.
199
212
200
-
`beta`, `intent(in)`, `optional` : Shall be a scalar value of the same type as `vec_x`. Default value `beta=0`.
213
+
`beta`, `optional` : Shall be a scalar value of the same type as `vec_x`. Default value `beta=0`. It is an `intent(in)` argument.
`COO`, `intent(inout)`: Shall be any `COO` type. The same object will be returned with the arrays reallocated to the correct size after removing duplicates.
232
+
`COO`: Shall be any `COO` type. The same object will be returned with the arrays reallocated to the correct size after removing duplicates. It is an `intent(inout)` argument.
220
233
221
-
`sort_data`, `logical(in)`, `optional`:: Shall be an optional `logical` argument to determine whether data in the COO graph should be sorted while sorting the index array, default `.false.`.
234
+
`sort_data`, `optional` : Shall be a `logical` argument to determine whether data in the COO graph should be sorted while sorting the index array, default `.false.`. It is an `intent(in)` argument.
`sparse`, `intent(inout)`: Shall be a `COO`, `CSR`, `ELL` or `SELLC` type. The graph object will be returned with a canonical shape after sorting and removing duplicates from the `(row,col,data)` triplet. If the graph is `COO_type` no data buffer is allowed.
242
+
`sparse`: Shall be a `COO`, `CSR`, `ELL` or `SELLC` type. The graph object will be returned with a canonical shape after sorting and removing duplicates from the `(row,col,data)` triplet. If the graph is `COO_type` no data buffer is allowed. It is an `intent(inout)` argument.
230
243
231
-
`row`, `integer(in)`:: rows index array.
244
+
`row` : rows index array. It is an `intent(in)` argument.
232
245
233
-
`col`, `integer(in)`:: columns index array.
246
+
`col` : columns index array. It is an `intent(in)` argument.
234
247
235
-
`data`, `real/complex(in)`, `optional`::`real` or `complex` data array.
248
+
`data`, `optional`: `real` or `complex` data array. It is an `intent(in)` argument.
236
249
237
-
`nrows`, `integer(in)`, `optional`:: number of rows, if not given it will be computed from the `row` array.
250
+
`nrows`, `optional`: number of rows, if not given it will be computed from the `row` array. It is an `intent(in)` argument.
238
251
239
-
`ncols`, `integer(in)`, `optional`:: number of columns, if not given it will be computed from the `col` array.
252
+
`ncols`, `optional`: number of columns, if not given it will be computed from the `col` array. It is an `intent(in)` argument.
240
253
241
-
`num_nz_rows`, `integer(in)`, `optional`:: number of non zeros per row, only valid in the case of an `ELL` matrix, by default it will computed from the largest row.
254
+
`num_nz_rows`, `optional`: number of non zeros per row, only valid in the case of an `ELL` matrix, by default it will computed from the largest row. It is an `intent(in)` argument.
242
255
243
-
`chunk`, `integer(in)`, `optional`:: chunk size, only valid in the case of a `SELLC` matrix, by default it will be taken from the `SELLC` default attribute chunk size.
256
+
`chunk`, `optional`: chunk size, only valid in the case of a `SELLC` matrix, by default it will be taken from the `SELLC` default attribute chunk size. It is an `intent(in)` argument.
244
257
245
258
## Example
246
259
```fortran
@@ -253,51 +266,51 @@ This module provides facility functions for converting between storage formats.
253
266
254
267
### Arguments
255
268
256
-
`dense`, `intent(in)`: Shall be a rank-2 array of `real` or `complex` type.
269
+
`dense`: Shall be a rank-2 array of `real` or `complex` type. It is an `intent(in)` argument.
257
270
258
-
`coo`, `intent(inout)`: Shall be a `COO` type of `real` or `complex` type.
271
+
`coo`: Shall be a `COO` type of `real` or `complex` type. It is an `intent(out)` argument.
0 commit comments