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
If the level key is "sparse", the `subformat` key must be present. The
354
+
`rank` key must be present, and set to an integer `r` greater than or equal to
355
+
`1`. The sparse level represents zero or more `r`-dimensional sparse arrays
356
+
whose non-implicit elements are themselves arrays specified by `subformat`. For
357
+
example, a sparse level of rank 1 represents a collection of sparse vectors of
358
+
subarrays.
359
+
360
+
Assume that this level represents `n`-dimensional subarrays and the root array
361
+
is `N`-dimensional. The sparse level implies the following binary arrays are
362
+
present:
363
+
364
+
: pointers_to_(N - n)
365
+
:: Array of size `number_of_positions + 1` whose 1st element is equal to `0` and whose `p + 1`th element is equal to the sum of `pointers_to_(N - n)[p]` and the number of explicitly represented slices in the `p`th position.
366
+
367
+
: indices_(N - n), ..., indices(N - n + r - 1)
368
+
:: There are `r` such arrays. When `A[i_0, ..., i_(r - 1), :, ..., :]` is explicitly represented by the subarray in position `q`, `indices_(N-n+s)[q] = i_s`. The arrays must be ordered such that the tuples `(indices_(N-n)[q], ..., indices_(N-n+r-1)[q])` are unique and appear in lexicographic order for all `q` in each range `pointers_to_(N-n)[p] <= q < pointers_to_(N-n)[p + 1]`. This array must contain no other elements.
369
+
370
+
Special note: If the sparse level is the root level, the `pointers` array should
371
+
be ommitted, as its first value will be `0` and its last value will be the
372
+
length of any of the `indices` arrays in this level.
373
+
374
+
375
+
### Equivalent Formats ### {#equivalent_formats}
376
+
377
+
The following formats are equivalent
378
+
379
+
#### DVEC #### {#dvec_format_equiv}
380
+
381
+
```json
382
+
"format": {
383
+
"subformat": {
384
+
"level": "dense",
385
+
"rank": 1,
386
+
"subformat": {
387
+
"level": "element",
388
+
}
389
+
}
390
+
}
391
+
```
392
+
393
+
#### DMATR #### {#dmatr_format_equiv}
394
+
395
+
```json
396
+
"format": {
397
+
"subformat": {
398
+
"level": "dense",
399
+
"rank": 1,
400
+
"subformat": {
401
+
"level": "dense",
402
+
"rank": 1,
403
+
"subformat": {
404
+
"level": "element",
405
+
}
406
+
}
407
+
}
408
+
}
409
+
```
410
+
411
+
#### DMATC #### {#dmatr_format_equiv}
412
+
413
+
```json
414
+
"format": {
415
+
"transpose": [1, 0],
416
+
"subformat": {
417
+
"level": "dense",
418
+
"rank": 1,
419
+
"subformat": {
420
+
"level": "dense",
421
+
"rank": 1,
422
+
"subformat": {
423
+
"level": "element",
424
+
}
425
+
}
426
+
}
427
+
}
428
+
```
429
+
430
+
#### CVEC #### {#cvec_format_equiv}
431
+
432
+
```json
433
+
"format": {
434
+
"subformat": {
435
+
"level": "sparse",
436
+
"rank": 1,
437
+
"subformat": {
438
+
"level": "element",
439
+
}
440
+
}
441
+
}
442
+
```
443
+
444
+
#### CSR #### {#csr_format_equiv}
445
+
446
+
```json
447
+
"format": {
448
+
"subformat": {
449
+
"level": "dense",
450
+
"rank": 1,
451
+
"subformat": {
452
+
"level": "sparse",
453
+
"rank": 1,
454
+
"subformat": {
455
+
"level": "element",
456
+
}
457
+
}
458
+
}
459
+
}
460
+
```
461
+
462
+
#### CSC #### {#csc_format_equiv}
463
+
464
+
```json
465
+
"format": {
466
+
"transpose": [1, 0],
467
+
"subformat": {
468
+
"level": "dense",
469
+
"rank": 1,
470
+
"subformat": {
471
+
"level": "sparse",
472
+
"rank": 1,
473
+
"subformat": {
474
+
"level": "element",
475
+
}
476
+
}
477
+
}
478
+
}
479
+
```
480
+
481
+
#### DCSR #### {#dcsr_format_equiv}
482
+
483
+
```json
484
+
"format": {
485
+
"subformat": {
486
+
"level": "sparse",
487
+
"rank": 1,
488
+
"subformat": {
489
+
"level": "sparse",
490
+
"rank": 1,
491
+
"subformat": {
492
+
"level": "element",
493
+
}
494
+
}
495
+
}
496
+
}
497
+
```
498
+
499
+
#### DCSC #### {#dcsc_format_equiv}
500
+
501
+
```json
502
+
"format": {
503
+
"transpose": [1, 0],
504
+
"subformat": {
505
+
"level": "sparse",
506
+
"rank": 1,
507
+
"subformat": {
508
+
"level": "sparse",
509
+
"rank": 1,
510
+
"subformat": {
511
+
"level": "element",
512
+
}
513
+
}
514
+
}
515
+
}
516
+
```
517
+
518
+
#### COOR #### {#coor_format_equiv}
519
+
520
+
```json
521
+
"format": {
522
+
"subformat": {
523
+
"level": "sparse",
524
+
"rank": 2,
525
+
"subformat": {
526
+
"level": "element",
527
+
}
528
+
}
529
+
}
530
+
```
531
+
532
+
#### COOC #### {#cooc_format_equiv}
533
+
534
+
Column-wise Coordinate format
535
+
536
+
```json
537
+
"format": {
538
+
"transpose": [1, 0],
539
+
"subformat": {
540
+
"level": "sparse",
541
+
"rank": 2,
542
+
"subformat": {
543
+
"level": "element",
544
+
}
545
+
}
546
+
}
547
+
```
548
+
276
549
Data Types {#key_data_types}
277
550
----------------------------
278
551
@@ -313,9 +586,9 @@ The following strings shall be used to describe data types:
313
586
## Value Modifiers ## {#value_modifiers}
314
587
315
588
When the value array is meant to be reinterpreted before reading, a special bracket syntax is
316
-
provided to indicate modifications to the underlying value array.
589
+
provided to indicate modifications to the underlying element level.
317
590
318
-
### Sparse Array with Complex Values ### {#complex_arrays}
591
+
### Complex Values (complex) ### {#complex_level}
319
592
320
593
When a value array is composed of alternating real and imaginary components of
321
594
complex numbers, the type is written as `complex[<type>]`. For example, a value
@@ -326,7 +599,7 @@ the modified array shall be at position `2i + 1` in the underlying array.
326
599
The `complex` value modifier may only be used with the types `float32` and
327
600
`float64`.
328
601
329
-
### Sparse Array with All Values the Same ### {#iso_arrays}
602
+
### All Values the Same (ISO) ### {#iso_level}
330
603
331
604
When all values of a sparse array are the same identical value, the type is
332
605
written as `iso[<type>]`. This indicates that the array will store only a single
0 commit comments