Skip to content

Commit 70a0589

Browse files
authored
docs: fix copy & paste errors
Signed-off-by: Philipp Burckhardt <[email protected]>
1 parent 73322a8 commit 70a0589

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

lib/node_modules/@stdlib/stats/base/dists/gamma/mode/README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -167,16 +167,16 @@ for ( i = 0; i < 10; i++ ) {
167167
### Usage
168168

169169
```c
170-
#include "stdlib/stats/base/dists/gamma/mean.h"
170+
#include "stdlib/stats/base/dists/gamma/mode.h"
171171
```
172172

173-
#### stdlib_base_dists_gamma_mean( alpha, beta )
173+
#### stdlib_base_dists_gamma_mode( alpha, beta )
174174

175-
Returns the mean of a gamma distribution.
175+
Returns the mode of a gamma distribution.
176176

177177
```c
178-
double out = stdlib_base_dists_gamma_mean( 1.0, 1.0 );
179-
// returns 1.0
178+
double out = stdlib_base_dists_gamma_mode( 1.0, 1.0 );
179+
// returns 0.0
180180
```
181181

182182
The function accepts the following arguments:
@@ -185,7 +185,7 @@ The function accepts the following arguments:
185185
- **beta**: `[in] double` rate parameter.
186186

187187
```c
188-
double stdlib_base_dists_gamma_mean( const double alpha, const double beta );
188+
double stdlib_base_dists_gamma_mode( const double alpha, const double beta );
189189
```
190190
191191
</section>
@@ -207,7 +207,7 @@ double stdlib_base_dists_gamma_mean( const double alpha, const double beta );
207207
### Examples
208208
209209
```c
210-
#include "stdlib/stats/base/dists/gamma/mean.h"
210+
#include "stdlib/stats/base/dists/gamma/mode.h"
211211
#include <stdlib.h>
212212
#include <stdio.h>
213213
@@ -225,7 +225,7 @@ int main( void ) {
225225
for ( i = 0; i < 25; i++ ) {
226226
alpha = random_uniform( 0.0, 20.0 );
227227
beta = random_uniform( 0.0, 20.0 );
228-
y = stdlib_base_dists_gamma_mean( alpha, beta );
228+
y = stdlib_base_dists_gamma_mode( alpha, beta );
229229
printf( "α: %lf, β: %lf, mode(X;α,β): %lf\n", alpha, beta, y );
230230
}
231231
}

lib/node_modules/@stdlib/stats/base/dists/gamma/mode/src/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
*
2828
* @example
2929
* double y = stdlib_base_gamma_mode( 1.0, 1.0 );
30-
* // returns 1.0
30+
* // returns 0.0
3131
*/
3232
double stdlib_base_dists_gamma_mode( const double alpha, const double beta ) {
3333
if ( alpha < 1.0 || beta <= 0.0 ) {

0 commit comments

Comments
 (0)