Skip to content

Commit 55dcad1

Browse files
committed
style: align stats/base/dists/chi/cdf README with namespace conventions
Restructured the README so the C APIs block is a top-level section after the JavaScript Examples, matching the pattern followed by 9/10 native-addon siblings in `stats/base/dists/chi`. Closes the outer `<section class="usage">` after the `cdf.factory` subsection, adds the JavaScript `## Examples` section, then wraps the C APIs in `<section class="c">` with `## C APIs` (previously `### C APIs`, nested inside the JS usage section) and promotes the C `### Usage` heading from `#### Usage` to match the majority conformance (90% of sibling native-addon packages). Docs-only change; no source, tests, examples, or public API affected. https://claude.ai/code/session_01FXfscMHk9EUo3WE1FJswD5
1 parent 40db61d commit 55dcad1

1 file changed

Lines changed: 36 additions & 28 deletions

File tree

  • lib/node_modules/@stdlib/stats/base/dists/chi/cdf

lib/node_modules/@stdlib/stats/base/dists/chi/cdf/README.md

Lines changed: 36 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,42 @@ y = mycdf( 1.5 );
121121
// returns ~0.478
122122
```
123123

124+
</section>
125+
126+
<!-- /.usage -->
127+
128+
<section class="examples">
129+
130+
## Examples
131+
132+
<!-- eslint no-undef: "error" -->
133+
134+
```javascript
135+
var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
136+
var uniform = require( '@stdlib/random/array/uniform' );
137+
var logEachMap = require( '@stdlib/console/log-each-map' );
138+
var cdf = require( '@stdlib/stats/base/dists/chi/cdf' );
139+
140+
var opts = {
141+
'dtype': 'float64'
142+
};
143+
var x = uniform( 20, 0.0, 10.0, opts );
144+
var k = discreteUniform( 20, 0, 10, opts );
145+
146+
logEachMap( 'x: %0.4f, k: %d, F(x;k): %0.4f', x, k, cdf );
147+
```
148+
149+
</section>
150+
151+
<!-- /.examples -->
152+
153+
<!-- C interface documentation. -->
154+
124155
* * *
125156

126-
### C APIs
157+
<section class="c">
158+
159+
## C APIs
127160

128161
<!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. -->
129162

@@ -137,7 +170,7 @@ y = mycdf( 1.5 );
137170

138171
<section class="usage">
139172

140-
#### Usage
173+
### Usage
141174

142175
```c
143176
#include "stdlib/stats/base/dists/chi/cdf.h"
@@ -213,32 +246,7 @@ int main( void ) {
213246

214247
</section>
215248

216-
<!-- /.usage -->
217-
218-
<section class="examples">
219-
220-
## Examples
221-
222-
<!-- eslint no-undef: "error" -->
223-
224-
```javascript
225-
var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
226-
var uniform = require( '@stdlib/random/array/uniform' );
227-
var logEachMap = require( '@stdlib/console/log-each-map' );
228-
var cdf = require( '@stdlib/stats/base/dists/chi/cdf' );
229-
230-
var opts = {
231-
'dtype': 'float64'
232-
};
233-
var x = uniform( 20, 0.0, 10.0, opts );
234-
var k = discreteUniform( 20, 0, 10, opts );
235-
236-
logEachMap( 'x: %0.4f, k: %d, F(x;k): %0.4f', x, k, cdf );
237-
```
238-
239-
</section>
240-
241-
<!-- /.examples -->
249+
<!-- /.c -->
242250

243251
<!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->
244252

0 commit comments

Comments
 (0)