NIKX-Tech / NIKX-Tech/numx

stats: histogram

Open
#79 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement good first issue
Dominant language
C
Stars
23
Forks
2
PR merge metrics
No merged PRs in 30d

Description

Add numx_stats_histogram to the stats module.

Contract: bin a fixed-size array into a caller-supplied number of equal-width bins over [min, max] of the data (or caller-specified range), output bin counts into a caller-provided buffer. No dynamic allocation, bounded by NUMX_MAX_VEC_SIZE like the rest of stats.

Follow CONTRIBUTING.md exactly: full Doxygen header, NULL-checks, numx_status_t return, all four deliverables (header, impl, test, docs page). Test levels per CONTRIBUTING.md: L1 known-answer, L2 property (bin counts sum to n), L3 edge cases (single bin, all-same-value data), L4 error handling.

See src/stats.c for the existing module's style (e.g. numx_stats_mean, numx_stats_percentile) to match conventions.

Contributor guide

Open the contributing guide

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

Read CONTRIBUTING.md and inspect src/stats.c, especially numx_stats_mean and numx_stats_percentile, to follow the module's conventions. Implement the header, implementation, test, and documentation page with the specified fixed-buffer contract and validation. Run the L1-L4 tests covering known answers, count-sum properties, edge cases, and errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
data
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
64/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.