Skip to content

Commit 1e0dcee

Browse files
fix: changes from code review
1 parent 70a6140 commit 1e0dcee

File tree

7 files changed

+35
-286
lines changed

7 files changed

+35
-286
lines changed

lib/node_modules/@stdlib/stats/base/dists/bernoulli/skewness/LICENSE

Lines changed: 0 additions & 213 deletions
This file was deleted.

lib/node_modules/@stdlib/stats/base/dists/bernoulli/skewness/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,9 @@ for ( i = 0; i < 10; i++ ) {
148148
#include "stdlib/stats/base/dists/bernoulli/skewness.h"
149149
```
150150

151-
#### stdlib_base_dists_bernoulli_skewness( P )
151+
#### stdlib_base_dists_bernoulli_skewness( p )
152152

153-
Returns the skewness of a Bernoulli distribution for probability 'p'
153+
Returns the skewness of a Bernoulli distribution with success probability 'p'.
154154

155155
```c
156156
double y = stdlib_base_dists_bernoulli_skewness( 0.1 );
@@ -162,7 +162,7 @@ y = stdlib_base_dists_bernoulli_skewness( 0.5 );
162162

163163
The function accepts the following arguments:
164164

165-
- **y**: `[in] double` - `y` probability
165+
- **p**: `[in] double` success probability.
166166

167167
```c
168168
double stdlib_base_dists_bernoulli_skewness( const double p );
@@ -199,7 +199,7 @@ int main( void ) {
199199
for ( i = 0; i < 25; i++ ) {
200200
p = ( (double)rand() / (double)RAND_MAX ) ;
201201
y = stdlib_base_dists_bernoulli_skewness( p );
202-
printf( "x: %lf , H(X;p): %lf\n", p , y );
202+
printf( "x: %lf , skew(X;p): %lf\n", p , y );
203203
}
204204
}
205205
```

lib/node_modules/@stdlib/stats/base/dists/bernoulli/skewness/examples/c/Makefile

Lines changed: 21 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#/
22
# @license Apache-2.0
33
#
4-
# Copyright (c) 2024 The Stdlib Authors.
4+
# Copyright (c) 2018 The Stdlib Authors.
55
#
66
# Licensed under the Apache License, Version 2.0 (the "License");
77
# you may not use this file except in compliance with the License.
@@ -16,15 +16,14 @@
1616
# limitations under the License.
1717
#/
1818

19+
1920
# VARIABLES #
2021

2122
ifndef VERBOSE
2223
QUIET := @
23-
else
24-
QUIET :=
2524
endif
2625

27-
# Determine the OS ([1][1], [2][2]).
26+
# Determine the OS:
2827
#
2928
# [1]: https://en.wikipedia.org/wiki/Uname#Examples
3029
# [2]: http://stackoverflow.com/a/27776822/2225624
@@ -37,10 +36,6 @@ ifneq (, $(findstring MSYS,$(OS)))
3736
else
3837
ifneq (, $(findstring CYGWIN,$(OS)))
3938
OS := WINNT
40-
else
41-
ifneq (, $(findstring Windows_NT,$(OS)))
42-
OS := WINNT
43-
endif
4439
endif
4540
endif
4641
endif
@@ -59,7 +54,7 @@ CFLAGS ?= \
5954
-Wall \
6055
-pedantic
6156

62-
# Determine whether to generate position independent code ([1][1], [2][2]).
57+
# Determine whether to generate [position independent code][1]:
6358
#
6459
# [1]: https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#Code-Gen-Options
6560
# [2]: http://stackoverflow.com/questions/5311515/gcc-fpic-option
@@ -69,77 +64,43 @@ else
6964
fPIC ?= -fPIC
7065
endif
7166

72-
# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`):
73-
INCLUDE ?=
74-
75-
# List of source files:
76-
SOURCE_FILES ?=
77-
78-
# List of libraries (e.g., `-lopenblas -lpthread`):
79-
LIBRARIES ?=
80-
81-
# List of library paths (e.g., `-L /foo/bar -L /beep/boop`):
82-
LIBPATH ?=
83-
8467
# List of C targets:
8568
c_targets := benchmark.out
8669

8770

88-
# RULES #
71+
# TARGETS #
8972

90-
#/
91-
# Compiles source files.
73+
# Default target.
9274
#
93-
# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`)
94-
# @param {string} [CFLAGS] - C compiler options
95-
# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`)
96-
# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`)
97-
# @param {string} [SOURCE_FILES] - list of source files
98-
# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`)
99-
# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`)
100-
#
101-
# @example
102-
# make
103-
#
104-
# @example
105-
# make all
106-
#/
75+
# This target is the default target.
76+
10777
all: $(c_targets)
10878

10979
.PHONY: all
11080

111-
#/
112-
# Compiles C source files.
81+
82+
# Compile C source.
11383
#
114-
# @private
115-
# @param {string} CC - C compiler (e.g., `gcc`)
116-
# @param {string} CFLAGS - C compiler options
117-
# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`)
118-
# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`)
119-
# @param {string} SOURCE_FILES - list of source files
120-
# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`)
121-
# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`)
122-
#/
84+
# This target compiles C source files.
85+
12386
$(c_targets): %.out: %.c
124-
$(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES)
87+
$(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm
12588

126-
#/
127-
# Runs compiled benchmarks.
89+
90+
# Run a benchmark.
12891
#
129-
# @example
130-
# make run
131-
#/
92+
# This target runs a benchmark.
93+
13294
run: $(c_targets)
13395
$(QUIET) ./$<
13496

13597
.PHONY: run
13698

137-
#/
138-
# Removes generated files.
99+
100+
# Perform clean-up.
139101
#
140-
# @example
141-
# make clean
142-
#/
102+
# This target removes generated files.
103+
143104
clean:
144105
$(QUIET) -rm -f *.o *.out
145106

lib/node_modules/@stdlib/stats/base/dists/bernoulli/skewness/examples/c/example.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ int main( void ) {
2828
for ( i = 0; i < 25; i++ ) {
2929
p = ( (double)rand() / (double)RAND_MAX ) ;
3030
y = stdlib_base_dists_bernoulli_skewness( p );
31-
printf( "x: %lf , H(X;p): %lf\n", p , y );
31+
printf( "x: %lf , skew(X;p): %lf\n", p , y );
3232
}
3333
}

0 commit comments

Comments
 (0)