Skip to content

Commit c07ec89

Browse files
author
Wimmerer
committed
docs
1 parent aadcc06 commit c07ec89

18 files changed

+272
-740
lines changed

Project.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ ChainRules = "082447d4-558c-5d27-93f4-14fc19e9eca2"
99
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
1010
ChainRulesTestUtils = "cdddcdb0-9152-4a09-a978-84456f9df70a"
1111
ContextVariablesX = "6add18c4-b38d-439d-96f6-d6bc489c04c5"
12+
Latexify = "23fbe1c1-3f47-55db-b15f-69d7ec21a316"
1213
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
1314
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
1415
MacroTools = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09"

docs/Project.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
[deps]
22
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
3+
Latexify = "23fbe1c1-3f47-55db-b15f-69d7ec21a316"
34
SuiteSparseGraphBLAS = "c2e53296-7b14-11e9-1210-bddfa8111e1d"

docs/make.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using Documenter
22
using SuiteSparseGraphBLAS
3-
3+
using LinearAlgebra
44
makedocs(
55
modules = [SuiteSparseGraphBLAS],
66
sitename="SuiteSparseGraphBLAS.jl",
@@ -12,7 +12,8 @@ makedocs(
1212
"unaryops.md",
1313
"binaryops.md",
1414
"monoids.md",
15-
"semirings.md"
15+
"semirings.md",
16+
"selectops.md"
1617
]
1718
]
1819
)

docs/src/binaryops.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Binary Operators
2+
3+
## Built-Ins
4+
5+
```@autodocs
6+
Modules = [SuiteSparseGraphBLAS]
7+
Pages = ["binaryops.jl"]
8+
```

docs/src/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ BOR COPYSIGN FIRSTJ ISEQ LAND MAX POW SECO
192192

193193
## Example
194194

195-
Here is an example of several different methods of triangle counting with GraphBLAS.
195+
Here is an example of two different methods of triangle counting with GraphBLAS.
196196
The methods are drawn from the LAGraph [repo](https://github.com/GraphBLAS/LAGraph).
197197

198198
Input `A` must be a square, symmetric matrix with any element type.

docs/src/monoids.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Monoids
2+
## About
3+
4+
A monoid is made up of a set or domain $T$ and a binary operator $z = f(x, y)$ operating on the same domain, $T \times T \rightarrow T$.
5+
This binary operator must be associative, that is $f(a, f(b, c)) = f(f(a, b), c)$ is always true. Associativity is important for operations like `reduce` and the multiplication step of `mul`.
6+
7+
The operator must also be equipped with an identity such that $f(x, 0) = f(0, x) = x$. Some monoids are equipped with a terminal or annihilator such that $z = f(z, x) \forall x$.
8+
9+
## Built-Ins
10+
!!! note "Note"
11+
In the case of floating point numbers +∞ and -∞ have their typical meanings. However, for integer types they indicate `typemax` and `typemin` respectively.
12+
13+
```@autodocs
14+
Modules = [SuiteSparseGraphBLAS]
15+
Pages = ["monoids.jl"]
16+
```

docs/src/operations.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ extract
4646
extract!
4747
subassign!
4848
assign!
49-
map
49+
Base.map(::SuiteSparseGraphBLAS.AbstractOp, ::SuiteSparseGraphBLAS.GBArray, ::Any)
5050
select
51-
reduce
51+
Base.reduce
5252
gbtranspose
53-
kron
53+
LinearAlgebra.kron
5454
```

docs/src/selectops.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Select Operators
2+
## About
3+
4+
## Built-Ins
5+
6+
```@autodocs
7+
Modules = [SuiteSparseGraphBLAS]
8+
Pages = ["selectops.jl"]
9+
```

docs/src/semirings.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Semirings
2+
## About
3+
4+
A semiring in GraphBLAS is a domain $T$ along with two binary operators. The first, $\oplus$ or "add" is a commutative and associative monoid. The second, $\otimes$ or "multiply", is a binary operator `z = f(x, y)` such that the monoid type matches the type of `z`.
5+
6+
## Built-Ins
7+
```@eval
8+
using Pkg
9+
Pkg.activate("..")
10+
cd("..")
11+
using SuiteSparseGraphBLAS
12+
using Latexify
13+
head = ["Semiring", "⊕", "⊗", "Types"]
14+
v1 = filter((x) -> x != "Semirings", string.(names(Semirings)))
15+
v2 = "[" .* getindex.(split.(v1, '_'),1) .* "_MONOID](@ref)"
16+
v3 = "[" .* getindex.(split.(v1, '_'), 2) .* "](@ref)"
17+
v4 = []
18+
v1 = "`" .* v1 .* "`"
19+
for op in names(Semirings)
20+
op == :Semirings && continue
21+
op = getproperty(Semirings, op)
22+
push!(v4, SuiteSparseGraphBLAS.validtypes(op))
23+
end
24+
Latexify.mdtable(hcat(v1,v2,v3,v4); head, latex=false)
25+
```

docs/src/unaryops.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Unary Operators
22

3+
## Built-Ins
4+
35
```@autodocs
46
Modules = [SuiteSparseGraphBLAS]
57
Pages = ["unaryops.jl"]

0 commit comments

Comments
 (0)