Skip to content

Commit 67575a2

Browse files
committed
refactor: fixed the formatting issues
--- 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: missing_dependencies - task: lint_c_examples status: missing_dependencies - task: lint_c_benchmarks status: missing_dependencies - 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 --- --- type: pre_push_report description: Results of running various checks prior to pushing changes. report: - task: run_javascript_examples status: na - task: run_c_examples status: passed - task: run_cpp_examples status: na - task: run_javascript_readme_examples status: passed - task: run_c_benchmarks status: passed - task: run_cpp_benchmarks status: na - task: run_fortran_benchmarks status: na - task: run_javascript_benchmarks status: na - task: run_julia_benchmarks status: na - task: run_python_benchmarks status: na - task: run_r_benchmarks status: na - task: run_javascript_tests status: na ---
1 parent 9cd6feb commit 67575a2

File tree

6 files changed

+218
-208
lines changed

6 files changed

+218
-208
lines changed

lib/node_modules/@stdlib/stats/base/dists/hypergeometric/kurtosis/README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -211,30 +211,30 @@ double stdlib_base_dists_hypergeometric_kurtosis( const double N, const double K
211211
### Examples
212212
213213
```c
214-
#include "stdlib/stats/base/dists/hypergeometric/kurtosis.h"
215214
#include "stdlib/math/base/special/round.h"
216-
#include <stdlib.h>
215+
#include "stdlib/stats/base/dists/hypergeometric/kurtosis.h"
217216
#include <stdio.h>
217+
#include <stdlib.h>
218218
219219
static double random_uniform( const double min, const double max ) {
220220
double v = (double)rand() / ( (double)RAND_MAX + 1.0 );
221-
return min + ( v*(max-min) );
221+
return min + ( v * ( max - min ) );
222222
}
223223
224224
int main( void ) {
225+
double kurtosis;
225226
double N;
226227
double K;
227228
double n;
228-
double kurtosis;
229229
int i;
230230
231231
for ( i = 0; i < 10; i++ ) {
232-
N = stdlib_base_round(random_uniform(0.0, 20.0));
233-
K = stdlib_base_round(random_uniform(0.0, N));
234-
n = stdlib_base_round(random_uniform(0.0, K));
232+
N = stdlib_base_round( random_uniform( 0.0, 20.0 ) );
233+
K = stdlib_base_round( random_uniform( 0.0, N ) );
234+
n = stdlib_base_round( random_uniform( 0.0, K ) );
235235
kurtosis = stdlib_base_dists_hypergeometric_kurtosis( N, K, n );
236236
237-
printf( "N: %lf, K: %lf, n: %lf, Kurtosis: %lf\n", N, K, n, kurtosis );
237+
printf( "N: %lf, K: %lf, n: %lf, Kurt(X;N,K,n): %lf\n", N, K, n, kurtosis );
238238
}
239239
240240
return 0;

lib/node_modules/@stdlib/stats/base/dists/hypergeometric/kurtosis/benchmark/c/benchmark.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@
1616
* limitations under the License.
1717
*/
1818

19-
#include "stdlib/stats/base/dists/hypergeometric/kurtosis.h"
19+
#include <sys/time.h>
2020
#include "stdlib/math/base/special/round.h"
21-
#include <stdlib.h>
22-
#include <stdio.h>
21+
#include "stdlib/stats/base/dists/hypergeometric/kurtosis.h"
2322
#include <math.h>
23+
#include <stdio.h>
24+
#include <stdlib.h>
2425
#include <time.h>
25-
#include <sys/time.h>
2626

2727
#define NAME "hypergeometric-kurtosis"
2828
#define ITERATIONS 1000000
@@ -72,7 +72,7 @@ static void print_results( double elapsed ) {
7272
static double tic( void ) {
7373
struct timeval now;
7474
gettimeofday( &now, NULL );
75-
return (double)now.tv_sec + (double)now.tv_usec/1.0e6;
75+
return (double)now.tv_sec + (double)now.tv_usec / 1.0e6;
7676
}
7777

7878
/**
@@ -84,7 +84,7 @@ static double tic( void ) {
8484
*/
8585
static double random_uniform( const double min, const double max ) {
8686
double v = (double)rand() / ( (double)RAND_MAX + 1.0 );
87-
return min + ( v*(max-min) );
87+
return min + ( v * ( max - min ) );
8888
}
8989

9090
/**
@@ -101,11 +101,11 @@ static double benchmark( void ) {
101101
double t;
102102
int i;
103103

104-
// Generate random inputs:
104+
// Generate random inputs:
105105
for ( i = 0; i < 100; i++ ) {
106-
N[i] = stdlib_base_round(random_uniform(1.0, 100.0));
107-
K[i] = stdlib_base_round(random_uniform(0.0, N[i]));
108-
n[i] = stdlib_base_round(random_uniform(0.0, N[i]));
106+
N[ i ] = stdlib_base_round( random_uniform( 1.0, 100.0 ) );
107+
K[ i ] = stdlib_base_round( random_uniform( 0.0, N[ i ] ) );
108+
n[ i ] = stdlib_base_round( random_uniform( 0.0, N[ i ] ) );
109109
}
110110

111111
// Benchmark:
@@ -131,15 +131,15 @@ int main( void ) {
131131
double elapsed;
132132
int i;
133133

134-
// Seed the random number generator:
134+
// Seed the random number generator:
135135
srand( time( NULL ) );
136136

137137
print_version();
138138
for ( i = 0; i < REPEATS; i++ ) {
139139
printf( "# c::%s\n", NAME );
140140
elapsed = benchmark();
141141
print_results( elapsed );
142-
printf( "ok %d benchmark finished\n", i+1 );
142+
printf( "ok %d benchmark finished\n", i + 1 );
143143
}
144144
print_summary( REPEATS, REPEATS );
145145
}

lib/node_modules/@stdlib/stats/base/dists/hypergeometric/kurtosis/binding.gyp

Lines changed: 144 additions & 123 deletions
Original file line numberDiff line numberDiff line change
@@ -19,131 +19,152 @@
1919
# [1]: https://gyp.gsrc.io/docs/InputFormatReference.md
2020
# [2]: https://gyp.gsrc.io/docs/UserDocumentation.md
2121
{
22-
# List of files to include in this file:
23-
"includes": [
24-
"./include.gypi",
25-
],
26-
# Define variables to be used throughout the configuration for all targets:
27-
"variables": {
28-
# Target name should match the add-on export name:
29-
"addon_target_name%": "addon",
30-
# Set variables based on the host OS:
31-
"conditions": [
32-
[
33-
'OS=="win"',
34-
{
35-
# Define the object file suffix:
36-
"obj": "obj",
37-
},
38-
{
39-
# Define the object file suffix:
40-
"obj": "o",
41-
},
42-
], # end condition (OS=="win")
43-
], # end conditions
44-
}, # end variables
45-
# Define compile targets:
46-
"targets": [
47-
# Target to generate an add-on:
22+
# List of files to include in this file:
23+
'includes': [
24+
'./include.gypi',
25+
],
26+
27+
# Define variables to be used throughout the configuration for all targets:
28+
'variables': {
29+
# Target name should match the add-on export name:
30+
'addon_target_name%': 'addon',
31+
32+
# Set variables based on the host OS:
33+
'conditions': [
34+
[
35+
'OS=="win"',
4836
{
49-
# The target name should match the add-on export name:
50-
"target_name": "<(addon_target_name)",
51-
# Define dependencies:
52-
"dependencies": [],
53-
# Define directories which contain relevant include headers:
54-
"include_dirs": [
55-
# Local include directory:
56-
"<@(include_dirs)",
57-
],
58-
# List of source files:
59-
"sources": [
60-
"<@(src_files)",
61-
"src/addon.c",
62-
],
63-
# Settings which should be applied when a target's object files are used as linker input:
64-
"link_settings": {
65-
# Define libraries:
66-
"libraries": [
67-
"<@(libraries)",
68-
],
69-
# Define library directories:
70-
"library_dirs": [
71-
"<@(library_dirs)",
72-
],
73-
},
74-
# C/C++ compiler flags:
75-
"cflags": [
76-
# Enable commonly used warning options:
77-
"-Wall",
78-
# Aggressive optimization:
79-
"-O3",
80-
],
81-
# C specific compiler flags:
82-
"cflags_c": [
83-
# Specify the C standard to which a program is expected to conform:
84-
"-std=c99",
37+
# Define the object file suffix:
38+
'obj': 'obj',
39+
},
40+
{
41+
# Define the object file suffix:
42+
'obj': 'o',
43+
}
44+
], # end condition (OS=="win")
45+
], # end conditions
46+
}, # end variables
47+
48+
# Define compile targets:
49+
'targets': [
50+
51+
# Target to generate an add-on:
52+
{
53+
# The target name should match the add-on export name:
54+
'target_name': '<(addon_target_name)',
55+
56+
# Define dependencies:
57+
'dependencies': [],
58+
59+
# Define directories which contain relevant include headers:
60+
'include_dirs': [
61+
# Local include directory:
62+
'<@(include_dirs)',
63+
],
64+
65+
# List of source files:
66+
'sources': [
67+
'<@(src_files)',
68+
],
69+
70+
# Settings which should be applied when a target's object files are used as linker input:
71+
'link_settings': {
72+
# Define libraries:
73+
'libraries': [
74+
'<@(libraries)',
75+
],
76+
77+
# Define library directories:
78+
'library_dirs': [
79+
'<@(library_dirs)',
80+
],
81+
},
82+
83+
# C/C++ compiler flags:
84+
'cflags': [
85+
# Enable commonly used warning options:
86+
'-Wall',
87+
88+
# Aggressive optimization:
89+
'-O3',
90+
],
91+
92+
# C specific compiler flags:
93+
'cflags_c': [
94+
# Specify the C standard to which a program is expected to conform:
95+
'-std=c99',
96+
],
97+
98+
# C++ specific compiler flags:
99+
'cflags_cpp': [
100+
# Specify the C++ standard to which a program is expected to conform:
101+
'-std=c++11',
102+
],
103+
104+
# Linker flags:
105+
'ldflags': [],
106+
107+
# Apply conditions based on the host OS:
108+
'conditions': [
109+
[
110+
'OS=="mac"',
111+
{
112+
# Linker flags:
113+
'ldflags': [
114+
'-undefined dynamic_lookup',
115+
'-Wl,-no-pie',
116+
'-Wl,-search_paths_first',
85117
],
86-
# C++ specific compiler flags:
87-
"cflags_cpp": [
88-
# Specify the C++ standard to which a program is expected to conform:
89-
"-std=c++11",
118+
},
119+
], # end condition (OS=="mac")
120+
[
121+
'OS!="win"',
122+
{
123+
# C/C++ flags:
124+
'cflags': [
125+
# Generate platform-independent code:
126+
'-fPIC',
90127
],
91-
# Linker flags:
92-
"ldflags": [],
93-
# Apply conditions based on the host OS:
94-
"conditions": [
95-
[
96-
'OS=="mac"',
97-
{
98-
# Linker flags:
99-
"ldflags": [
100-
"-undefined dynamic_lookup",
101-
"-Wl,-no-pie",
102-
"-Wl,-search_paths_first",
103-
],
104-
},
105-
], # end condition (OS=="mac")
106-
[
107-
'OS!="win"',
108-
{
109-
# C/C++ flags:
110-
"cflags": [
111-
# Generate platform-independent code:
112-
"-fPIC",
113-
],
114-
},
115-
], # end condition (OS!="win")
116-
], # end conditions
117-
}, # end target <(addon_target_name)
118-
# Target to copy a generated add-on to a standard location:
128+
},
129+
], # end condition (OS!="win")
130+
], # end conditions
131+
}, # end target <(addon_target_name)
132+
133+
# Target to copy a generated add-on to a standard location:
134+
{
135+
'target_name': 'copy_addon',
136+
137+
# Declare that the output of this target is not linked:
138+
'type': 'none',
139+
140+
# Define dependencies:
141+
'dependencies': [
142+
# Require that the add-on be generated before building this target:
143+
'<(addon_target_name)',
144+
],
145+
146+
# Define a list of actions:
147+
'actions': [
119148
{
120-
"target_name": "copy_addon",
121-
# Declare that the output of this target is not linked:
122-
"type": "none",
123-
# Define dependencies:
124-
"dependencies": [
125-
# Require that the add-on be generated before building this target:
126-
"<(addon_target_name)",
127-
],
128-
# Define a list of actions:
129-
"actions": [
130-
{
131-
"action_name": "copy_addon",
132-
"message": "Copying addon...",
133-
# Explicitly list the inputs in the command-line invocation below:
134-
"inputs": [],
135-
# Declare the expected outputs:
136-
"outputs": [
137-
"<(addon_output_dir)/<(addon_target_name).node",
138-
],
139-
# Define the command-line invocation:
140-
"action": [
141-
"cp",
142-
"<(PRODUCT_DIR)/<(addon_target_name).node",
143-
"<(addon_output_dir)/<(addon_target_name).node",
144-
],
145-
},
146-
], # end actions
147-
}, # end target copy_addon
148-
], # end targets
149+
'action_name': 'copy_addon',
150+
'message': 'Copying addon...',
151+
152+
# Explicitly list the inputs in the command-line invocation below:
153+
'inputs': [],
154+
155+
# Declare the expected outputs:
156+
'outputs': [
157+
'<(addon_output_dir)/<(addon_target_name).node',
158+
],
159+
160+
# Define the command-line invocation:
161+
'action': [
162+
'cp',
163+
'<(PRODUCT_DIR)/<(addon_target_name).node',
164+
'<(addon_output_dir)/<(addon_target_name).node',
165+
],
166+
},
167+
], # end actions
168+
}, # end target copy_addon
169+
], # end targets
149170
}

0 commit comments

Comments
 (0)