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/index.md
+31-35Lines changed: 31 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,11 +9,10 @@ While the core library is mostly complete, and all GraphBLAS functionality is pr
9
9
10
10
1. ChainRules.jl integration for AD.
11
11
2. Complete SparseArrays and ArrayInterface interfaces.
12
-
3. Import and Export in all formats including bitmap and csr. Currently only dense and csc are supported.
13
-
4. Printing v2.
14
-
5. User-defined types and functions.
15
-
6. Alternative syntax for GraphBLAS ops (currently must use `BinaryOps.PLUS` instead of `+`).
16
-
7. Complex builtins.
12
+
3. Printing v2.
13
+
4. User-defined types and functions.
14
+
5. Alternative syntax for GraphBLAS ops (currently must use `BinaryOps.PLUS` instead of `+`).
15
+
6. Complex builtins.
17
16
18
17
Once these are completed there will be a v1.0 release, with the goal being JuliaCon 2021.
19
18
@@ -47,7 +46,7 @@ The SuiteSparse:GraphBLAS binary is installed automatically as `SSGraphBLAS_jll`
47
46
48
47
# Introduction
49
48
50
-
GraphBLAS harnesses the well-understood duality between graphs and matrices.
49
+
GraphBLAS harnesses the well-understood duality between graphs and matrices.
51
50
Specifically a graph can be represented by its [adjacency matrix](https://en.wikipedia.org/wiki/Adjacency_matrix), [incidence matrix](https://en.wikipedia.org/wiki/Incidence_matrix), or the many variations on those formats.
52
51
With this matrix representation in hand we have a method to operate on the graph using linear algebra operations on the matrix.
53
52
@@ -104,8 +103,8 @@ v = GBVector([4], [10])
104
103
```
105
104
## GraphBLAS Operations
106
105
107
-
A complete list of supported operations can be found in [Operations](@ref).
108
-
GraphBLAS operations are, where possible, wrapped in existing Julia functions. The equivalent Julia functions are:
106
+
The complete documentation of supported operations can be found in [Operations](@ref).
107
+
GraphBLAS operations are, where possible, methods of existing Julia functions listed in the third column.
@@ -126,25 +125,15 @@ GraphBLAS operations are, where possible, wrapped in existing Julia functions. T
126
125
127
126
where ``\bf M`` is a `GBArray` mask, ``\odot`` is a binary operator for accumulating into ``\bf C``, and ``\otimes`` and ``\oplus`` are a binary operation and commutative monoid respectively.
128
127
129
-
!!! note "assign vs subassign"
130
-
131
-
`subassign` is equivalent to `assign` except that the mask in `subassign` has the dimensions of ``\bf C(I,J)`` vs the dimensions of ``C`` for `assign`, and elements outside of the mask will never be modified by `subassign`.
132
-
133
128
### Common arguments
134
129
135
-
The operations above have a typical set of common arguments. These are:
130
+
The operations above have often accept most or all of the following arguments.
136
131
137
-
#### `op` - `UnaryOp`, `BinaryOp`, `Monoid`, or `Semiring`:
132
+
#### `op` - `UnaryOp`, `BinaryOp`, `Monoid`, `Semiring`, or `SelectOp`:
138
133
139
-
This is the key argument to most of these operations, which determines ``\oplus``, ``\otimes``, or ``f`` in the table above as well as the semiring used in `mul`.
134
+
This is the most important argument for most of these operations. It determines ``\oplus``, ``\otimes``, or ``f`` in the table above as well as the semiring used in `mul`.
140
135
Most operations are restricted to one type of operator.
141
136
142
-
!!! warning "Keyword vs Positional"
143
-
For some operations like `mul` and `emul` this is a keyword argument which defaults to the typical arithmetic operators.
144
-
For others like `map` this is the first argument, since there is no sensible default choice.
145
-
146
-
147
-
148
137
!!! tip "Built-Ins"
149
138
The built-in operators can be found in the submodules: `UnaryOps`, `BinaryOps`, `Monoids`, and `Semirings`.
150
139
@@ -157,12 +146,12 @@ The descriptor argument allows the user to modify the operation in some fashion.
157
146
Transposes the inputs and can be found in `Descriptors.[T0 | T1 | T0T1]`.
158
147
Typically you should use Julia's built-in transpose functionality.
If `STRUCTURE` is set the operation will use the presence of a value rather than the value itself to determine whether the index is masked.
163
152
If `COMPLEMENT` is set the presence/truth value is complemented (ie. if **no** value is present or the value is **false** that index is masked).
164
153
165
-
-`desc.output` == [DEFAULT | REPLACE]
154
+
-`desc.output == [DEFAULT | REPLACE]`
166
155
167
156
If `REPLACE` is set the operation will replace all values in the output matrix **after** the accumulation step.
168
157
If an index is found in the output matrix, but not in the results of the operation it will be set to `nothing`.
@@ -177,18 +166,7 @@ The accumulation step is performed **before** masking.
177
166
178
167
The `mask` keyword argument determines whether each index from the result of an operation appears in the output.
179
168
The mask may be structural, where the presence of a value indicates the mask is `true`, or valued where the value of the mask indicates its truth value.
180
-
The mask may also be complemented.
181
-
182
-
183
-
### Order of Operations
184
-
185
-
A GraphBLAS operation occurs in the following order (steps are skipped when possible):
|`mxm`, `mxv`, `vxm`|``\bf C \langle M \rangle = C \odot AB``|`mul[!]`|
10
+
|`eWiseMult`|``\bf C \langle M \rangle = C \odot (A \otimes B)``|`emul[!]`|
11
+
|`eWiseAdd`|``\bf C \langle M \rangle = C \odot (A \oplus B)``|`eadd[!]`|
12
+
|`extract`|``\bf C \langle M \rangle = C \odot A(I,J)``|`extract[!]`, `getindex`|
13
+
|`subassign`|``\bf C (I,J) \langle M \rangle = C(I,J) \odot A``|`subassign[!]`, `setindex!`|
14
+
|`assign`|``\bf C \langle M \rangle (I,J) = C(I,J) \odot A``|`assign[!]`|
15
+
|`apply`|``{\bf C \langle M \rangle = C \odot} f{\bf (A)}``|`map[!]`|
16
+
||``{\bf C \langle M \rangle = C \odot} f({\bf A},y)``||
17
+
||``{\bf C \langle M \rangle = C \odot} f(x,{\bf A})``||
18
+
|`select`|``{\bf C \langle M \rangle = C \odot} f({\bf A},k)``|`select[!]`|
19
+
|`reduce`|``{\bf w \langle m \rangle = w \odot} [{\oplus}_j {\bf A}(:,j)]``|`reduce[!]`|
20
+
||``s = s \odot [{\oplus}_{ij} {\bf A}(i,j)]``||
21
+
|`transpose`|``\bf C \langle M \rangle = C \odot A^{\sf T}``|`gbtranspose[!]`, lazy: `transpose`, `'`|
22
+
|`kronecker`|``\bf C \langle M \rangle = C \odot \text{kron}(A, B)``|`kron[!]`|
23
+
24
+
where ``\bf M`` is a `GBArray` mask, ``\odot`` is a binary operator for accumulating into ``\bf C``, and ``\otimes`` and ``\oplus`` are a binary operation and commutative monoid respectively.
25
+
26
+
!!! note "assign vs subassign"
27
+
`subassign` is equivalent to `assign` except that the mask in `subassign` has the dimensions of ``\bf C(I,J)`` vs the dimensions of ``C`` for `assign`, and elements outside of the mask will never be modified by `subassign`. See the [GraphBLAS User Guide](https://github.com/DrTimothyAldenDavis/GraphBLAS/blob/stable/Doc/GraphBLAS_UserGuide.pdf) for more details.
28
+
29
+
## Order of Operations
30
+
31
+
A GraphBLAS operation occurs in the following order (steps are skipped when possible):
0 commit comments