ziko 0.54.4 → 0.55.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ziko.cjs +298 -444
- package/dist/ziko.js +347 -661
- package/dist/ziko.min.js +2 -2
- package/dist/ziko.mjs +341 -652
- package/package.json +1 -1
- package/src/math/--discret/index.js +12 -0
- package/src/math/complex/index.js +18 -12
- package/src/math/functions/conversions/index.js +61 -0
- package/src/math/functions/index.js +2 -1
- package/src/math/functions/logic/index.js +54 -0
- package/src/math/functions/signal/index.js +1 -1
- package/src/math/functions/stats/index.js +14 -2
- package/src/math/functions/utils/index.js +0 -58
- package/src/math/index.js +2 -2
- package/src/math/matrix/index.js +52 -35
- package/src/math/random/index.js +111 -155
- package/src/math/utils/conversions.js +17 -17
- package/src/math/utils/index.js +10 -10
- package/types/math/complex/index.d.ts +5 -5
- package/types/math/functions/logic/index.d.ts +11 -0
- package/src/math/discret/Combinaison/index.js +0 -34
- package/src/math/discret/Conversion/index.js +0 -86
- package/src/math/discret/Logic/index.js +0 -46
- package/src/math/discret/Permutation/index.js +0 -31
- package/src/math/discret/index.js +0 -12
- package/src/math/statistics/functions/index.js +0 -100
- package/src/math/statistics/index.js +0 -16
- /package/src/math/{discret → --discret}/Set/index.js +0 -0
- /package/src/math/{discret → --discret}/Set/power-set.js +0 -0
- /package/src/math/{discret → --discret}/Set/sub-set.js +0 -0
- /package/src/math/functions/{nested → ufunc}/index.js +0 -0
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
// Mixed calcul
|
|
2
|
-
const sum=(...x)=>{
|
|
3
|
-
if(x.every(n=>typeof n==="number")){
|
|
4
|
-
let s = x[0];
|
|
5
|
-
for (let i = 1; i < x.length; i++) s += x[i];
|
|
6
|
-
return s;
|
|
7
|
-
}
|
|
8
|
-
const Y=[];
|
|
9
|
-
for(let i=0;i<x.length;i++){
|
|
10
|
-
if(x[i] instanceof Array)Y.push(sum(...x[i]));
|
|
11
|
-
else if(x[i] instanceof Object){
|
|
12
|
-
Y.push(sum(...Object.values(x[i])))
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
return Y.length===1?Y[0]:Y;
|
|
16
|
-
}
|
|
17
|
-
const prod=(...x)=>{
|
|
18
|
-
if(x.every(n=>typeof n==="number")){
|
|
19
|
-
let p = x[0];
|
|
20
|
-
for (let i = 1; i < x.length; i++) p *= x[i];
|
|
21
|
-
return p;
|
|
22
|
-
}
|
|
23
|
-
const Y=[];
|
|
24
|
-
for(let i=0;i<x.length;i++){
|
|
25
|
-
if(x[i] instanceof Array)Y.push(prod(...x[i]));
|
|
26
|
-
else if(x[i] instanceof Object){
|
|
27
|
-
Y.push(prod(...Object.values(x[i])))
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
return Y.length===1?Y[0]:Y;
|
|
31
|
-
}
|
|
32
|
-
// const min=(...num)=>{
|
|
33
|
-
// if(num.every(n=>typeof n==="number"))return Math.min(...num);
|
|
34
|
-
// const Y=[];
|
|
35
|
-
// for(let i=0;i<num.length;i++){
|
|
36
|
-
// if(num[i] instanceof Array)Y.push(min(...num[i]));
|
|
37
|
-
// else if(num[i] instanceof Object){
|
|
38
|
-
// Y.push(
|
|
39
|
-
// Object.fromEntries(
|
|
40
|
-
// [Object.entries(num[i]).sort((a,b)=>a[1]-b[1])[0]]
|
|
41
|
-
// )
|
|
42
|
-
// )
|
|
43
|
-
// }
|
|
44
|
-
// }
|
|
45
|
-
// return Y.length===1?Y[0]:Y;
|
|
46
|
-
// }
|
|
47
|
-
// const max=(...num)=>{
|
|
48
|
-
// if(num.every(n=>typeof n==="number"))return Math.max(...num);
|
|
49
|
-
// const Y=[];
|
|
50
|
-
// for(let i=0;i<num.length;i++){
|
|
51
|
-
// if(num[i] instanceof Array)Y.push(min(...num[i]));
|
|
52
|
-
// else if(num[i] instanceof Object){
|
|
53
|
-
// Y.push(
|
|
54
|
-
// Object.fromEntries(
|
|
55
|
-
// [Object.entries(num[i]).sort((a,b)=>b[1]-a[1])[0]]
|
|
56
|
-
// )
|
|
57
|
-
// )
|
|
58
|
-
// }
|
|
59
|
-
// }
|
|
60
|
-
// return Y.length===1?Y[0]:Y;
|
|
61
|
-
// }
|
|
62
|
-
const accum=(...num)=>{
|
|
63
|
-
if(num.every(n=>typeof n==="number")){
|
|
64
|
-
let acc = num.reduce((x, y) => [...x, x[x.length - 1] + y], [0]);
|
|
65
|
-
acc.shift();
|
|
66
|
-
return acc;
|
|
67
|
-
}
|
|
68
|
-
const Y=[];
|
|
69
|
-
for(let i=0;i<num.length;i++){
|
|
70
|
-
if(num[i] instanceof Array)Y.push(accum(...num[i]));
|
|
71
|
-
else if(num[i] instanceof Object){
|
|
72
|
-
Y.push(null
|
|
73
|
-
// Object.fromEntries(
|
|
74
|
-
// [Object.entries(num[i]).sort((a,b)=>b[1]-a[1])[0]]
|
|
75
|
-
// )
|
|
76
|
-
)
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
return Y.length===1?Y[0]:Y;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
// sort
|
|
83
|
-
|
|
84
|
-
export{
|
|
85
|
-
sum,
|
|
86
|
-
prod,
|
|
87
|
-
// min,
|
|
88
|
-
// max,
|
|
89
|
-
accum
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
//moy
|
|
93
|
-
//med
|
|
94
|
-
//variance
|
|
95
|
-
//std
|
|
96
|
-
//mode
|
|
97
|
-
//acccum
|
|
98
|
-
//min2max
|
|
99
|
-
//max2min
|
|
100
|
-
//percentile
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|