Skip to content

Commit 197a69a

Browse files
committed
chore: clean-up
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: passed - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: passed - task: lint_c_examples status: na - task: lint_c_benchmarks status: passed - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 9d9f653 commit 197a69a

File tree

4 files changed

+18
-19
lines changed

4 files changed

+18
-19
lines changed

lib/node_modules/@stdlib/stats/base/dists/planck/mean/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ double out = stdlib_base_dists_planck_mean( 0.1 );
157157

158158
The function accepts the following arguments:
159159

160-
- **lambda**: `[in] double` shape parameter
160+
- **lambda**: `[in] double` shape parameter.
161161

162162
```c
163163
double stdlib_base_dists_planck_mean( const double lambda );

lib/node_modules/@stdlib/stats/base/dists/planck/mean/benchmark/c/benchmark.c

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -92,49 +92,49 @@ static double random_uniform( const double min, const double max ) {
9292
* @return elapsed time in seconds
9393
*/
9494
static double benchmark( void ) {
95+
double lambda[ 100 ];
9596
double elapsed;
96-
double lambda[100];
9797
double y;
9898
double t;
9999
int i;
100100

101-
for (i = 0; i < 100; i++) {
102-
lambda[i] = random_uniform(0.1, 10.0);
101+
for ( i = 0; i < 100; i++ ) {
102+
lambda[ i ] = random_uniform( 0.1, 10.0 );
103103
}
104104

105105
t = tic();
106-
for (i = 0; i < ITERATIONS; i++) {
107-
y = stdlib_base_dists_planck_mean(lambda[i % 100]);
108-
if (y != y) {
109-
printf("should not return NaN\n");
106+
for ( i = 0; i < ITERATIONS; i++ ) {
107+
y = stdlib_base_dists_planck_mean( lambda[ i % 100 ] );
108+
if ( y != y ) {
109+
printf( "should not return NaN\n" );
110110
break;
111111
}
112112
}
113113
elapsed = tic() - t;
114-
if (y != y) {
115-
printf("should not return NaN\n");
114+
if ( y != y ) {
115+
printf( "should not return NaN\n" );
116116
}
117117
return elapsed;
118118
}
119119

120120
/**
121121
* Main execution sequence.
122122
*/
123-
int main(void) {
123+
int main( void ) {
124124
double elapsed;
125125
int i;
126126

127127
// Use the current time to seed the random number generator:
128-
srand(time(NULL));
128+
srand( time( NULL ) );
129129

130130
print_version();
131-
for (i = 0; i < REPEATS; i++) {
132-
printf("# c::%s\n", NAME);
131+
for ( i = 0; i < REPEATS; i++ ) {
132+
printf( "# c::%s\n", NAME );
133133
elapsed = benchmark();
134-
print_results(elapsed);
135-
printf("ok %d benchmark finished\n", i + 1);
134+
print_results( elapsed );
135+
printf( "ok %d benchmark finished\n", i + 1 );
136136
}
137-
print_summary(REPEATS, REPEATS);
137+
print_summary( REPEATS, REPEATS );
138138

139139
return 0;
140140
}

lib/node_modules/@stdlib/stats/base/dists/planck/mean/include/stdlib/stats/base/dists/planck/mean.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-
*Returns the expected value of a Planck distribution with shape parameter `lambda`.
30+
* Returns the expected value of a Planck distribution with shape parameter `lambda`.
3131
*/
3232
double stdlib_base_dists_planck_mean( const double lambda );
3333

lib/node_modules/@stdlib/stats/base/dists/planck/mean/src/addon.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,4 @@
1919
#include "stdlib/stats/base/dists/planck/mean.h"
2020
#include "stdlib/math/base/napi/unary.h"
2121

22-
// cppcheck-suppress shadowFunction
2322
STDLIB_MATH_BASE_NAPI_MODULE_D_D( stdlib_base_dists_planck_mean );

0 commit comments

Comments
 (0)