@mat3ra/made 2024.3.22-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/.babelrc +10 -0
- package/.eslintrc.json +11 -0
- package/.mocharc.json +5 -0
- package/.prettierignore +1 -0
- package/.prettierrc +6 -0
- package/LICENSE.md +15 -0
- package/README.md +167 -0
- package/dist/abstract/array_with_ids.d.ts +43 -0
- package/dist/abstract/array_with_ids.js +88 -0
- package/dist/abstract/scalar_with_id.d.ts +25 -0
- package/dist/abstract/scalar_with_id.js +44 -0
- package/dist/basis/basis.d.ts +269 -0
- package/dist/basis/basis.js +499 -0
- package/dist/basis/constrained_basis.d.ts +56 -0
- package/dist/basis/constrained_basis.js +90 -0
- package/dist/basis/types.d.ts +1 -0
- package/dist/basis/types.js +2 -0
- package/dist/cell/cell.d.ts +45 -0
- package/dist/cell/cell.js +88 -0
- package/dist/cell/conventional_cell.d.ts +22 -0
- package/dist/cell/conventional_cell.js +83 -0
- package/dist/cell/primitive_cell.d.ts +9 -0
- package/dist/cell/primitive_cell.js +166 -0
- package/dist/constants.d.ts +2 -0
- package/dist/constants.js +25 -0
- package/dist/constraints/constraints.d.ts +45 -0
- package/dist/constraints/constraints.js +49 -0
- package/dist/lattice/lattice.d.ts +104 -0
- package/dist/lattice/lattice.js +208 -0
- package/dist/lattice/lattice_bravais.d.ts +59 -0
- package/dist/lattice/lattice_bravais.js +120 -0
- package/dist/lattice/lattice_vectors.d.ts +46 -0
- package/dist/lattice/lattice_vectors.js +98 -0
- package/dist/lattice/reciprocal/lattice_reciprocal.d.ts +75 -0
- package/dist/lattice/reciprocal/lattice_reciprocal.js +148 -0
- package/dist/lattice/reciprocal/paths.d.ts +24 -0
- package/dist/lattice/reciprocal/paths.js +136 -0
- package/dist/lattice/reciprocal/symmetry_points.d.ts +8 -0
- package/dist/lattice/reciprocal/symmetry_points.js +866 -0
- package/dist/lattice/types.d.ts +49 -0
- package/dist/lattice/types.js +127 -0
- package/dist/lattice/unit_cell.d.ts +30 -0
- package/dist/lattice/unit_cell.js +31 -0
- package/dist/made.d.ts +40 -0
- package/dist/made.js +39 -0
- package/dist/material.d.ts +1562 -0
- package/dist/material.js +317 -0
- package/dist/math.d.ts +395 -0
- package/dist/math.js +7 -0
- package/dist/parsers/cif.d.ts +10 -0
- package/dist/parsers/cif.js +21 -0
- package/dist/parsers/errors.d.ts +5 -0
- package/dist/parsers/errors.js +11 -0
- package/dist/parsers/espresso.d.ts +10 -0
- package/dist/parsers/espresso.js +24 -0
- package/dist/parsers/native_format_parsers.d.ts +26 -0
- package/dist/parsers/native_format_parsers.js +52 -0
- package/dist/parsers/parsers.d.ts +13 -0
- package/dist/parsers/parsers.js +17 -0
- package/dist/parsers/poscar.d.ts +31 -0
- package/dist/parsers/poscar.js +180 -0
- package/dist/parsers/xyz.d.ts +62 -0
- package/dist/parsers/xyz.js +167 -0
- package/dist/parsers/xyz_combinatorial_basis.d.ts +64 -0
- package/dist/parsers/xyz_combinatorial_basis.js +241 -0
- package/dist/tools/basis.d.ts +22 -0
- package/dist/tools/basis.js +100 -0
- package/dist/tools/cell.d.ts +9 -0
- package/dist/tools/cell.js +39 -0
- package/dist/tools/index.d.ts +11 -0
- package/dist/tools/index.js +15 -0
- package/dist/tools/material.d.ts +25 -0
- package/dist/tools/material.js +54 -0
- package/dist/tools/supercell.d.ts +22 -0
- package/dist/tools/supercell.js +62 -0
- package/dist/tools/surface.d.ts +10 -0
- package/dist/tools/surface.js +147 -0
- package/dist/types.d.ts +3 -0
- package/dist/types.js +2 -0
- package/package.json +89 -0
- package/pyproject.toml +77 -0
- package/src/js/abstract/array_with_ids.ts +100 -0
- package/src/js/abstract/scalar_with_id.ts +53 -0
- package/src/js/basis/basis.ts +607 -0
- package/src/js/basis/constrained_basis.ts +107 -0
- package/src/js/basis/types.ts +1 -0
- package/src/js/cell/cell.ts +109 -0
- package/src/js/cell/conventional_cell.ts +89 -0
- package/src/js/cell/primitive_cell.ts +189 -0
- package/src/js/constants.js +4 -0
- package/src/js/constraints/constraints.ts +63 -0
- package/src/js/lattice/lattice.ts +229 -0
- package/src/js/lattice/lattice_bravais.ts +170 -0
- package/src/js/lattice/lattice_vectors.ts +126 -0
- package/src/js/lattice/reciprocal/lattice_reciprocal.js +155 -0
- package/src/js/lattice/reciprocal/paths.js +134 -0
- package/src/js/lattice/reciprocal/symmetry_points.ts +886 -0
- package/src/js/lattice/types.ts +142 -0
- package/src/js/lattice/unit_cell.ts +66 -0
- package/src/js/made.js +36 -0
- package/src/js/material.ts +398 -0
- package/src/js/math.js +6 -0
- package/src/js/parsers/cif.js +22 -0
- package/src/js/parsers/errors.js +7 -0
- package/src/js/parsers/espresso.ts +30 -0
- package/src/js/parsers/native_format_parsers.js +51 -0
- package/src/js/parsers/parsers.js +13 -0
- package/src/js/parsers/poscar.ts +201 -0
- package/src/js/parsers/xyz.ts +216 -0
- package/src/js/parsers/xyz_combinatorial_basis.js +243 -0
- package/src/js/tools/basis.js +116 -0
- package/src/js/tools/cell.js +36 -0
- package/src/js/tools/index.js +11 -0
- package/src/js/tools/material.js +60 -0
- package/src/js/tools/supercell.ts +80 -0
- package/src/js/tools/surface.js +176 -0
- package/src/js/types.ts +4 -0
- package/src/py/__init__.py +0 -0
- package/src/py/mat3ra/__init__.py +0 -0
- package/src/py/mat3ra/made/__init__.py +5 -0
- package/tests/.gitattributes +1 -0
- package/tests/fixtures/AsGe-basis.json +3 -0
- package/tests/fixtures/C2H4-translated.json +3 -0
- package/tests/fixtures/C2H4.json +3 -0
- package/tests/fixtures/FeLiSi-basis.json +3 -0
- package/tests/fixtures/FeO.json +3 -0
- package/tests/fixtures/Ge2-basis.json +3 -0
- package/tests/fixtures/Graphene.json +3 -0
- package/tests/fixtures/Graphene.poscar +3 -0
- package/tests/fixtures/H2+H-final.json +3 -0
- package/tests/fixtures/H2+H-image.json +3 -0
- package/tests/fixtures/H2+H-initial.json +3 -0
- package/tests/fixtures/H2O.poscar +3 -0
- package/tests/fixtures/LiFeSi-basis.json +3 -0
- package/tests/fixtures/Na.json +3 -0
- package/tests/fixtures/Na4Cl4-cartesian.json +3 -0
- package/tests/fixtures/Na4Cl4.json +3 -0
- package/tests/fixtures/Na4Cl4.poscar +3 -0
- package/tests/fixtures/Ni-hex.json +3 -0
- package/tests/fixtures/Ni-hex.poscar +3 -0
- package/tests/fixtures/OSi-basis.json +3 -0
- package/tests/fixtures/Si-hex.json +3 -0
- package/tests/fixtures/Si-hex.poscar +3 -0
- package/tests/fixtures/Si-pwscf.in +3 -0
- package/tests/fixtures/Si-slab.json +3 -0
- package/tests/fixtures/Si-supercell.json +3 -0
- package/tests/fixtures/Si.json +3 -0
- package/tests/fixtures/Si2-basis-repeated.json +3 -0
- package/tests/fixtures/Si2-basis.json +3 -0
- package/tests/fixtures/Zr1H23Zr1H1.json +3 -0
- package/tests/fixtures/Zr1H23Zr1H1.poscar +3 -0
- package/tests/fixtures/atomic-constraints.json +3 -0
- package/tests/js/basis/basis.js +221 -0
- package/tests/js/cell/cell.js +21 -0
- package/tests/js/cell/primitive_cell.js +17 -0
- package/tests/js/constraints/constraints.js +27 -0
- package/tests/js/enums.js +40 -0
- package/tests/js/lattice/lattice.js +31 -0
- package/tests/js/lattice/lattice_bravais.js +17 -0
- package/tests/js/lattice/lattice_reciprocal.js +99 -0
- package/tests/js/lattice/lattice_vectors.js +10 -0
- package/tests/js/material.test.js +11 -0
- package/tests/js/parsers/espresso.js +12 -0
- package/tests/js/parsers/native_formats.js +30 -0
- package/tests/js/parsers/poscar.js +21 -0
- package/tests/js/parsers/xyz.js +25 -0
- package/tests/js/parsers/xyz_combinatorial_basis.js +153 -0
- package/tests/js/setup.js +6 -0
- package/tests/js/tools/basis.js +18 -0
- package/tests/js/tools/supercell.js +23 -0
- package/tests/js/tools/surface.js +12 -0
- package/tests/js/utils.js +17 -0
- package/tests/py/__init__.py +0 -0
- package/tests/py/unit/__init__.py +0 -0
- package/tests/py/unit/test_sample.py +10 -0
- package/tsconfig.json +3 -0
package/dist/math.d.ts
ADDED
|
@@ -0,0 +1,395 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
PI: number;
|
|
3
|
+
trunc: (x: number) => number;
|
|
4
|
+
product: (v1: number[], v2: number[]) => import("mathjs").Matrix;
|
|
5
|
+
vlen: (v: number[]) => import("mathjs").Matrix;
|
|
6
|
+
angle: (a: number[], b: number[], unit: string) => number;
|
|
7
|
+
angleUpTo90: (a: number[], b: number[], unit: string) => number;
|
|
8
|
+
vDist: (v1: number[], v2: number[]) => import("mathjs").Matrix | undefined;
|
|
9
|
+
vEqualWithTolerance: (vec1: number[], vec2: number[], tolerance?: number | undefined) => boolean;
|
|
10
|
+
roundToZero: (n: number) => number;
|
|
11
|
+
precise: (x: number, n?: number | undefined) => number;
|
|
12
|
+
mod: (num: number, tolerance?: number | undefined) => number;
|
|
13
|
+
isBetweenZeroInclusiveAndOne: (number: number, tolerance?: number | undefined) => boolean;
|
|
14
|
+
cartesianProduct: (...arg: number[][]) => number[][];
|
|
15
|
+
almostEqual: (a: number, b: number, tolerance?: number | undefined) => boolean;
|
|
16
|
+
combinations: (a: number, b: number, c: number) => number[][];
|
|
17
|
+
combinationsFromIntervals: (arrA: number[], arrB: number[], arrC: number[]) => number[][];
|
|
18
|
+
calculateSegmentsBetweenPoints3D: (point1: (string | number)[], point2: (string | number)[], n: string | number) => number[][];
|
|
19
|
+
roundValueToNDecimals: (value: number, decimals?: number | undefined) => number;
|
|
20
|
+
numberToPrecision: typeof import("@exabyte-io/code.js/dist/math").numberToPrecision;
|
|
21
|
+
e: number;
|
|
22
|
+
pi: number;
|
|
23
|
+
i: number;
|
|
24
|
+
Infinity: number;
|
|
25
|
+
LN2: number;
|
|
26
|
+
LN10: number;
|
|
27
|
+
LOG2E: number;
|
|
28
|
+
LOG10E: number;
|
|
29
|
+
NaN: number;
|
|
30
|
+
null: number;
|
|
31
|
+
phi: number;
|
|
32
|
+
SQRT1_2: number;
|
|
33
|
+
SQRT2: number;
|
|
34
|
+
tau: number;
|
|
35
|
+
uninitialized: any;
|
|
36
|
+
version: string;
|
|
37
|
+
expression: import("mathjs").MathNode;
|
|
38
|
+
json: mathjs.MathJsJson;
|
|
39
|
+
config: (options: any) => void;
|
|
40
|
+
lsolve(L: import("mathjs").Matrix | import("mathjs").MathArray, b: import("mathjs").Matrix | import("mathjs").MathArray): import("mathjs").Matrix | import("mathjs").MathArray;
|
|
41
|
+
lup(A?: import("mathjs").Matrix | import("mathjs").MathArray | undefined): import("mathjs").MathArray;
|
|
42
|
+
lusolve(A: number | import("mathjs").Matrix | import("mathjs").MathArray, b: import("mathjs").Matrix | import("mathjs").MathArray): import("mathjs").Matrix | import("mathjs").MathArray;
|
|
43
|
+
slu(A: import("mathjs").Matrix, order: number, threshold: number): any;
|
|
44
|
+
usolve(U: import("mathjs").Matrix | import("mathjs").MathArray, b: import("mathjs").Matrix | import("mathjs").MathArray): import("mathjs").Matrix | import("mathjs").MathArray;
|
|
45
|
+
abs(x: number): number;
|
|
46
|
+
abs(x: import("mathjs").BigNumber): import("mathjs").BigNumber;
|
|
47
|
+
abs(x: import("mathjs").Fraction): import("mathjs").Fraction;
|
|
48
|
+
abs(x: import("mathjs").Complex): import("mathjs").Complex;
|
|
49
|
+
abs(x: import("mathjs").MathArray): import("mathjs").MathArray;
|
|
50
|
+
abs(x: import("mathjs").Matrix): import("mathjs").Matrix;
|
|
51
|
+
abs(x: import("mathjs").Unit): import("mathjs").Unit;
|
|
52
|
+
add(x: import("mathjs").MathType, y: import("mathjs").MathType): import("mathjs").MathType;
|
|
53
|
+
cbrt(x: number, allRoots?: boolean | undefined): number;
|
|
54
|
+
cbrt(x: import("mathjs").BigNumber, allRoots?: boolean | undefined): import("mathjs").BigNumber;
|
|
55
|
+
cbrt(x: import("mathjs").Fraction, allRoots?: boolean | undefined): import("mathjs").Fraction;
|
|
56
|
+
cbrt(x: import("mathjs").Complex, allRoots?: boolean | undefined): import("mathjs").Complex;
|
|
57
|
+
cbrt(x: import("mathjs").MathArray, allRoots?: boolean | undefined): import("mathjs").MathArray;
|
|
58
|
+
cbrt(x: import("mathjs").Matrix, allRoots?: boolean | undefined): import("mathjs").Matrix;
|
|
59
|
+
cbrt(x: import("mathjs").Unit, allRoots?: boolean | undefined): import("mathjs").Unit;
|
|
60
|
+
ceil(x: number): number;
|
|
61
|
+
ceil(x: import("mathjs").BigNumber): import("mathjs").BigNumber;
|
|
62
|
+
ceil(x: import("mathjs").Fraction): import("mathjs").Fraction;
|
|
63
|
+
ceil(x: import("mathjs").Complex): import("mathjs").Complex;
|
|
64
|
+
ceil(x: import("mathjs").MathArray): import("mathjs").MathArray;
|
|
65
|
+
ceil(x: import("mathjs").Matrix): import("mathjs").Matrix;
|
|
66
|
+
ceil(x: import("mathjs").Unit): import("mathjs").Unit;
|
|
67
|
+
cube(x: number): number;
|
|
68
|
+
cube(x: import("mathjs").BigNumber): import("mathjs").BigNumber;
|
|
69
|
+
cube(x: import("mathjs").Fraction): import("mathjs").Fraction;
|
|
70
|
+
cube(x: import("mathjs").Complex): import("mathjs").Complex;
|
|
71
|
+
cube(x: import("mathjs").MathArray): import("mathjs").MathArray;
|
|
72
|
+
cube(x: import("mathjs").Matrix): import("mathjs").Matrix;
|
|
73
|
+
cube(x: import("mathjs").Unit): import("mathjs").Unit;
|
|
74
|
+
divide(x: import("mathjs").Unit, y: import("mathjs").Unit): import("mathjs").Unit;
|
|
75
|
+
divide(x: number, y: number): number;
|
|
76
|
+
divide(x: import("mathjs").MathType, y: import("mathjs").MathType): import("mathjs").MathType;
|
|
77
|
+
dotDivide(x: import("mathjs").MathType, y: import("mathjs").MathType): import("mathjs").MathType;
|
|
78
|
+
dotMultiply(x: import("mathjs").MathType, y: import("mathjs").MathType): import("mathjs").MathType;
|
|
79
|
+
dotPow(x: import("mathjs").MathType, y: import("mathjs").MathType): import("mathjs").MathType;
|
|
80
|
+
exp(x: number): number;
|
|
81
|
+
exp(x: import("mathjs").BigNumber): import("mathjs").BigNumber;
|
|
82
|
+
exp(x: import("mathjs").Complex): import("mathjs").Complex;
|
|
83
|
+
exp(x: import("mathjs").MathArray): import("mathjs").MathArray;
|
|
84
|
+
exp(x: import("mathjs").Matrix): import("mathjs").Matrix;
|
|
85
|
+
fix(x: number): number;
|
|
86
|
+
fix(x: import("mathjs").BigNumber): import("mathjs").BigNumber;
|
|
87
|
+
fix(x: import("mathjs").Fraction): import("mathjs").Fraction;
|
|
88
|
+
fix(x: import("mathjs").Complex): import("mathjs").Complex;
|
|
89
|
+
fix(x: import("mathjs").MathArray): import("mathjs").MathArray;
|
|
90
|
+
fix(x: import("mathjs").Matrix): import("mathjs").Matrix;
|
|
91
|
+
floor(x: number): number;
|
|
92
|
+
floor(x: import("mathjs").BigNumber): import("mathjs").BigNumber;
|
|
93
|
+
floor(x: import("mathjs").Fraction): import("mathjs").Fraction;
|
|
94
|
+
floor(x: import("mathjs").Complex): import("mathjs").Complex;
|
|
95
|
+
floor(x: import("mathjs").MathArray): import("mathjs").MathArray;
|
|
96
|
+
floor(x: import("mathjs").Matrix): import("mathjs").Matrix;
|
|
97
|
+
gcd(...args: number[]): number;
|
|
98
|
+
gcd(...args: import("mathjs").BigNumber[]): import("mathjs").BigNumber;
|
|
99
|
+
gcd(...args: import("mathjs").Fraction[]): import("mathjs").Fraction;
|
|
100
|
+
gcd(...args: import("mathjs").MathArray[]): import("mathjs").MathArray;
|
|
101
|
+
gcd(...args: import("mathjs").Matrix[]): import("mathjs").Matrix;
|
|
102
|
+
hypot(...args: number[]): number;
|
|
103
|
+
hypot(...args: import("mathjs").BigNumber[]): import("mathjs").BigNumber;
|
|
104
|
+
kron(x: import("mathjs").Matrix | import("mathjs").MathArray, y: import("mathjs").Matrix | import("mathjs").MathArray): import("mathjs").Matrix;
|
|
105
|
+
lcm(a: number, b: number): number;
|
|
106
|
+
lcm(a: import("mathjs").BigNumber, b: import("mathjs").BigNumber): import("mathjs").BigNumber;
|
|
107
|
+
lcm(a: import("mathjs").MathArray, b: import("mathjs").MathArray): import("mathjs").MathArray;
|
|
108
|
+
lcm(a: import("mathjs").Matrix, b: import("mathjs").Matrix): import("mathjs").Matrix;
|
|
109
|
+
log(x: number | import("mathjs").Matrix | import("mathjs").BigNumber | import("mathjs").Complex | import("mathjs").MathArray, base?: number | import("mathjs").BigNumber | import("mathjs").Complex | undefined): number | import("mathjs").Matrix | import("mathjs").BigNumber | import("mathjs").Complex | import("mathjs").MathArray;
|
|
110
|
+
log10(x: number): number;
|
|
111
|
+
log10(x: import("mathjs").BigNumber): import("mathjs").BigNumber;
|
|
112
|
+
log10(x: import("mathjs").Complex): import("mathjs").Complex;
|
|
113
|
+
log10(x: import("mathjs").MathArray): import("mathjs").MathArray;
|
|
114
|
+
log10(x: import("mathjs").Matrix): import("mathjs").Matrix;
|
|
115
|
+
multiply(x: import("mathjs").Matrix | import("mathjs").MathArray, y: import("mathjs").MathType): import("mathjs").Matrix;
|
|
116
|
+
multiply(x: import("mathjs").Unit, y: import("mathjs").Unit): import("mathjs").Unit;
|
|
117
|
+
multiply(x: number, y: number): number;
|
|
118
|
+
multiply(x: import("mathjs").MathType, y: import("mathjs").MathType): import("mathjs").MathType;
|
|
119
|
+
norm(x: number | import("mathjs").Matrix | import("mathjs").BigNumber | import("mathjs").Complex | import("mathjs").MathArray, p?: string | number | import("mathjs").BigNumber | undefined): number | import("mathjs").BigNumber;
|
|
120
|
+
nthRoot(a: number | import("mathjs").Matrix | import("mathjs").BigNumber | import("mathjs").Complex | import("mathjs").MathArray, root?: number | import("mathjs").BigNumber | undefined): number | import("mathjs").Matrix | import("mathjs").Complex | import("mathjs").MathArray;
|
|
121
|
+
pow(x: import("mathjs").MathType, y: number | import("mathjs").BigNumber | import("mathjs").Complex): import("mathjs").MathType;
|
|
122
|
+
round(x: number | import("mathjs").Matrix | import("mathjs").BigNumber | import("mathjs").Fraction | import("mathjs").Complex | import("mathjs").MathArray, n?: number | import("mathjs").BigNumber | import("mathjs").MathArray | undefined): number | import("mathjs").Matrix | import("mathjs").BigNumber | import("mathjs").Fraction | import("mathjs").Complex | import("mathjs").MathArray;
|
|
123
|
+
sign(x: number): number;
|
|
124
|
+
sign(x: import("mathjs").BigNumber): import("mathjs").BigNumber;
|
|
125
|
+
sign(x: import("mathjs").Fraction): import("mathjs").Fraction;
|
|
126
|
+
sign(x: import("mathjs").Complex): import("mathjs").Complex;
|
|
127
|
+
sign(x: import("mathjs").MathArray): import("mathjs").MathArray;
|
|
128
|
+
sign(x: import("mathjs").Matrix): import("mathjs").Matrix;
|
|
129
|
+
sign(x: import("mathjs").Unit): import("mathjs").Unit;
|
|
130
|
+
sqrt(x: number): number;
|
|
131
|
+
sqrt(x: import("mathjs").BigNumber): import("mathjs").BigNumber;
|
|
132
|
+
sqrt(x: import("mathjs").Complex): import("mathjs").Complex;
|
|
133
|
+
sqrt(x: import("mathjs").MathArray): import("mathjs").MathArray;
|
|
134
|
+
sqrt(x: import("mathjs").Matrix): import("mathjs").Matrix;
|
|
135
|
+
sqrt(x: import("mathjs").Unit): import("mathjs").Unit;
|
|
136
|
+
square(x: number): number;
|
|
137
|
+
square(x: import("mathjs").BigNumber): import("mathjs").BigNumber;
|
|
138
|
+
square(x: import("mathjs").Fraction): import("mathjs").Fraction;
|
|
139
|
+
square(x: import("mathjs").Complex): import("mathjs").Complex;
|
|
140
|
+
square(x: import("mathjs").MathArray): import("mathjs").MathArray;
|
|
141
|
+
square(x: import("mathjs").Matrix): import("mathjs").Matrix;
|
|
142
|
+
square(x: import("mathjs").Unit): import("mathjs").Unit;
|
|
143
|
+
subtract(x: import("mathjs").MathType, y: import("mathjs").MathType): import("mathjs").MathType;
|
|
144
|
+
unaryMinus(x: number): number;
|
|
145
|
+
unaryMinus(x: import("mathjs").BigNumber): import("mathjs").BigNumber;
|
|
146
|
+
unaryMinus(x: import("mathjs").Fraction): import("mathjs").Fraction;
|
|
147
|
+
unaryMinus(x: import("mathjs").Complex): import("mathjs").Complex;
|
|
148
|
+
unaryMinus(x: import("mathjs").MathArray): import("mathjs").MathArray;
|
|
149
|
+
unaryMinus(x: import("mathjs").Matrix): import("mathjs").Matrix;
|
|
150
|
+
unaryMinus(x: import("mathjs").Unit): import("mathjs").Unit;
|
|
151
|
+
unaryPlus(x: number): number;
|
|
152
|
+
unaryPlus(x: import("mathjs").BigNumber): import("mathjs").BigNumber;
|
|
153
|
+
unaryPlus(x: import("mathjs").Fraction): import("mathjs").Fraction;
|
|
154
|
+
unaryPlus(x: string): string;
|
|
155
|
+
unaryPlus(x: import("mathjs").Complex): import("mathjs").Complex;
|
|
156
|
+
unaryPlus(x: import("mathjs").MathArray): import("mathjs").MathArray;
|
|
157
|
+
unaryPlus(x: import("mathjs").Matrix): import("mathjs").Matrix;
|
|
158
|
+
unaryPlus(x: import("mathjs").Unit): import("mathjs").Unit;
|
|
159
|
+
xgcd(a: number | import("mathjs").BigNumber, b: number | import("mathjs").BigNumber): import("mathjs").MathArray;
|
|
160
|
+
bitAnd(x: number | import("mathjs").Matrix | import("mathjs").BigNumber | import("mathjs").MathArray, y: number | import("mathjs").Matrix | import("mathjs").BigNumber | import("mathjs").MathArray): number | import("mathjs").Matrix | import("mathjs").BigNumber | import("mathjs").MathArray;
|
|
161
|
+
bitNot(x: number): number;
|
|
162
|
+
bitNot(x: import("mathjs").BigNumber): import("mathjs").BigNumber;
|
|
163
|
+
bitNot(x: import("mathjs").MathArray): import("mathjs").MathArray;
|
|
164
|
+
bitNot(x: import("mathjs").Matrix): import("mathjs").Matrix;
|
|
165
|
+
bitOr(x: number): number;
|
|
166
|
+
bitOr(x: import("mathjs").BigNumber): import("mathjs").BigNumber;
|
|
167
|
+
bitOr(x: import("mathjs").MathArray): import("mathjs").MathArray;
|
|
168
|
+
bitOr(x: import("mathjs").Matrix): import("mathjs").Matrix;
|
|
169
|
+
bitXor(x: number | import("mathjs").Matrix | import("mathjs").BigNumber | import("mathjs").MathArray, y: number | import("mathjs").Matrix | import("mathjs").BigNumber | import("mathjs").MathArray): number | import("mathjs").Matrix | import("mathjs").BigNumber | import("mathjs").MathArray;
|
|
170
|
+
leftShift(x: number | import("mathjs").Matrix | import("mathjs").BigNumber | import("mathjs").MathArray, y: number | import("mathjs").BigNumber): number | import("mathjs").Matrix | import("mathjs").BigNumber | import("mathjs").MathArray;
|
|
171
|
+
rightArithShift(x: number | import("mathjs").Matrix | import("mathjs").BigNumber | import("mathjs").MathArray, y: number | import("mathjs").BigNumber): number | import("mathjs").Matrix | import("mathjs").BigNumber | import("mathjs").MathArray;
|
|
172
|
+
rightLogShift(x: number | import("mathjs").Matrix | import("mathjs").MathArray, y: number): number | import("mathjs").Matrix | import("mathjs").MathArray;
|
|
173
|
+
bellNumbers(n: number): number;
|
|
174
|
+
bellNumbers(n: import("mathjs").BigNumber): import("mathjs").BigNumber;
|
|
175
|
+
catalan(n: number): number;
|
|
176
|
+
catalan(n: import("mathjs").BigNumber): import("mathjs").BigNumber;
|
|
177
|
+
composition(n: number | import("mathjs").BigNumber, k: number | import("mathjs").BigNumber): number | import("mathjs").BigNumber;
|
|
178
|
+
stirlingS2(n: number | import("mathjs").BigNumber, k: number | import("mathjs").BigNumber): number | import("mathjs").BigNumber;
|
|
179
|
+
arg(x: number | import("mathjs").Complex): number;
|
|
180
|
+
arg(x: import("mathjs").MathArray): import("mathjs").MathArray;
|
|
181
|
+
arg(x: import("mathjs").Matrix): import("mathjs").Matrix;
|
|
182
|
+
conj(x: number | import("mathjs").Matrix | import("mathjs").BigNumber | import("mathjs").Complex | import("mathjs").MathArray): number | import("mathjs").Matrix | import("mathjs").BigNumber | import("mathjs").Complex | import("mathjs").MathArray;
|
|
183
|
+
im(x: number | import("mathjs").Matrix | import("mathjs").BigNumber | import("mathjs").Complex | import("mathjs").MathArray): number | import("mathjs").Matrix | import("mathjs").BigNumber | import("mathjs").MathArray;
|
|
184
|
+
re(x: number | import("mathjs").Matrix | import("mathjs").BigNumber | import("mathjs").Complex | import("mathjs").MathArray): number | import("mathjs").Matrix | import("mathjs").BigNumber | import("mathjs").MathArray;
|
|
185
|
+
bignumber(x?: string | number | boolean | import("mathjs").Matrix | import("mathjs").MathArray | undefined): import("mathjs").BigNumber;
|
|
186
|
+
boolean(x: string | number | boolean | import("mathjs").Matrix | import("mathjs").MathArray): boolean | import("mathjs").Matrix | import("mathjs").MathArray;
|
|
187
|
+
chain(value?: any): any;
|
|
188
|
+
complex(arg?: string | import("mathjs").Complex | import("mathjs").MathArray | import("mathjs").PolarCoordinates | undefined): import("mathjs").Complex;
|
|
189
|
+
complex(re: number, im: number): import("mathjs").Complex;
|
|
190
|
+
fraction(numerator: string | number | import("mathjs").Matrix | import("mathjs").MathArray, denominator?: string | number | import("mathjs").Matrix | import("mathjs").MathArray | undefined): import("mathjs").Matrix | import("mathjs").Fraction | import("mathjs").MathArray;
|
|
191
|
+
index(...ranges: any[]): import("mathjs").Index;
|
|
192
|
+
matrix(format?: "sparse" | "dense" | undefined): import("mathjs").Matrix;
|
|
193
|
+
matrix(data: import("mathjs").Matrix | import("mathjs").MathArray, format?: "sparse" | "dense" | undefined, dataType?: string | undefined): import("mathjs").Matrix;
|
|
194
|
+
number(value?: string | number | boolean | import("mathjs").Matrix | import("mathjs").BigNumber | import("mathjs").Fraction | import("mathjs").Unit | import("mathjs").MathArray | undefined): number | import("mathjs").Matrix | import("mathjs").MathArray;
|
|
195
|
+
number(unit: import("mathjs").Unit, valuelessUnit: string | import("mathjs").Unit): number | import("mathjs").Matrix | import("mathjs").MathArray;
|
|
196
|
+
sparse(data?: import("mathjs").Matrix | import("mathjs").MathArray | undefined, dataType?: string | undefined): import("mathjs").Matrix;
|
|
197
|
+
string(value: any): string | import("mathjs").Matrix | import("mathjs").MathArray;
|
|
198
|
+
unit(unit: string): import("mathjs").Unit;
|
|
199
|
+
unit(value: number, unit: string): import("mathjs").Unit;
|
|
200
|
+
createUnit(name: string, definition?: string | import("mathjs").UnitDefinition | undefined, options?: import("mathjs").CreateUnitOptions | undefined): import("mathjs").Unit;
|
|
201
|
+
createUnit(units: Record<string, string | import("mathjs").UnitDefinition>, options?: import("mathjs").CreateUnitOptions | undefined): import("mathjs").Unit;
|
|
202
|
+
compile(expr: import("mathjs").MathExpression): import("mathjs").EvalFunction;
|
|
203
|
+
compile(exprs: import("mathjs").MathExpression[]): import("mathjs").EvalFunction[];
|
|
204
|
+
eval(expr: import("mathjs").MathExpression | import("mathjs").MathExpression[], scope?: any): any;
|
|
205
|
+
help(search: any): import("mathjs").Help;
|
|
206
|
+
parse(expr: import("mathjs").MathExpression, options?: any): import("mathjs").MathNode;
|
|
207
|
+
parse(exprs: import("mathjs").MathExpression[], options?: any): import("mathjs").MathNode[];
|
|
208
|
+
parser(): import("mathjs").Parser;
|
|
209
|
+
distance(x: import("mathjs").MathType, y: import("mathjs").MathType): number | import("mathjs").BigNumber;
|
|
210
|
+
intersect(w: import("mathjs").Matrix | import("mathjs").MathArray, x: import("mathjs").Matrix | import("mathjs").MathArray, y: import("mathjs").Matrix | import("mathjs").MathArray, z: import("mathjs").Matrix | import("mathjs").MathArray): import("mathjs").MathArray;
|
|
211
|
+
and(x: number | import("mathjs").Matrix | import("mathjs").BigNumber | import("mathjs").Complex | import("mathjs").Unit | import("mathjs").MathArray, y: number | import("mathjs").Matrix | import("mathjs").BigNumber | import("mathjs").Complex | import("mathjs").Unit | import("mathjs").MathArray): boolean | import("mathjs").Matrix | import("mathjs").MathArray;
|
|
212
|
+
not(x: number | import("mathjs").Matrix | import("mathjs").BigNumber | import("mathjs").Complex | import("mathjs").Unit | import("mathjs").MathArray): boolean | import("mathjs").Matrix | import("mathjs").MathArray;
|
|
213
|
+
or(x: number | import("mathjs").Matrix | import("mathjs").BigNumber | import("mathjs").Complex | import("mathjs").Unit | import("mathjs").MathArray, y: number | import("mathjs").Matrix | import("mathjs").BigNumber | import("mathjs").Complex | import("mathjs").Unit | import("mathjs").MathArray): boolean | import("mathjs").Matrix | import("mathjs").MathArray;
|
|
214
|
+
xor(x: number | import("mathjs").Matrix | import("mathjs").BigNumber | import("mathjs").Complex | import("mathjs").Unit | import("mathjs").MathArray, y: number | import("mathjs").Matrix | import("mathjs").BigNumber | import("mathjs").Complex | import("mathjs").Unit | import("mathjs").MathArray): boolean | import("mathjs").Matrix | import("mathjs").MathArray;
|
|
215
|
+
concat(...args: (number | import("mathjs").Matrix | import("mathjs").MathArray)[]): import("mathjs").Matrix | import("mathjs").MathArray;
|
|
216
|
+
cross(x: import("mathjs").Matrix | import("mathjs").MathArray, y: import("mathjs").Matrix | import("mathjs").MathArray): import("mathjs").Matrix;
|
|
217
|
+
det(x: import("mathjs").Matrix | import("mathjs").MathArray): number;
|
|
218
|
+
diag(X: import("mathjs").Matrix | import("mathjs").MathArray, format?: string | undefined): import("mathjs").Matrix;
|
|
219
|
+
diag(X: import("mathjs").Matrix | import("mathjs").MathArray, k: number | import("mathjs").BigNumber, format?: string | undefined): import("mathjs").Matrix;
|
|
220
|
+
dot(x: import("mathjs").Matrix | import("mathjs").MathArray, y: import("mathjs").Matrix | import("mathjs").MathArray): number;
|
|
221
|
+
eye(n: number | number[], format?: string | undefined): import("mathjs").Matrix;
|
|
222
|
+
eye(m: number, n: number, format?: string | undefined): import("mathjs").Matrix;
|
|
223
|
+
flatten(x: import("mathjs").Matrix | import("mathjs").MathArray): import("mathjs").Matrix | import("mathjs").MathArray;
|
|
224
|
+
inv(x: number | import("mathjs").Matrix | import("mathjs").Complex | import("mathjs").MathArray): number | import("mathjs").Matrix | import("mathjs").Complex | import("mathjs").MathArray;
|
|
225
|
+
ones(n: number | number[], format?: string | undefined): import("mathjs").Matrix | import("mathjs").MathArray;
|
|
226
|
+
ones(m: number, n: number, format?: string | undefined): import("mathjs").Matrix | import("mathjs").MathArray;
|
|
227
|
+
range(str: string, includeEnd?: boolean | undefined): import("mathjs").Matrix;
|
|
228
|
+
range(start: number | import("mathjs").BigNumber, end: number | import("mathjs").BigNumber, includeEnd?: boolean | undefined): import("mathjs").Matrix;
|
|
229
|
+
range(start: number | import("mathjs").BigNumber, end: number | import("mathjs").BigNumber, step: number | import("mathjs").BigNumber, includeEnd?: boolean | undefined): import("mathjs").Matrix;
|
|
230
|
+
resize(x: import("mathjs").Matrix | import("mathjs").MathArray, size: import("mathjs").Matrix | import("mathjs").MathArray, defaultValue?: string | number | undefined): import("mathjs").Matrix | import("mathjs").MathArray;
|
|
231
|
+
size(x: string | number | boolean | import("mathjs").Matrix | import("mathjs").Complex | import("mathjs").Unit | import("mathjs").MathArray): import("mathjs").Matrix | import("mathjs").MathArray;
|
|
232
|
+
squeeze(x: import("mathjs").Matrix | import("mathjs").MathArray): import("mathjs").Matrix | import("mathjs").MathArray;
|
|
233
|
+
subset(value: string | import("mathjs").Matrix | import("mathjs").MathArray, index: import("mathjs").Index, replacement?: any, defaultValue?: any): string | import("mathjs").Matrix | import("mathjs").MathArray;
|
|
234
|
+
trace(x: import("mathjs").Matrix | import("mathjs").MathArray): number;
|
|
235
|
+
transpose(x: import("mathjs").Matrix | import("mathjs").MathArray): import("mathjs").Matrix | import("mathjs").MathArray;
|
|
236
|
+
zeros(n: number | number[], format?: string | undefined): import("mathjs").Matrix | import("mathjs").MathArray;
|
|
237
|
+
zeros(m: number, n: number, format?: string | undefined): import("mathjs").Matrix | import("mathjs").MathArray;
|
|
238
|
+
distribution(name: string): import("mathjs").Distribution;
|
|
239
|
+
factorial(n: number | import("mathjs").Matrix | import("mathjs").BigNumber | import("mathjs").MathArray): number | import("mathjs").Matrix | import("mathjs").BigNumber | import("mathjs").MathArray;
|
|
240
|
+
gamma(n: number | import("mathjs").Matrix | import("mathjs").MathArray): number | import("mathjs").Matrix | import("mathjs").MathArray;
|
|
241
|
+
kldivergence(x: import("mathjs").Matrix | import("mathjs").MathArray, y: import("mathjs").Matrix | import("mathjs").MathArray): number;
|
|
242
|
+
multinomial(a: number[] | import("mathjs").BigNumber[]): number | import("mathjs").BigNumber;
|
|
243
|
+
permutations(n: number | import("mathjs").BigNumber, k?: number | import("mathjs").BigNumber | undefined): number | import("mathjs").BigNumber;
|
|
244
|
+
pickRandom(array: number[]): number;
|
|
245
|
+
random(min?: number | undefined, max?: number | undefined): number;
|
|
246
|
+
random(size: import("mathjs").Matrix | import("mathjs").MathArray, min?: number | undefined, max?: number | undefined): import("mathjs").Matrix | import("mathjs").MathArray;
|
|
247
|
+
randomInt(min: number, max?: number | undefined): number;
|
|
248
|
+
randomInt(size: import("mathjs").Matrix | import("mathjs").MathArray, min?: number | undefined, max?: number | undefined): import("mathjs").Matrix | import("mathjs").MathArray;
|
|
249
|
+
compare(x: import("mathjs").MathType, y: import("mathjs").MathType): number | import("mathjs").Matrix | import("mathjs").BigNumber | import("mathjs").Fraction | import("mathjs").MathArray;
|
|
250
|
+
deepEqual(x: import("mathjs").MathType, y: import("mathjs").MathType): number | import("mathjs").Matrix | import("mathjs").BigNumber | import("mathjs").Fraction | import("mathjs").Complex | import("mathjs").Unit | import("mathjs").MathArray;
|
|
251
|
+
equal(x: import("mathjs").MathType, y: import("mathjs").MathType): boolean | import("mathjs").Matrix | import("mathjs").MathArray;
|
|
252
|
+
larger(x: import("mathjs").MathType, y: import("mathjs").MathType): boolean | import("mathjs").Matrix | import("mathjs").MathArray;
|
|
253
|
+
largerEq(x: import("mathjs").MathType, y: import("mathjs").MathType): boolean | import("mathjs").Matrix | import("mathjs").MathArray;
|
|
254
|
+
smaller(x: import("mathjs").MathType, y: import("mathjs").MathType): boolean | import("mathjs").Matrix | import("mathjs").MathArray;
|
|
255
|
+
smallerEq(x: import("mathjs").MathType, y: import("mathjs").MathType): boolean | import("mathjs").Matrix | import("mathjs").MathArray;
|
|
256
|
+
unequal(x: import("mathjs").MathType, y: import("mathjs").MathType): boolean | import("mathjs").Matrix | import("mathjs").MathArray;
|
|
257
|
+
max(...args: import("mathjs").MathType[]): any;
|
|
258
|
+
max(A: import("mathjs").Matrix | import("mathjs").MathArray, dim?: number | undefined): any;
|
|
259
|
+
mean(...args: import("mathjs").MathType[]): any;
|
|
260
|
+
mean(A: import("mathjs").Matrix | import("mathjs").MathArray, dim?: number | undefined): any;
|
|
261
|
+
median(...args: import("mathjs").MathType[]): any;
|
|
262
|
+
min(...args: import("mathjs").MathType[]): any;
|
|
263
|
+
min(A: import("mathjs").Matrix | import("mathjs").MathArray, dim?: number | undefined): any;
|
|
264
|
+
mode(...args: import("mathjs").MathType[]): any;
|
|
265
|
+
prod(...args: import("mathjs").MathType[]): any;
|
|
266
|
+
quantileSeq(A: import("mathjs").Matrix | import("mathjs").MathArray, prob: number | import("mathjs").BigNumber | import("mathjs").MathArray, sorted?: boolean | undefined): number | import("mathjs").BigNumber | import("mathjs").Unit | import("mathjs").MathArray;
|
|
267
|
+
std(array: import("mathjs").Matrix | import("mathjs").MathArray, normalization?: string | undefined): number;
|
|
268
|
+
sum(...args: (number | import("mathjs").BigNumber | import("mathjs").Fraction)[]): any;
|
|
269
|
+
sum(array: import("mathjs").Matrix | import("mathjs").MathArray): any;
|
|
270
|
+
var(...args: (number | import("mathjs").BigNumber | import("mathjs").Fraction)[]): any;
|
|
271
|
+
var(array: import("mathjs").Matrix | import("mathjs").MathArray, normalization?: string | undefined): any;
|
|
272
|
+
acos(x: number): number;
|
|
273
|
+
acos(x: import("mathjs").BigNumber): import("mathjs").BigNumber;
|
|
274
|
+
acos(x: import("mathjs").Complex): import("mathjs").Complex;
|
|
275
|
+
acos(x: import("mathjs").MathArray): import("mathjs").MathArray;
|
|
276
|
+
acos(x: import("mathjs").Matrix): import("mathjs").Matrix;
|
|
277
|
+
acosh(x: number): number;
|
|
278
|
+
acosh(x: import("mathjs").BigNumber): import("mathjs").BigNumber;
|
|
279
|
+
acosh(x: import("mathjs").Complex): import("mathjs").Complex;
|
|
280
|
+
acosh(x: import("mathjs").MathArray): import("mathjs").MathArray;
|
|
281
|
+
acosh(x: import("mathjs").Matrix): import("mathjs").Matrix;
|
|
282
|
+
acot(x: number): number;
|
|
283
|
+
acot(x: import("mathjs").BigNumber): import("mathjs").BigNumber;
|
|
284
|
+
acot(x: import("mathjs").MathArray): import("mathjs").MathArray;
|
|
285
|
+
acot(x: import("mathjs").Matrix): import("mathjs").Matrix;
|
|
286
|
+
acoth(x: number): number;
|
|
287
|
+
acoth(x: import("mathjs").BigNumber): import("mathjs").BigNumber;
|
|
288
|
+
acoth(x: import("mathjs").MathArray): import("mathjs").MathArray;
|
|
289
|
+
acoth(x: import("mathjs").Matrix): import("mathjs").Matrix;
|
|
290
|
+
acsc(x: number): number;
|
|
291
|
+
acsc(x: import("mathjs").BigNumber): import("mathjs").BigNumber;
|
|
292
|
+
acsc(x: import("mathjs").MathArray): import("mathjs").MathArray;
|
|
293
|
+
acsc(x: import("mathjs").Matrix): import("mathjs").Matrix;
|
|
294
|
+
acsch(x: number): number;
|
|
295
|
+
acsch(x: import("mathjs").BigNumber): import("mathjs").BigNumber;
|
|
296
|
+
acsch(x: import("mathjs").MathArray): import("mathjs").MathArray;
|
|
297
|
+
acsch(x: import("mathjs").Matrix): import("mathjs").Matrix;
|
|
298
|
+
asec(x: number): number;
|
|
299
|
+
asec(x: import("mathjs").BigNumber): import("mathjs").BigNumber;
|
|
300
|
+
asec(x: import("mathjs").MathArray): import("mathjs").MathArray;
|
|
301
|
+
asec(x: import("mathjs").Matrix): import("mathjs").Matrix;
|
|
302
|
+
asech(x: number): number;
|
|
303
|
+
asech(x: import("mathjs").BigNumber): import("mathjs").BigNumber;
|
|
304
|
+
asech(x: import("mathjs").MathArray): import("mathjs").MathArray;
|
|
305
|
+
asech(x: import("mathjs").Matrix): import("mathjs").Matrix;
|
|
306
|
+
asin(x: number): number;
|
|
307
|
+
asin(x: import("mathjs").BigNumber): import("mathjs").BigNumber;
|
|
308
|
+
asin(x: import("mathjs").Complex): import("mathjs").Complex;
|
|
309
|
+
asin(x: import("mathjs").MathArray): import("mathjs").MathArray;
|
|
310
|
+
asin(x: import("mathjs").Matrix): import("mathjs").Matrix;
|
|
311
|
+
asinh(x: number): number;
|
|
312
|
+
asinh(x: import("mathjs").BigNumber): import("mathjs").BigNumber;
|
|
313
|
+
asinh(x: import("mathjs").MathArray): import("mathjs").MathArray;
|
|
314
|
+
asinh(x: import("mathjs").Matrix): import("mathjs").Matrix;
|
|
315
|
+
atan(x: number): number;
|
|
316
|
+
atan(x: import("mathjs").BigNumber): import("mathjs").BigNumber;
|
|
317
|
+
atan(x: import("mathjs").MathArray): import("mathjs").MathArray;
|
|
318
|
+
atan(x: import("mathjs").Matrix): import("mathjs").Matrix;
|
|
319
|
+
atan2(y: number, x: number): number;
|
|
320
|
+
atan2(y: import("mathjs").Matrix | import("mathjs").MathArray, x: import("mathjs").Matrix | import("mathjs").MathArray): import("mathjs").Matrix | import("mathjs").MathArray;
|
|
321
|
+
atanh(x: number): number;
|
|
322
|
+
atanh(x: import("mathjs").BigNumber): import("mathjs").BigNumber;
|
|
323
|
+
atanh(x: import("mathjs").MathArray): import("mathjs").MathArray;
|
|
324
|
+
atanh(x: import("mathjs").Matrix): import("mathjs").Matrix;
|
|
325
|
+
cosh(x: number | import("mathjs").Unit): number;
|
|
326
|
+
cosh(x: import("mathjs").BigNumber): import("mathjs").BigNumber;
|
|
327
|
+
cosh(x: import("mathjs").Complex): import("mathjs").Complex;
|
|
328
|
+
cosh(x: import("mathjs").MathArray): import("mathjs").MathArray;
|
|
329
|
+
cosh(x: import("mathjs").Matrix): import("mathjs").Matrix;
|
|
330
|
+
cot(x: number | import("mathjs").Unit): number;
|
|
331
|
+
cot(x: import("mathjs").Complex): import("mathjs").Complex;
|
|
332
|
+
cot(x: import("mathjs").MathArray): import("mathjs").MathArray;
|
|
333
|
+
cot(x: import("mathjs").Matrix): import("mathjs").Matrix;
|
|
334
|
+
coth(x: number | import("mathjs").Unit): number;
|
|
335
|
+
coth(x: import("mathjs").Complex): import("mathjs").Complex;
|
|
336
|
+
coth(x: import("mathjs").MathArray): import("mathjs").MathArray;
|
|
337
|
+
coth(x: import("mathjs").Matrix): import("mathjs").Matrix;
|
|
338
|
+
csc(x: number | import("mathjs").Unit): number;
|
|
339
|
+
csc(x: import("mathjs").Complex): import("mathjs").Complex;
|
|
340
|
+
csc(x: import("mathjs").MathArray): import("mathjs").MathArray;
|
|
341
|
+
csc(x: import("mathjs").Matrix): import("mathjs").Matrix;
|
|
342
|
+
csch(x: number | import("mathjs").Unit): number;
|
|
343
|
+
csch(x: import("mathjs").Complex): import("mathjs").Complex;
|
|
344
|
+
csch(x: import("mathjs").MathArray): import("mathjs").MathArray;
|
|
345
|
+
csch(x: import("mathjs").Matrix): import("mathjs").Matrix;
|
|
346
|
+
sec(x: number | import("mathjs").Unit): number;
|
|
347
|
+
sec(x: import("mathjs").Complex): import("mathjs").Complex;
|
|
348
|
+
sec(x: import("mathjs").MathArray): import("mathjs").MathArray;
|
|
349
|
+
sec(x: import("mathjs").Matrix): import("mathjs").Matrix;
|
|
350
|
+
sech(x: number | import("mathjs").Unit): number;
|
|
351
|
+
sech(x: import("mathjs").Complex): import("mathjs").Complex;
|
|
352
|
+
sech(x: import("mathjs").MathArray): import("mathjs").MathArray;
|
|
353
|
+
sech(x: import("mathjs").Matrix): import("mathjs").Matrix;
|
|
354
|
+
sin(x: number | import("mathjs").Unit): number;
|
|
355
|
+
sin(x: import("mathjs").BigNumber): import("mathjs").BigNumber;
|
|
356
|
+
sin(x: import("mathjs").Complex): import("mathjs").Complex;
|
|
357
|
+
sin(x: import("mathjs").MathArray): import("mathjs").MathArray;
|
|
358
|
+
sin(x: import("mathjs").Matrix): import("mathjs").Matrix;
|
|
359
|
+
cos(x: number | import("mathjs").Unit): number;
|
|
360
|
+
cos(x: import("mathjs").BigNumber): import("mathjs").BigNumber;
|
|
361
|
+
cos(x: import("mathjs").Complex): import("mathjs").Complex;
|
|
362
|
+
cos(x: import("mathjs").MathArray): import("mathjs").MathArray;
|
|
363
|
+
cos(x: import("mathjs").Matrix): import("mathjs").Matrix;
|
|
364
|
+
sinh(x: number | import("mathjs").Unit): number;
|
|
365
|
+
sinh(x: import("mathjs").BigNumber): import("mathjs").BigNumber;
|
|
366
|
+
sinh(x: import("mathjs").Complex): import("mathjs").Complex;
|
|
367
|
+
sinh(x: import("mathjs").MathArray): import("mathjs").MathArray;
|
|
368
|
+
sinh(x: import("mathjs").Matrix): import("mathjs").Matrix;
|
|
369
|
+
tan(x: number | import("mathjs").Unit): number;
|
|
370
|
+
tan(x: import("mathjs").BigNumber): import("mathjs").BigNumber;
|
|
371
|
+
tan(x: import("mathjs").Complex): import("mathjs").Complex;
|
|
372
|
+
tan(x: import("mathjs").MathArray): import("mathjs").MathArray;
|
|
373
|
+
tan(x: import("mathjs").Matrix): import("mathjs").Matrix;
|
|
374
|
+
tanh(x: number | import("mathjs").Unit): number;
|
|
375
|
+
tanh(x: import("mathjs").BigNumber): import("mathjs").BigNumber;
|
|
376
|
+
tanh(x: import("mathjs").Complex): import("mathjs").Complex;
|
|
377
|
+
tanh(x: import("mathjs").MathArray): import("mathjs").MathArray;
|
|
378
|
+
tanh(x: import("mathjs").Matrix): import("mathjs").Matrix;
|
|
379
|
+
to(x: import("mathjs").Matrix | import("mathjs").Unit | import("mathjs").MathArray, unit: string | import("mathjs").Unit): import("mathjs").Matrix | import("mathjs").Unit | import("mathjs").MathArray;
|
|
380
|
+
clone(x: any): any;
|
|
381
|
+
filter(x: import("mathjs").Matrix | import("mathjs").MathArray, test: RegExp | ((item: any) => boolean)): import("mathjs").Matrix | import("mathjs").MathArray;
|
|
382
|
+
forEach: (x: import("mathjs").Matrix | import("mathjs").MathArray, callback: (item: any) => any) => void;
|
|
383
|
+
format(value: any, options?: number | import("mathjs").FormatOptions | ((item: any) => string) | undefined): string;
|
|
384
|
+
isInteger(x: any): boolean;
|
|
385
|
+
isNegative(x: any): boolean;
|
|
386
|
+
isNumeric(x: any): boolean;
|
|
387
|
+
isPositive(x: any): boolean;
|
|
388
|
+
isZero(x: any): boolean;
|
|
389
|
+
map(x: import("mathjs").Matrix | import("mathjs").MathArray, callback: (item: any) => any): import("mathjs").Matrix | import("mathjs").MathArray;
|
|
390
|
+
partitionSelect(x: import("mathjs").Matrix | import("mathjs").MathArray, k: number, compare?: string | ((a: any, b: any) => number) | undefined): any;
|
|
391
|
+
print: (template: string, values: any, precision?: number | undefined) => void;
|
|
392
|
+
sort(x: import("mathjs").Matrix | import("mathjs").MathArray, compare?: string | ((a: any, b: any) => number) | undefined): import("mathjs").Matrix | import("mathjs").MathArray;
|
|
393
|
+
typeof(x: any): string;
|
|
394
|
+
};
|
|
395
|
+
export default _default;
|
package/dist/math.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/**
|
|
4
|
+
* Extracts meta information from a CIF file
|
|
5
|
+
* @param {String} txt - CIF file text.
|
|
6
|
+
* @return {Object}
|
|
7
|
+
*/
|
|
8
|
+
function parseMeta(txt) {
|
|
9
|
+
const REGEX = {
|
|
10
|
+
ICSD_ID: /_database_code_ICSD\s+(\d+)/,
|
|
11
|
+
};
|
|
12
|
+
const meta = {};
|
|
13
|
+
const groups = txt.match(REGEX.ICSD_ID);
|
|
14
|
+
if (groups) {
|
|
15
|
+
meta.icsdId = Number(groups[1]);
|
|
16
|
+
}
|
|
17
|
+
return meta;
|
|
18
|
+
}
|
|
19
|
+
exports.default = {
|
|
20
|
+
parseMeta,
|
|
21
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InvalidLineError = void 0;
|
|
4
|
+
class InvalidLineError extends Error {
|
|
5
|
+
constructor(num, content) {
|
|
6
|
+
super(`Invalid line: ${num}`);
|
|
7
|
+
this.lineNumber = num;
|
|
8
|
+
this.content = content;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.InvalidLineError = InvalidLineError;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { MaterialSchema } from "@mat3ra/esse/lib/js/types";
|
|
2
|
+
/**
|
|
3
|
+
* Construct textual representation of a materialOrConfig according to Quantum ESPRESSO pw.x input format.
|
|
4
|
+
* @param materialOrConfig - material class instance or its config object
|
|
5
|
+
*/
|
|
6
|
+
declare function toEspressoFormat(materialOrConfig: MaterialSchema): string;
|
|
7
|
+
declare const _default: {
|
|
8
|
+
toEspressoFormat: typeof toEspressoFormat;
|
|
9
|
+
};
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const underscore_1 = __importDefault(require("underscore"));
|
|
7
|
+
const underscore_string_1 = __importDefault(require("underscore.string"));
|
|
8
|
+
const lattice_1 = require("../lattice/lattice");
|
|
9
|
+
const xyz_1 = __importDefault(require("./xyz"));
|
|
10
|
+
/**
|
|
11
|
+
* Construct textual representation of a materialOrConfig according to Quantum ESPRESSO pw.x input format.
|
|
12
|
+
* @param materialOrConfig - material class instance or its config object
|
|
13
|
+
*/
|
|
14
|
+
function toEspressoFormat(materialOrConfig) {
|
|
15
|
+
const l = new lattice_1.Lattice(materialOrConfig.lattice);
|
|
16
|
+
const vectors = l.vectorArrays;
|
|
17
|
+
const vectorsAsString = underscore_1.default.map(vectors, (v) => {
|
|
18
|
+
return `${underscore_string_1.default.sprintf("%14.9f", v[0])}\t${underscore_string_1.default.sprintf("%14.9f", v[1])}\t${underscore_string_1.default.sprintf("%14.9f", v[2])}`;
|
|
19
|
+
}).join("\n");
|
|
20
|
+
return underscore_string_1.default.sprintf("CELL_PARAMETERS (angstroms)\n%s\n\nATOMIC_POSITIONS (crystal)\n%s", vectorsAsString, xyz_1.default.fromMaterial(materialOrConfig));
|
|
21
|
+
}
|
|
22
|
+
exports.default = {
|
|
23
|
+
toEspressoFormat,
|
|
24
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
declare namespace _default {
|
|
2
|
+
export { detectFormat };
|
|
3
|
+
export { convertFromNativeFormat };
|
|
4
|
+
}
|
|
5
|
+
export default _default;
|
|
6
|
+
/**
|
|
7
|
+
* @summary Detects the format of the input string
|
|
8
|
+
* @throws {Error} - If the input string is unknown format
|
|
9
|
+
* @param {string} text - input string to detect format
|
|
10
|
+
* @returns {NATIVE_FORMAT} - Format of the input string
|
|
11
|
+
*/
|
|
12
|
+
declare function detectFormat(text: string): {
|
|
13
|
+
JSON: string;
|
|
14
|
+
POSCAR: string;
|
|
15
|
+
CIF: string;
|
|
16
|
+
PWX: string;
|
|
17
|
+
XYZ: string;
|
|
18
|
+
UNKNOWN: string;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* @summary Function to handle conversion from native formats
|
|
22
|
+
* @param {String} text - input string to detect format and convert
|
|
23
|
+
* @throws {Error} - If the input string is of unknown format
|
|
24
|
+
* @return {Object} - Material config
|
|
25
|
+
*/
|
|
26
|
+
declare function convertFromNativeFormat(text: string): Object;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const poscar_1 = __importDefault(require("./poscar"));
|
|
7
|
+
const NATIVE_FORMAT = {
|
|
8
|
+
JSON: "json",
|
|
9
|
+
POSCAR: "poscar",
|
|
10
|
+
CIF: "cif",
|
|
11
|
+
PWX: "pwx",
|
|
12
|
+
XYZ: "xyz",
|
|
13
|
+
UNKNOWN: "unknown",
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* @summary Detects the format of the input string
|
|
17
|
+
* @throws {Error} - If the input string is unknown format
|
|
18
|
+
* @param {string} text - input string to detect format
|
|
19
|
+
* @returns {NATIVE_FORMAT} - Format of the input string
|
|
20
|
+
*/
|
|
21
|
+
function detectFormat(text) {
|
|
22
|
+
const jsonRegex = /^\s*\{/;
|
|
23
|
+
if (jsonRegex.test(text))
|
|
24
|
+
return NATIVE_FORMAT.JSON;
|
|
25
|
+
if (poscar_1.default.isPoscar(text))
|
|
26
|
+
return NATIVE_FORMAT.POSCAR;
|
|
27
|
+
return NATIVE_FORMAT.UNKNOWN;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* @summary Function to handle conversion from native formats
|
|
31
|
+
* @param {String} text - input string to detect format and convert
|
|
32
|
+
* @throws {Error} - If the input string is of unknown format
|
|
33
|
+
* @return {Object} - Material config
|
|
34
|
+
*/
|
|
35
|
+
function convertFromNativeFormat(text) {
|
|
36
|
+
const format = detectFormat(text);
|
|
37
|
+
switch (format) {
|
|
38
|
+
case NATIVE_FORMAT.JSON:
|
|
39
|
+
return JSON.parse(text);
|
|
40
|
+
case NATIVE_FORMAT.POSCAR:
|
|
41
|
+
return poscar_1.default.fromPoscar(text);
|
|
42
|
+
case NATIVE_FORMAT.UNKNOWN:
|
|
43
|
+
throw new Error(`Unknown format`);
|
|
44
|
+
// TODO: add more formats
|
|
45
|
+
default:
|
|
46
|
+
throw new Error(`Unsupported format: ${format}`);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
exports.default = {
|
|
50
|
+
detectFormat,
|
|
51
|
+
convertFromNativeFormat,
|
|
52
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare namespace _default {
|
|
2
|
+
export { xyz };
|
|
3
|
+
export { poscar };
|
|
4
|
+
export { cif };
|
|
5
|
+
export { espresso };
|
|
6
|
+
export { nativeFormatParsers };
|
|
7
|
+
}
|
|
8
|
+
export default _default;
|
|
9
|
+
import xyz from "./xyz";
|
|
10
|
+
import poscar from "./poscar";
|
|
11
|
+
import cif from "./cif";
|
|
12
|
+
import espresso from "./espresso";
|
|
13
|
+
import nativeFormatParsers from "./native_format_parsers";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const cif_1 = __importDefault(require("./cif"));
|
|
7
|
+
const espresso_1 = __importDefault(require("./espresso"));
|
|
8
|
+
const native_format_parsers_1 = __importDefault(require("./native_format_parsers"));
|
|
9
|
+
const poscar_1 = __importDefault(require("./poscar"));
|
|
10
|
+
const xyz_1 = __importDefault(require("./xyz"));
|
|
11
|
+
exports.default = {
|
|
12
|
+
xyz: xyz_1.default,
|
|
13
|
+
poscar: poscar_1.default,
|
|
14
|
+
cif: cif_1.default,
|
|
15
|
+
espresso: espresso_1.default,
|
|
16
|
+
nativeFormatParsers: native_format_parsers_1.default,
|
|
17
|
+
};
|