Skip to content

Commit 5e79adb

Browse files
add basic documentation for descriptor and algebra methods
1 parent cbc3341 commit 5e79adb

File tree

2 files changed

+17
-7
lines changed

2 files changed

+17
-7
lines changed

src/Object_Methods/Algebra_Methods.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
22
GrB_BinaryOp_new(op, fn, ztype, xtype, ytype)
33
4-
Initializes a new GraphBLAS binary operator with a specified user-defined function and its types.
4+
Initialize a new GraphBLAS binary operator with a specified user-defined function and its types.
55
66
# Examples
77
```jldoctest
@@ -75,7 +75,7 @@ end
7575
"""
7676
GrB_UnaryOp_new(op, fn, ztype, xtype, ytype)
7777
78-
Initializes a new GraphBLAS unary operator with a specified user-defined function and its types.
78+
Initialize a new GraphBLAS unary operator with a specified user-defined function and its types.
7979
"""
8080
function GrB_UnaryOp_new(
8181
op::GrB_UnaryOp,
@@ -105,7 +105,7 @@ end
105105
"""
106106
GrB_Monoid_new(monoid, binary_op, identity)
107107
108-
Creates a new monoid with specified binary operator and identity value.
108+
Create a new monoid with specified binary operator and identity value.
109109
"""
110110
function GrB_Monoid_new(monoid::GrB_Monoid, binary_op::GrB_BinaryOp, identity::T) where T <: valid_int_types
111111
monoid_ptr = pointer_from_objref(monoid)
@@ -152,7 +152,7 @@ end
152152
"""
153153
GrB_Semiring_new(semiring, monoid, binary_op)
154154
155-
Creates a new semiring with specified monoid and binary operator.
155+
Create a new semiring with specified monoid and binary operator.
156156
"""
157157
function GrB_Semiring_new(semiring::GrB_Semiring, monoid::GrB_Monoid, binary_op::GrB_BinaryOp)
158158
semiring_ptr = pointer_from_objref(semiring)

src/Object_Methods/Descriptor_Methods.jl

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1-
function GrB_Descriptor_new(descriptor::GrB_Descriptor)
2-
desc_ptr = pointer_from_objref(descriptor)
3-
1+
"""
2+
GrB_Descriptor_new(desc)
3+
4+
Create a new (empty or default) descriptor.
5+
"""
6+
function GrB_Descriptor_new(desc::GrB_Descriptor)
7+
desc_ptr = pointer_from_objref(desc)
8+
49
return GrB_Info(
510
ccall(
611
dlsym(graphblas_lib, "GrB_Descriptor_new"),
@@ -11,6 +16,11 @@ function GrB_Descriptor_new(descriptor::GrB_Descriptor)
1116
)
1217
end
1318

19+
"""
20+
GrB_Descriptor_set(desc, field, val)
21+
22+
Set the content for a field for an existing descriptor.
23+
"""
1424
function GrB_Descriptor_set(desc::GrB_Descriptor, field::GrB_Desc_Field, val::GrB_Desc_Value)
1525
return GrB_Info(
1626
ccall(

0 commit comments

Comments
 (0)