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
Copy file name to clipboardExpand all lines: docs/src/arrays.md
+24-11Lines changed: 24 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,39 +1,52 @@
1
1
# Array Types
2
2
3
-
There are two primary datastructures in in `SuiteSparseGraphBLAS.jl`: the `GBVector` and `GBMatrix`.
3
+
There are two primary array types in SuiteSparseGraphBLAS.jl: [`GBVector`](@ref) and [`GBMatrix`](@ref), as well as a few specialized versions of those array types. The full type hierarchy is:
4
4
5
-
Both types currently implement most of the `AbstractArray` interface and part of the `SparseArrays`
6
-
interface.
5
+
```
6
+
AbstractGBArray{T, N, F} <: AbstractSparseArray{T, N}
7
+
├ N = 2 ─ AbstractGBMatrix{T, F}
8
+
│ ├─ GBMatrix{T, F}
9
+
│ └─ OrientedGBMatrix{T, F, O}
10
+
└ N = 1 ─ AbstractGBVector{T, F}
11
+
└─ GBVector{T, F}
12
+
```
13
+
14
+
The `T` parameter is the element type of the array, `N` is the dimensionality, `F` is the type of the fill value (often `Nothing` or `T`). The [`OrientedGBMatrix`](@ref) restricts the orientation to the parameter `O` which is either `ByRow()` or `ByCol()`.
7
15
8
-
## Matrix Construction
16
+
All of these types attempt to implement most of the `AbstractArray` interface, and the relevant parts of the `SparseArrays` interface.
17
+
18
+
## GBMatrix
19
+
20
+
There are several methods to construct GBArrays. Shown here are empty construction, conversion from a dense matrix and a sparse matrix, and coordinate form with uniform or *iso* coefficients.
0 commit comments