Skip to content

Commit 1613da8

Browse files
update docs
1 parent db1771e commit 1613da8

File tree

14 files changed

+240
-404
lines changed

14 files changed

+240
-404
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ deps/deps.jl
33
*.log
44
docs/build/
55
docs/site/
6+
.vscode

src/SuiteSparseGraphBLAS.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ export findnz, nnz, LowerTriangular, UpperTriangular, Diagonal, dropzeros!
5555
# Extensions to the spec
5656
export
5757
# Print macros
58-
@GxB_UnaryOp_fprint, @GxB_BinaryOp_fprint, @GxB_Monoid_fprint, @GxB_Semiring_fprint,
59-
@GxB_Matrix_fprint, @GxB_Vector_fprint, @GxB_Descriptor_fprint, @GxB_fprint,
58+
@GxB_fprint,
6059
# Select Operations
6160
GxB_Vector_select, GxB_Matrix_select, GxB_select,
6261
# Print-level enum

src/object_methods/algebraic.jl

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,11 @@ GrB_SUCCESS::GrB_Info = 0
4747
4848
julia> @GxB_fprint(w, GxB_COMPLETE)
4949
50-
GraphBLAS vector: w
51-
nrows: 3 ncols: 1 max # entries: 2
52-
format: standard CSC vlen: 3 nvec_nonempty: 1 nvec: 1 plen: 1 vdim: 1
53-
hyper_ratio 0.0625
54-
GraphBLAS type: int64_t size: 8
55-
number of entries: 2
56-
column: 0 : 2 entries [0:1]
57-
row 0: int64 -10
58-
row 2: int64 -20
50+
3x1 GraphBLAS int64_t vector, sparse by col:
51+
w, 2 entries
52+
53+
(0,0) -10
54+
(2,0) -20
5955
```
6056
"""
6157
function GrB_UnaryOp_new(
@@ -118,17 +114,13 @@ GrB_SUCCESS::GrB_Info = 0
118114
julia> GrB_Vector_build(V, I, X, n, dup)
119115
GrB_SUCCESS::GrB_Info = 0
120116
121-
julia> @GxB_Vector_fprint(V, GxB_COMPLETE) # the value stored at position 0 and 3 will be the sum of the duplicate values
122-
123-
GraphBLAS vector: V
124-
nrows: 4 ncols: 1 max # entries: 2
125-
format: standard CSC vlen: 4 nvec_nonempty: 1 nvec: 1 plen: 1 vdim: 1
126-
hyper_ratio 0.0625
127-
GraphBLAS type: double size: 8
128-
number of entries: 2
129-
column: 0 : 2 entries [0:1]
130-
row 0: double 5.3
131-
row 3: double 9.5
117+
julia> @GxB_fprint(V, GxB_COMPLETE)
118+
119+
4x1 GraphBLAS double vector, sparse by col:
120+
V, 2 entries
121+
122+
(0,0) 5.3
123+
(3,0) 9.5
132124
```
133125
"""
134126
function GrB_BinaryOp_new(

src/object_methods/free.jl

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,12 @@ GrB_SUCCESS::GrB_Info = 0
2727
2828
julia> @GxB_fprint(w, GxB_COMPLETE)
2929
30-
GraphBLAS vector: w
31-
nrows: 5 ncols: 1 max # entries: 3
32-
format: standard CSC vlen: 5 nvec_nonempty: 1 nvec: 1 plen: 1 vdim: 1
33-
hyper_ratio 0.0625
34-
GraphBLAS type: int64_t size: 8
35-
number of entries: 3
36-
column: 0 : 3 entries [0:2]
37-
row 0: int64 10
38-
row 2: int64 20
39-
row 4: int64 30
30+
5x1 GraphBLAS int64_t vector, sparse by col:
31+
w, 3 entries
32+
33+
(0,0) 10
34+
(2,0) 20
35+
(4,0) 30
4036
4137
4238
julia> GrB_free(w)

src/object_methods/matrix.jl

Lines changed: 20 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -58,22 +58,16 @@ julia> I = ZeroBasedIndex[1, 2, 2, 2, 3]; J = ZeroBasedIndex[1, 2, 1, 3, 3]; X =
5858
julia> GrB_Matrix_build(MAT, I, J, X, n, GrB_FIRST_INT8)
5959
GrB_SUCCESS::GrB_Info = 0
6060
61-
julia> @GxB_Matrix_fprint(MAT, GxB_COMPLETE)
62-
63-
GraphBLAS matrix: MAT
64-
nrows: 4 ncols: 4 max # entries: 5
65-
format: standard CSR vlen: 4 nvec_nonempty: 3 nvec: 4 plen: 4 vdim: 4
66-
hyper_ratio 0.0625
67-
GraphBLAS type: int8_t size: 1
68-
number of entries: 5
69-
row: 1 : 1 entries [0:0]
70-
column 1: int8 2
71-
row: 2 : 3 entries [1:3]
72-
column 1: int8 4
73-
column 2: int8 3
74-
column 3: int8 5
75-
row: 3 : 1 entries [4:4]
76-
column 3: int8 6
61+
julia> @GxB_fprint(MAT, GxB_COMPLETE)
62+
63+
4x4 GraphBLAS int8_t matrix, sparse by row:
64+
MAT, 5 entries
65+
66+
(1,1) 2
67+
(2,1) 4
68+
(2,2) 3
69+
(2,3) 5
70+
(3,3) 6
7771
```
7872
"""
7973
function GrB_Matrix_build(C::GrB_Matrix{T}, I::ZeroBasedIndices, J::ZeroBasedIndices, X::Vector{T}, nvals::Union{Int64, UInt64}, dup::GrB_BinaryOp) where T
@@ -245,22 +239,16 @@ GrB_Matrix{Int8}
245239
julia> GrB_Matrix_dup(B, MAT)
246240
GrB_SUCCESS::GrB_Info = 0
247241
248-
julia> @GxB_Matrix_fprint(B, GxB_COMPLETE)
249-
250-
GraphBLAS matrix: B
251-
nrows: 4 ncols: 4 max # entries: 5
252-
format: standard CSR vlen: 4 nvec_nonempty: 3 nvec: 4 plen: 4 vdim: 4
253-
hyper_ratio 0.0625
254-
GraphBLAS type: int8_t size: 1
255-
number of entries: 5
256-
row: 1 : 1 entries [0:0]
257-
column 1: int8 2
258-
row: 2 : 3 entries [1:3]
259-
column 1: int8 4
260-
column 2: int8 3
261-
column 3: int8 5
262-
row: 3 : 1 entries [4:4]
263-
column 3: int8 6
242+
julia> @GxB_fprint(B, GxB_COMPLETE)
243+
244+
4x4 GraphBLAS int8_t matrix, sparse by row:
245+
B, 5 entries
246+
247+
(1,1) 2
248+
(2,1) 4
249+
(2,2) 3
250+
(2,3) 5
251+
(3,3) 6
264252
```
265253
"""
266254
function GrB_Matrix_dup(C::GrB_Matrix{T}, A::GrB_Matrix{T}) where T

src/object_methods/vector.jl

Lines changed: 16 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -63,18 +63,14 @@ GrB_Vector{Int64}
6363
julia> GrB_Vector_dup(B, V)
6464
GrB_SUCCESS::GrB_Info = 0
6565
66-
julia> @GxB_Vector_fprint(B, GxB_COMPLETE)
67-
68-
GraphBLAS vector: B
69-
nrows: 5 ncols: 1 max # entries: 3
70-
format: standard CSC vlen: 5 nvec_nonempty: 1 nvec: 1 plen: 1 vdim: 1
71-
hyper_ratio 0.0625
72-
GraphBLAS type: int64_t size: 8
73-
number of entries: 3
74-
column: 0 : 3 entries [0:2]
75-
row 1: int64 2
76-
row 2: int64 32
77-
row 4: int64 4
66+
julia> @GxB_fprint(B, GxB_COMPLETE)
67+
68+
5x1 GraphBLAS int64_t vector, sparse by col:
69+
B, 3 entries
70+
71+
(1,0) 2
72+
(2,0) 32
73+
(4,0) 4
7874
```
7975
"""
8076
function GrB_Vector_dup(w::GrB_Vector{T}, u::GrB_Vector{T}) where T
@@ -241,18 +237,14 @@ julia> I = ZeroBasedIndex[0, 2, 3]; X = [2.1, 3.2, 4.4]; n = 3;
241237
julia> GrB_Vector_build(V, I, X, n, GrB_FIRST_FP64)
242238
GrB_SUCCESS::GrB_Info = 0
243239
244-
julia> @GxB_Vector_fprint(V, GxB_COMPLETE)
245-
246-
GraphBLAS vector: V
247-
nrows: 4 ncols: 1 max # entries: 3
248-
format: standard CSC vlen: 4 nvec_nonempty: 1 nvec: 1 plen: 1 vdim: 1
249-
hyper_ratio 0.0625
250-
GraphBLAS type: double size: 8
251-
number of entries: 3
252-
column: 0 : 3 entries [0:2]
253-
row 0: double 2.1
254-
row 2: double 3.2
255-
row 3: double 4.4
240+
julia> @GxB_fprint(V, GxB_COMPLETE)
241+
242+
4x1 GraphBLAS double vector, sparse by col:
243+
V, 3 entries
244+
245+
(0,0) 2.1
246+
(2,0) 3.2
247+
(3,0) 4.4
256248
```
257249
"""
258250
function GrB_Vector_build(w::GrB_Vector{T}, I::ZeroBasedIndices, X::Vector{T}, nvals::Union{Int64, UInt64}, dup::GrB_BinaryOp) where T

src/operations/apply.jl

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,11 @@ GrB_SUCCESS::GrB_Info = 0
4242
4343
julia> @GxB_fprint(w, GxB_COMPLETE)
4444
45-
GraphBLAS vector: w
46-
nrows: 3 ncols: 1 max # entries: 2
47-
format: standard CSC vlen: 3 nvec_nonempty: 1 nvec: 1 plen: 1 vdim: 1
48-
hyper_ratio 0.0625
49-
GraphBLAS type: int64_t size: 8
50-
number of entries: 2
51-
column: 0 : 2 entries [0:1]
52-
row 0: int64 -10
53-
row 2: int64 -20
45+
3x1 GraphBLAS int64_t vector, sparse by col:
46+
w, 2 entries
47+
48+
(0,0) -10
49+
(2,0) -20
5450
```
5551
"""
5652
function GrB_Vector_apply( # w<mask> = accum (w, op(u))
@@ -106,17 +102,12 @@ GrB_SUCCESS::GrB_Info = 0
106102
107103
julia> @GxB_fprint(B, GxB_COMPLETE)
108104
109-
GraphBLAS matrix: B
110-
nrows: 2 ncols: 2 max # entries: 3
111-
format: standard CSR vlen: 2 nvec_nonempty: 2 nvec: 2 plen: 2 vdim: 2
112-
hyper_ratio 0.0625
113-
GraphBLAS type: int64_t size: 8
114-
number of entries: 3
115-
row: 0 : 2 entries [0:1]
116-
column 0: int64 -10
117-
column 1: int64 -20
118-
row: 1 : 1 entries [2:2]
119-
column 1: int64 -30
105+
2x2 GraphBLAS int64_t matrix, sparse by row:
106+
B, 3 entries
107+
108+
(0,0) -10
109+
(0,1) -20
110+
(1,1) -30
120111
```
121112
"""
122113
function GrB_Matrix_apply( # C<Mask> = accum (C, op(A)) or op(A')

src/operations/assign.jl

Lines changed: 38 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -111,20 +111,15 @@ GrB_SUCCESS::GrB_Info = 0
111111
julia> GrB_wait()
112112
GrB_SUCCESS::GrB_Info = 0
113113
114-
julia> @GxB_Matrix_fprint(C, GxB_COMPLETE)
115-
116-
GraphBLAS matrix: C
117-
nrows: 4 ncols: 4 max # entries: 4
118-
format: standard CSR vlen: 4 nvec_nonempty: 2 nvec: 4 plen: 4 vdim: 4
119-
hyper_ratio 0.0625
120-
GraphBLAS type: int64_t size: 8
121-
number of entries: 4
122-
row: 0 : 2 entries [0:1]
123-
column 1: int64 10
124-
column 2: int64 20
125-
row: 2 : 2 entries [2:3]
126-
column 0: int64 30
127-
column 2: int64 40
114+
julia> @GxB_fprint(C, GxB_COMPLETE)
115+
116+
4x4 GraphBLAS int64_t matrix, sparse by row:
117+
C, 4 entries
118+
119+
(0,1) 10
120+
(0,2) 20
121+
(2,0) 30
122+
(2,2) 40
128123
```
129124
"""
130125
function GrB_Matrix_assign( # C<Mask>(I,J) = accum (C(I,J),A)
@@ -215,22 +210,16 @@ GrB_SUCCESS::GrB_Info = 0
215210
julia> GrB_wait()
216211
GrB_SUCCESS::GrB_Info = 0
217212
218-
julia> @GxB_Matrix_fprint(A, GxB_COMPLETE)
219-
220-
GraphBLAS matrix: A
221-
nrows: 4 ncols: 4 max # entries: 7
222-
format: standard CSR vlen: 4 nvec_nonempty: 3 nvec: 4 plen: 4 vdim: 4
223-
hyper_ratio 0.0625
224-
GraphBLAS type: int64_t size: 8
225-
number of entries: 5
226-
row: 0 : 2 entries [0:1]
227-
column 1: int64 10
228-
column 2: int64 20
229-
row: 1 : 1 entries [2:2]
230-
column 0: int64 5
231-
row: 2 : 2 entries [3:4]
232-
column 0: int64 6
233-
column 2: int64 40
213+
julia> @GxB_fprint(A, GxB_COMPLETE)
214+
215+
4x4 GraphBLAS int64_t matrix, sparse by row:
216+
A, 5 entries
217+
218+
(0,1) 10
219+
(0,2) 20
220+
(1,0) 5
221+
(2,0) 6
222+
(2,2) 40
234223
```
235224
"""
236225
function GrB_Col_assign( # C<mask>(I,j) = accum (C(I,j),u)
@@ -307,21 +296,16 @@ GrB_SUCCESS::GrB_Info = 0
307296
julia> GrB_wait()
308297
GrB_SUCCESS::GrB_Info = 0
309298
310-
julia> @GxB_Matrix_fprint(A, GxB_COMPLETE)
311-
312-
GraphBLAS matrix: A
313-
nrows: 4 ncols: 4 max # entries: 7
314-
format: standard CSR vlen: 4 nvec_nonempty: 2 nvec: 4 plen: 4 vdim: 4
315-
hyper_ratio 0.0625
316-
GraphBLAS type: int64_t size: 8
317-
number of entries: 5
318-
row: 0 : 3 entries [0:2]
319-
column 1: int64 5
320-
column 2: int64 20
321-
column 3: int64 6
322-
row: 2 : 2 entries [3:4]
323-
column 0: int64 30
324-
column 2: int64 40
299+
julia> @GxB_fprint(A, GxB_COMPLETE)
300+
301+
4x4 GraphBLAS int64_t matrix, sparse by row:
302+
A, 5 entries
303+
304+
(0,1) 5
305+
(0,2) 20
306+
(0,3) 6
307+
(2,0) 30
308+
(2,2) 40
325309
```
326310
"""
327311
function GrB_Row_assign( # C<mask'>(i,J) = accum (C(i,J),u')
@@ -501,20 +485,15 @@ GrB_SUCCESS::GrB_Info = 0
501485
julia> GrB_wait()
502486
GrB_SUCCESS::GrB_Info = 0
503487
504-
julia> @GxB_Matrix_fprint(A, GxB_COMPLETE)
505-
506-
GraphBLAS matrix: A
507-
nrows: 4 ncols: 4 max # entries: 4
508-
format: standard CSR vlen: 4 nvec_nonempty: 2 nvec: 4 plen: 4 vdim: 4
509-
hyper_ratio 0.0625
510-
GraphBLAS type: bool size: 1
511-
number of entries: 4
512-
row: 0 : 2 entries [0:1]
513-
column 0: bool 1
514-
column 1: bool 1
515-
row: 1 : 2 entries [2:3]
516-
column 0: bool 1
517-
column 1: bool 1
488+
julia> @GxB_fprint(A, GxB_COMPLETE)
489+
490+
4x4 GraphBLAS bool matrix, sparse by row:
491+
A, 4 entries
492+
493+
(0,0) 1
494+
(0,1) 1
495+
(1,0) 1
496+
(1,1) 1
518497
```
519498
"""
520499
function GrB_Matrix_assign( # C<Mask>(I,J) = accum (C(I,J),x)

0 commit comments

Comments
 (0)