SuiteSparseGraphBLAS.unaryop — Functionunaryop(fun; [xtype, ztype], [name])Create a UnaryOperator from the given function fun. Function fun must take only one parameter. It is possible to give an hint of the future use of the UnaryOperator, providing the input and the output domains, through xtype and ztype, respectively. If a name is provided, the Unary Operator is inserted in the global variable Unaryop.
Examples
julia> unaryop = unaryop((a) -> 2a, name = :DOUBLE);
julia> unaryop === Unaryop.DOUBLE
trueSuiteSparseGraphBLAS.binaryop — Functionbinaryop(fun; [xtype, ytype, ztype], [name])Create a BinaryOperator from the given function fun. Function fun must take two parameters. It is possible to give an hint of the future use of the BinaryOperator, providing the inputs and the output domains, through xtype, ytype and ztype, respectively. If a name is provided, the Binary Operator is inserted in the global variable Binaryop.
Examples
julia> binaryop = binaryop((a, b) -> a÷b, name = :DIV);
julia> binaryop === Binaryop.DIV
trueSuiteSparseGraphBLAS.monoid — Functionmonoid(bin_op, identity; [name])Create a Monoid from the associative Binary Operator bin_op and the identity value. If a name is provided, the Monoid is inserted in the global variable Monoids.
Examples
julia> binaryop = binaryop((a, b) -> a÷b);
julia> monoid = monoid(binaryop, 1, name=:DIV_MONOID);
julia> monoid === Monoids.DIV_MONOID
trueSuiteSparseGraphBLAS.semiring — Functionsemiring(add, mult; [name])Create a Semiring from the commutative and associative Monoid add and the Binary Operator mult. If a name is provided, the Semiring is inserted in the global variable Semirings.
Examples
julia> semiring = semiring(Monoids.LAND, Binaryop.EQ, name=:USER_DEFINED);
julia> semiring === Semirings.USER_DEFINED
true