LAGraph provides several pre-defined semirings that are initialized via LAGr_Init or LAGraph_Init and must be freed using LAGraph_Finalize. These semirings are categorized by their monoid and multiplicative operator combinations.
LAGraph_plus_first_T
Uses GrB_PLUS_MONOID_T and GrB_FIRST_T operator. Available for various types:
LAGraph_plus_first_int8
LAGraph_plus_first_int16
LAGraph_plus_first_int32
LAGraph_plus_first_int64
LAGraph_plus_first_uint8
LAGraph_plus_first_uint16
LAGraph_plus_first_uint32
LAGraph_plus_first_uint64
LAGraph_plus_first_fp32
LAGraph_plus_first_fp64
LAGraph_plus_second_T
Uses GrB_PLUS_MONOID_T and GrB_SECOND_T operator. Available for various types:
LAGraph_plus_second_int8
LAGraph_plus_second_int16
LAGraph_plus_second_int32
LAGraph_plus_second_int64
LAGraph_plus_second_uint8
LAGraph_plus_second_uint16
LAGraph_plus_second_uint32
LAGraph_plus_second_uint64
LAGraph_plus_second_fp32
LAGraph_plus_second_fp64
LAGraph_plus_one_T
Uses GrB_PLUS_MONOID_T and GrB_ONEB_T operator. Available for various types:
LAGraph_plus_one_int8
LAGraph_plus_one_int16
LAGraph_plus_one_int32
LAGraph_plus_one_int64
LAGraph_plus_one_uint8
LAGraph_plus_one_uint16
LAGraph_plus_one_uint32
LAGraph_plus_one_uint64
LAGraph_plus_one_fp32
LAGraph_plus_one_fp64
LAGraph_any_one_T
Uses GrB_MIN_MONOID_T (for non-boolean) or GrB_LOR_MONOID_BOOL (for boolean) and the GrB_ONEB_T operator. These are ideal for unweighted graphs or algorithms operating on sparsity structure.
LAGraph_any_one_bool
LAGraph_any_one_int8
LAGraph_any_one_int16
LAGraph_any_one_int32
LAGraph_any_one_int64
LAGraph_any_one_uint8
LAGraph_any_one_uint16
LAGraph_any_one_uint32
LAGraph_any_one_uint64
LAGraph_any_one_fp32
LAGraph_any_one_fp64