Skip to content

Commit 5c69c97

Browse files
fix: resolve all the issues
1 parent 821aa0a commit 5c69c97

File tree

9 files changed

+90
-166
lines changed

9 files changed

+90
-166
lines changed

lib/node_modules/@stdlib/stats/base/dists/uniform/median/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ limitations under the License.
2828

2929
The [median][median] for a [uniform][uniform-distribution] random variable is
3030

31-
<!-- <equation class="equation" label="eq:uniform_median" align="center" raw="\operatorname{median}\left[ X \right] = 0.5 \cdot ( a + b )" alt="Median for a uniform distribution."> -->
31+
<!-- <equation class="equation" label="eq:uniform_median" align="center" raw="\operatorname{Median}\left[ X \right] = \frac{1}{2} \left( a + b \right)" alt="Median for a uniform distribution."> -->
3232

3333
```math
34-
\operatorname{median}\left[ X \right] = 0.5 \cdot ( a + b )
34+
\mathop{\mathrm{Median}}\left[ X \right] = \frac{1}{2} \left( a + b \right)
3535
```
3636

37-
<!-- <div class="equation" align="center" data-raw-text="\operatorname{median}\left[ X \right] = 0.5 \cdot ( a + b )" data-equation="eq:uniform_median">
38-
<img src="..." alt="Median for a uniform distribution.">
37+
<!-- <div class="equation" align="center" data-raw-text="\operatorname{Median}\left[ X \right] = \frac{1}{2} \left( a + b \right)" data-equation="eq:uniform_median">
38+
<img src="https://cdn.jsdelivr.net/gh/stdlib-js/stdlib@591cf9d5c3a0cd3c1ceec961e5c49d73a68374cb/lib/node_modules/@stdlib/stats/base/dists/uniform/median/docs/img/equation_uniform_median.svg" alt="Median for a uniform distribution.">
3939
<br>
4040
</div> -->
4141

lib/node_modules/@stdlib/stats/base/dists/uniform/median/benchmark/benchmark.js

Lines changed: 1 addition & 1 deletion
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.

lib/node_modules/@stdlib/stats/base/dists/uniform/median/examples/c/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ LIBRARIES ?=
8282
LIBPATH ?=
8383

8484
# List of C targets:
85-
c_targets := benchmark.out
85+
c_targets := example.out
8686

8787

8888
# RULES #
@@ -124,7 +124,7 @@ $(c_targets): %.out: %.c
124124
$(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES)
125125

126126
#/
127-
# Runs compiled benchmarks.
127+
# Runs compiled examples.
128128
#
129129
# @example
130130
# make run

lib/node_modules/@stdlib/stats/base/dists/uniform/median/include/stdlib/stats/base/dists/uniform/median.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 median of a Uniform distribution with lower bound `a` and upper bound `b`.
30+
* Returns the median of a uniform distribution with lower bound `a` and upper bound `b`.
3131
*/
3232
double stdlib_base_dists_uniform_median( const double a, const double b );
3333

lib/node_modules/@stdlib/stats/base/dists/uniform/median/lib/native.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ var addon = require( './../src/addon.node' );
2626
// MAIN //
2727

2828
/**
29-
* Returns the median of a Uniform distribution.
29+
* Returns the median of a uniform distribution.
3030
*
3131
* @private
3232
* @param {number} a - lower bound
Lines changed: 72 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,76 @@
11
{
2-
"options": {
2+
"options": {
3+
"task": "build",
4+
"wasm": false
5+
},
6+
"fields": [
7+
{
8+
"field": "src",
9+
"resolve": true,
10+
"relative": true
11+
},
12+
{
13+
"field": "include",
14+
"resolve": true,
15+
"relative": true
16+
},
17+
{
18+
"field": "libraries",
19+
"resolve": false,
20+
"relative": false
21+
},
22+
{
23+
"field": "libpath",
24+
"resolve": true,
25+
"relative": false
26+
}
27+
],
28+
"confs": [
29+
{
330
"task": "build",
4-
"wasm": false
31+
"wasm": false,
32+
"src": [
33+
"./src/main.c"
34+
],
35+
"include": [
36+
"./include"
37+
],
38+
"libraries": [],
39+
"libpath": [],
40+
"dependencies": [
41+
"@stdlib/math/base/napi/binary",
42+
"@stdlib/math/base/assert/is-nan"
43+
]
44+
},
45+
{
46+
"task": "benchmark",
47+
"wasm": false,
48+
"src": [
49+
"./src/main.c"
50+
],
51+
"include": [
52+
"./include"
53+
],
54+
"libraries": [],
55+
"libpath": [],
56+
"dependencies": [
57+
"@stdlib/math/base/assert/is-nan"
58+
]
559
},
6-
"fields": [
7-
{
8-
"field": "src",
9-
"resolve": true,
10-
"relative": true
11-
},
12-
{
13-
"field": "include",
14-
"resolve": true,
15-
"relative": true
16-
},
17-
{
18-
"field": "libraries",
19-
"resolve": false,
20-
"relative": false
21-
},
22-
{
23-
"field": "libpath",
24-
"resolve": true,
25-
"relative": false
26-
}
27-
],
28-
"confs": [
29-
{
30-
"task": "build",
31-
"wasm": false,
32-
"src": [
33-
"./src/main.c"
34-
],
35-
"include": [
36-
"./include"
37-
],
38-
"libraries": [],
39-
"libpath": [],
40-
"dependencies": [
41-
"@stdlib/math/base/napi/binary",
42-
"@stdlib/math/base/assert/is-nan"
43-
]
44-
},
45-
{
46-
"task": "benchmark",
47-
"wasm": false,
48-
"src": [
49-
"./src/main.c"
50-
],
51-
"include": [
52-
"./include"
53-
],
54-
"libraries": [],
55-
"libpath": [],
56-
"dependencies": [
57-
"@stdlib/math/base/assert/is-nan"
58-
]
59-
},
60-
{
61-
"task": "examples",
62-
"wasm": false,
63-
"src": [
64-
"./src/main.c"
65-
],
66-
"include": [
67-
"./include"
68-
],
69-
"libraries": [],
70-
"libpath": [],
71-
"dependencies": [
72-
"@stdlib/math/base/assert/is-nan"
73-
]
74-
}
75-
]
60+
{
61+
"task": "examples",
62+
"wasm": false,
63+
"src": [
64+
"./src/main.c"
65+
],
66+
"include": [
67+
"./include"
68+
],
69+
"libraries": [],
70+
"libpath": [],
71+
"dependencies": [
72+
"@stdlib/math/base/assert/is-nan"
73+
]
74+
}
75+
]
7676
}

lib/node_modules/@stdlib/stats/base/dists/uniform/median/src/Makefile

Lines changed: 6 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -45,102 +45,26 @@ endif
4545
endif
4646
endif
4747

48-
# Define the program used for compiling C source files:
49-
ifdef C_COMPILER
50-
CC := $(C_COMPILER)
51-
else
52-
CC := gcc
53-
endif
54-
55-
# Define the command-line options when compiling C files:
56-
CFLAGS ?= \
57-
-std=c99 \
58-
-O3 \
59-
-Wall \
60-
-pedantic
61-
62-
# Determine whether to generate position independent code ([1][1], [2][2]).
63-
#
64-
# [1]: https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#Code-Gen-Options
65-
# [2]: http://stackoverflow.com/questions/5311515/gcc-fpic-option
66-
ifeq ($(OS), WINNT)
67-
fPIC ?=
68-
else
69-
fPIC ?= -fPIC
70-
endif
71-
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-
84-
# List of C targets:
85-
c_targets := benchmark.out
86-
8748

8849
# RULES #
8950

9051
#/
91-
# Compiles source files.
92-
#
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-
#/
107-
all: $(c_targets)
108-
109-
.PHONY: all
110-
111-
#/
112-
# Compiles C source files.
113-
#
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-
#/
123-
$(c_targets): %.out: %.c
124-
$(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES)
125-
126-
#/
127-
# Runs compiled benchmarks.
52+
# Removes generated files for building an add-on.
12853
#
12954
# @example
130-
# make run
55+
# make clean-addon
13156
#/
132-
run: $(c_targets)
133-
$(QUIET) ./$<
57+
clean-addon:
58+
$(QUIET) -rm -f *.o *.node
13459

135-
.PHONY: run
60+
.PHONY: clean-addon
13661

13762
#/
13863
# Removes generated files.
13964
#
14065
# @example
14166
# make clean
14267
#/
143-
clean:
144-
$(QUIET) -rm -f *.o *.out
68+
clean: clean-addon
14569

14670
.PHONY: clean

lib/node_modules/@stdlib/stats/base/dists/uniform/median/src/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#include "stdlib/math/base/assert/is_nan.h"
2121

2222
/**
23-
* Returns the median of a Uniform distribution.
23+
* Returns the median of a uniform distribution.
2424
*
2525
* @param a lower bound
2626
* @param b upper bound
@@ -40,7 +40,7 @@ double stdlib_base_dists_uniform_median( const double a, const double b ) {
4040
stdlib_base_is_nan( b ) ||
4141
a >= b
4242
) {
43-
return 0.0 / 0.0; // Return NaN for invalid inputs
43+
return 0.0 / 0.0; // NaN
4444
}
4545
return ( a + b ) / 2.0;
4646
}

lib/node_modules/@stdlib/stats/base/dists/uniform/median/test/test.native.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ tape( 'if provided `a >= b`, the function returns `NaN`', opts, function test( t
8181
t.end();
8282
});
8383

84-
tape( 'the function returns the median of a Uniform distribution', opts, function test( t ) {
84+
tape( 'the function returns the median of a uniform distribution', opts, function test( t ) {
8585
var expected;
8686
var delta;
8787
var tol;

0 commit comments

Comments
 (0)