JuliaApproximation / JuliaApproximation/DomainSets.jl

clamp() and clamp!()

Open
#115 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
79
Forks
12
Avg merge
6d 22h
Merged PRs (30d)
2

Description

An important operation for reinforcement learning contexts is to clamp an input to the nearest point within a set. Does anyone have objections to implementing Base.clamp and Base.clamp! for some sets in this package?

This would be similar to what is currently implemented in IntervalSets: clamp(3, 1..2) returns 2.

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 comparing the proposed Base.clamp and Base.clamp! APIs with the existing IntervalSets behavior, including clamp(3, 1..2). Determine which set types in this package should support the operation and what nearest-point behavior means for each; done means the supported sets have consistent semantics and coverage for representative cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.