Skip to content

Commit df316f2

Browse files
committed
fix: incorrect readme edit fix
1 parent 3fba831 commit df316f2

File tree

2 files changed

+92
-95
lines changed

2 files changed

+92
-95
lines changed

lib/node_modules/@stdlib/stats/base/dists/invgamma/README.md

Lines changed: 0 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -174,101 +174,6 @@ console.log( 'Difference: %s', abs( invGammaCDF - gammaCDF ) );
174174

175175
<!-- /.examples -->
176176

177-
<!-- C interface documentation. -->
178-
179-
* * *
180-
181-
<section class="c">
182-
183-
## C APIs
184-
185-
<!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. -->
186-
187-
<section class="intro">
188-
189-
</section>
190-
191-
<!-- /.intro -->
192-
193-
<!-- C usage documentation. -->
194-
195-
<section class="usage">
196-
197-
### Usage
198-
199-
```c
200-
#include "stdlib/stats/base/dists/invgamma/variance.h"
201-
```
202-
203-
#### stdlib_base_dists_invgamma_variance( alpha, beta )
204-
205-
Returns the variance of an inverse gamma distribution.
206-
207-
```c
208-
double out = stdlib_base_dists_invgamma_variance( 3.0, 5.0 );
209-
// returns ~6.25
210-
```
211-
212-
The function accepts the following arguments:
213-
214-
- **alpha**: `[in] double` shape parameter.
215-
- **beta**: `[in] double` rate parameter.
216-
217-
```c
218-
double stdlib_base_dists_invgamma_variance( const double alpha, const double beta );
219-
```
220-
221-
</section>
222-
223-
<!-- /.usage -->
224-
225-
<!-- C API usage notes. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
226-
227-
<section class="notes">
228-
229-
</section>
230-
231-
<!-- /.notes -->
232-
233-
<!-- C API usage examples. -->
234-
235-
<section class="examples">
236-
237-
### Examples
238-
239-
```c
240-
#include "stdlib/stats/base/dists/invgamma/variance.h"
241-
#include <stdlib.h>
242-
#include <stdio.h>
243-
244-
static double random_uniform( const double min, const double max ) {
245-
double v = (double)rand() / ( (double)RAND_MAX + 1.0 );
246-
return min + ( v*(max-min) );
247-
}
248-
249-
int main( void ) {
250-
double alpha;
251-
double beta;
252-
double y;
253-
int i;
254-
255-
for ( i = 0; i < 25; i++ ) {
256-
alpha = random_uniform( 0.0, 20.0 );
257-
beta = random_uniform( 0.0, 20.0 );
258-
y = stdlib_base_dists_invgamma_variance( alpha, beta );
259-
printf( "α: %lf, β: %lf, Var(X;α,β): %lf\n", alpha, beta, y );
260-
}
261-
}
262-
```
263-
264-
</section>
265-
266-
<!-- /.examples -->
267-
268-
</section>
269-
270-
<!-- /.c -->
271-
272177
<!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->
273178

274179
<section class="related">

lib/node_modules/@stdlib/stats/base/dists/invgamma/variance/README.md

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,98 @@ for ( i = 0; i < 10; i++ ) {
144144

145145
<!-- /.examples -->
146146

147+
<!-- C interface documentation. -->
148+
149+
* * *
150+
151+
<section class="c">
152+
153+
## C APIs
154+
155+
<!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. -->
156+
157+
<section class="intro">
158+
159+
</section>
160+
161+
<!-- /.intro -->
162+
163+
<!-- C usage documentation. -->
164+
165+
<section class="usage">
166+
167+
### Usage
168+
169+
```c
170+
#include "stdlib/stats/base/dists/invgamma/variance.h"
171+
```
172+
173+
#### stdlib_base_dists_invgamma_variance( alpha, beta )
174+
175+
Returns the variance of an inverse gamma distribution.
176+
177+
```c
178+
double out = stdlib_base_dists_invgamma_variance( 3.0, 5.0 );
179+
// returns ~6.25
180+
```
181+
182+
The function accepts the following arguments:
183+
184+
- **alpha**: `[in] double` shape parameter.
185+
- **beta**: `[in] double` rate parameter.
186+
187+
```c
188+
double stdlib_base_dists_invgamma_variance( const double alpha, const double beta );
189+
```
190+
191+
</section>
192+
193+
<!-- /.usage -->
194+
195+
<!-- C API usage notes. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
196+
197+
<section class="notes">
198+
199+
</section>
200+
201+
<!-- /.notes -->
202+
203+
<!-- C API usage examples. -->
204+
205+
<section class="examples">
206+
207+
### Examples
208+
209+
```c
210+
#include "stdlib/stats/base/dists/invgamma/variance.h"
211+
#include <stdlib.h>
212+
#include <stdio.h>
213+
static double random_uniform( const double min, const double max ) {
214+
double v = (double)rand() / ( (double)RAND_MAX + 1.0 );
215+
return min + ( v*(max-min) );
216+
}
217+
int main( void ) {
218+
double alpha;
219+
double beta;
220+
double y;
221+
int i;
222+
for ( i = 0; i < 25; i++ ) {
223+
alpha = random_uniform( 0.0, 20.0 );
224+
beta = random_uniform( 0.0, 20.0 );
225+
y = stdlib_base_dists_invgamma_variance( alpha, beta );
226+
printf( "α: %lf, β: %lf, Var(X;α,β): %lf\n", alpha, beta, y );
227+
}
228+
}
229+
```
230+
231+
</section>
232+
233+
<!-- /.examples -->
234+
235+
</section>
236+
237+
<!-- /.c -->
238+
147239
<!-- Section to include cited references. If references are included, add a horizontal rule *before* the section. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
148240

149241
<section class="references">

0 commit comments

Comments
 (0)