Skip to content

Support specific mapreduce #301

Open
@putianyi889

Description

@putianyi889

Since sum, maximum, etc. lower to mapreduce, it might be a better idea to support mapreduce(f, op, ::AbstractFill) for op at least in (:max, :min :+, :|, :&) to support maximum, minimum, sum, any and all.

Examples:

Base.mapreduce(f, ::typeof(max), A::Fill) = f(A.value)
Base.mapreduce(f, ::typeof(+), A::Fill) = length(A)*f(A.value)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions