Skip to content

support AbstractVector #41

@stevengj

Description

@stevengj

Rather than declaring arguments (and struct fields) as Vector{IntPoint}, it would be more generic to allow AbstractVector{IntPoint}. This can still be passed to C libraries as long as it supports a pointer conversion, and you could check that the stride(array,1) == 1 so that it is contiguous — these will throw a MethodError for array types that don't support these operations.

(It also might be convenient to use const IntPoint = SVector{2,Int64}.)

See also this discourse discussion

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