Skip to content

Commit 77162b5

Browse files
chore: stuff from code review
1 parent 63bd5d3 commit 77162b5

File tree

5 files changed

+9
-40
lines changed

5 files changed

+9
-40
lines changed

lib/node_modules/@stdlib/stats/base/dists/degenerate/logcdf/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
@license Apache-2.0
44
5-
Copyright (c) 2024 The Stdlib Authors.
5+
Copyright (c) 2018 The Stdlib Authors.
66
77
Licensed under the Apache License, Version 2.0 (the "License");
88
you may not use this file except in compliance with the License.
@@ -142,7 +142,7 @@ for ( i = 0; i < 100; i++ ) {
142142

143143
#### stdlib_base_dists_degenerate_logcdf( x, mu )
144144

145-
Evaluates the natural logarithm of the CDF of a degenerate distribution centered at `mu`.
145+
Evaluates the natural logarithm of the (CDF) of a degenerate distribution centered at `mu`.
146146

147147
```c
148148
double y = stdlib_base_dists_degenerate_logcdf( 2.0, 3.0 );
@@ -151,8 +151,8 @@ double y = stdlib_base_dists_degenerate_logcdf( 2.0, 3.0 );
151151

152152
The function accepts the following arguments:
153153

154-
- **x**: `[in] double` input value.
155-
- **mu**: `[in] double` constant value of distribution
154+
- **x**: `[in] double` input value.
155+
- **mu**: `[in] double` constant value of distribution.
156156

157157
```c
158158
double stdlib_base_dists_degenerate_logcdf( const double x, const double mu );

lib/node_modules/@stdlib/stats/base/dists/degenerate/logcdf/benchmark/c/benchmark.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ static double benchmark( void ) {
108108

109109
t = tic();
110110
for ( i = 0; i < ITERATIONS; i++ ) {
111-
y = stdlib_base_dists_degenerate_logcdf( x[ i%100 ], mu[ i%100 ] );
111+
y = stdlib_base_dists_degenerate_logcdf( x[ i % 100 ], mu[ i % 100 ] );
112112
if ( y != y ) {
113113
printf( "should not return NaN\n" );
114114
break;

lib/node_modules/@stdlib/stats/base/dists/degenerate/logcdf/include/stdlib/stats/base/dists/degenerate/logcdf.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ extern "C" {
2727
#endif
2828

2929
/**
30-
* Evaluates the natural logarithm of the CDF of a degenerate distribution centered at `mu`.
30+
* Evaluates the natural logarithm of the (CDF) of a degenerate distribution centered at `mu`.
3131
*/
3232
double stdlib_base_dists_degenerate_logcdf( const double x, const double mu );
3333

lib/node_modules/@stdlib/stats/base/dists/degenerate/logcdf/lib/native.js

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -28,29 +28,14 @@ var addon = require( './../src/addon.node' );
2828
/**
2929
* Evaluates the natural logarithm of the cumulative distribution function (logCDF) for a degenerate distribution with mean `mu`.
3030
*
31+
* @private
3132
* @param {number} x - input value
3233
* @param {number} mu - constant value of distribution
3334
* @returns {number} natural logarithm of cumulative distribution function
3435
*
3536
* @example
3637
* var y = logcdf( 2.0, 3.0 );
3738
* // returns -Infinity
38-
*
39-
* @example
40-
* var y = logcdf( 4.0, 3.0 );
41-
* // returns 0.0
42-
*
43-
* @example
44-
* var y = logcdf( 3.0, 3.0 );
45-
* // returns 0.0
46-
*
47-
* @example
48-
* var y = logcdf( NaN, 0.0 );
49-
* // returns NaN
50-
*
51-
* @example
52-
* var y = logcdf( 0.0, NaN );
53-
* // returns NaN
5439
*/
5540
function logcdf( x, mu ) {
5641
return addon( x, mu );

lib/node_modules/@stdlib/stats/base/dists/degenerate/logcdf/src/main.c

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -21,31 +21,15 @@
2121
#include "stdlib/constants/float64/ninf.h"
2222

2323
/**
24-
* Evaluates the natural logarithm of the CDF of a degenerate distribution centered at `mu`.
24+
* Evaluates the natural logarithm of the (CDF) of a degenerate distribution centered at `mu`.
2525
*
2626
* @param x input value
2727
* @param mu constant value of distribution
28-
* @returns evaluated LOGCDF
28+
* @returns evaluated logCDF
2929
*
3030
* @example
3131
* double y = stdlib_base_dists_degenerate_logcdf( 2.0, 3.0 );
3232
* // returns ~-Infinity
33-
*
34-
* @example
35-
* double y = stdlib_base_dists_degenerate_logcdf( 4.0, 3.0 );
36-
* // returns ~0.0
37-
*
38-
* @example
39-
* double y = stdlib_base_dists_degenerate_logcdf( 3.0, 3.0 );
40-
* // returns ~0.0
41-
*
42-
* @example
43-
* double y = stdlib_base_dists_degenerate_logcdf( NaN, 0.0 );
44-
* // returns NaN
45-
*
46-
* @example
47-
* double y = stdlib_base_dists_degenerate_logcdf( 0.0, NaN );
48-
* // returns NaN
4933
*/
5034
double stdlib_base_dists_degenerate_logcdf( const double x, const double mu ) {
5135
if ( stdlib_base_is_nan( x ) || stdlib_base_is_nan( mu ) ) {

0 commit comments

Comments
 (0)