JuliaArrays / JuliaArrays/StaticArrays.jl

Provide isless

Open
#367 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature good first issue
Dominant language
Julia
Stars
844
Forks
159
Avg merge
3d 21h
Merged PRs (30d)
3

Description

For tuples there is

(1, 2) < (1, 3) #true

Would it make sense to have it for SVectors as well?

SVector(1, 2) < SVector(1, 3) # ERROR: MethodError: no method matching isless(::SVector{2,Int64}, ::SVector{2,Int64})

My use case is to sort a long Vector of small SVector elements.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the SVector implementation and any existing comparison methods, then compare its behavior with Julia tuple ordering and isless. Reproduce the SVector{2,Int64} example and add coverage for lexicographic ordering and sorting if the project’s existing tests provide a suitable entry point. Done means isless supports the shown SVector comparison without the MethodError.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
data
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.