Skip to content

Commit 2fa118a

Browse files
author
Will Kimmerer
committed
docs, rem iterator file
1 parent 777c258 commit 2fa118a

File tree

8 files changed

+27
-7
lines changed

8 files changed

+27
-7
lines changed

docs/src/arrays.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ AbstractGBArray{T, N, F} <: AbstractSparseArray{T, N}
1111
└─ GBVector{T, F}
1212
```
1313

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()`.
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` restricts the orientation to the parameter `O` which is either `ByRow()` or `ByCol()`.
1515

1616
All of these types attempt to implement most of the `AbstractArray` interface, and the relevant parts of the `SparseArrays` interface.
1717

docs/src/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ Unfortunately this has a couple problems. The first is that it's slow.\
152152
Compared to `A .+ 1` which lowers to `apply(+, A, 1)` the `map` call above is ~2.5x slower due to function pointer overhead.
153153

154154
The second is that everytime we call `map(increment, M)` we will be re-creating the function pointer for `increment` matched to the type of `M`.\
155-
To avoid this there's a convenience macro [`@unop`](@ref) which will provide a permanent constant which is used every time `increment` is called with a GraphBLAS operation. See [Operators](@ref) for more information.
155+
To avoid this the convenience macro `@unop` will provide a permanent constant which is used internally every time `increment` is called with a GraphBLAS operation. See [Operators](@ref) for more information.
156156

157157
!!! warning "Performance of User Defined Functions"
158158
Operators which are not already built-in are automatically constructed using function pointers when called.

docs/src/operators.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Basics
1+
# Operators
22

33
Operators are one of the basic objects of GraphBLAS. In Julia, however, users must only interact directly with operators on rare occasions, and should instead pass functions to GraphBLAS operations.
44

docs/src/utilities.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
```@docs
2+
setfill
3+
setfill!
4+
mask
5+
mask!
6+
gbset
7+
Descriptor
8+
SuiteSparseGraphBLAS.set_lib!
9+
clear!
10+
```

src/SuiteSparseGraphBLAS.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,8 @@ include("serialization.jl")
9696
#EXPERIMENTAL
9797
include("misc.jl")
9898
include("asjulia.jl")
99-
# include("spmgb/sparsemat.jl")
10099
include("mmread.jl")
101-
include("iterator.jl")
100+
# include("iterator.jl")
102101
include("oriented.jl")
103102

104103
export SparseArrayCompat

src/abstractgbarray.jl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -516,10 +516,22 @@ function Base.getindex(
516516
return extract(A, i, j; mask, accum, desc)
517517
end
518518

519+
"""
520+
setfill!(A::AbstractGBArray{T, N, F}, x::F)
521+
522+
Modify the fill value of `A`.
523+
The fill type of `A` and the type of `x` must be the same.
524+
"""
519525
function setfill!(A::AbstractGBArray, x)
520526
A.fill = x
521527
end
522528

529+
"""
530+
setfill(A::AbstractGBArray{T, N, F}, x::F2)
531+
532+
Create a new AbstractGBArray with the same underlying data but a new fill `x`.
533+
The fill type of `A` and the type of `x` may be different.
534+
"""
523535
function setfill(A::AbstractGBArray, x) # aliasing form.
524536
B = similar(A; fill=x)
525537
B.p = A.p

src/operations/map.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ Base.:-(u::GBArray) = apply(-, u)
123123
mask!(C::GBArray, A::GBArray, mask::GBArray)
124124
125125
Apply a mask to matrix `A`, storing the results in C.
126-
127126
"""
128127
function mask!(C::GBArray, A::GBArray, mask::GBArray; structural = false, complement = false)
129128
desc = Descriptor()

src/options.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
gbset(option, value)
44
55
Set an option either for a specific GBArray, or globally. The commonly used options are:
6-
- `:format = [:byrow | :bycol]`: The global default or array specific
6+
- `:format = [RowMajor() | ColMajor()]`: The global default or array specific
77
column major or row major ordering.
88
- `:nthreads = [Integer]`: The global number of OpenMP threads to use.
99
- `:burble = [Bool]`: Print diagnostic output.

0 commit comments

Comments
 (0)