symcrys 0.10.1 → 0.11.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/README.md +6 -6
- package/dist/cell.d.ts +19 -16
- package/dist/cell.d.ts.map +1 -1
- package/dist/cell.js +63 -35
- package/dist/cell.js.map +1 -1
- package/dist/checks.d.ts +29 -0
- package/dist/checks.d.ts.map +1 -0
- package/dist/checks.js +79 -0
- package/dist/checks.js.map +1 -0
- package/dist/closure.d.ts +43 -0
- package/dist/closure.d.ts.map +1 -0
- package/dist/closure.js +201 -0
- package/dist/closure.js.map +1 -0
- package/dist/crystalClasses.d.ts +145 -117
- package/dist/crystalClasses.d.ts.map +1 -1
- package/dist/crystalClasses.js +161 -121
- package/dist/crystalClasses.js.map +1 -1
- package/dist/freeze.d.ts +7 -0
- package/dist/freeze.d.ts.map +1 -0
- package/dist/freeze.js +15 -0
- package/dist/freeze.js.map +1 -0
- package/dist/index.d.ts +11 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/dist/indices.d.ts +31 -5
- package/dist/indices.d.ts.map +1 -1
- package/dist/indices.js +104 -13
- package/dist/indices.js.map +1 -1
- package/dist/lattice.d.ts +15 -1
- package/dist/lattice.d.ts.map +1 -1
- package/dist/lattice.js +30 -1
- package/dist/lattice.js.map +1 -1
- package/dist/linalg.d.ts +2 -2
- package/dist/linalg.d.ts.map +1 -1
- package/dist/linalg.js +3 -3
- package/dist/linalg.js.map +1 -1
- package/dist/magnetic.d.ts +12 -10
- package/dist/magnetic.d.ts.map +1 -1
- package/dist/magnetic.js +8 -6
- package/dist/magnetic.js.map +1 -1
- package/dist/notation.d.ts +16 -0
- package/dist/notation.d.ts.map +1 -0
- package/dist/notation.js +66 -0
- package/dist/notation.js.map +1 -0
- package/dist/operations.d.ts +40 -26
- package/dist/operations.d.ts.map +1 -1
- package/dist/operations.js +48 -60
- package/dist/operations.js.map +1 -1
- package/dist/plane.d.ts +141 -79
- package/dist/plane.d.ts.map +1 -1
- package/dist/plane.js +147 -77
- package/dist/plane.js.map +1 -1
- package/dist/pointGroups/crystalForms.d.ts +6 -21
- package/dist/pointGroups/crystalForms.d.ts.map +1 -1
- package/dist/pointGroups/crystalForms.js +9 -16
- package/dist/pointGroups/crystalForms.js.map +1 -1
- package/dist/pointGroups/crystalFormsData.d.ts +4 -1
- package/dist/pointGroups/crystalFormsData.d.ts.map +1 -1
- package/dist/pointGroups/crystalFormsData.js +64 -1
- package/dist/pointGroups/crystalFormsData.js.map +1 -1
- package/dist/pointGroups/elements.d.ts +19 -17
- package/dist/pointGroups/elements.d.ts.map +1 -1
- package/dist/pointGroups/elements.js +65 -83
- package/dist/pointGroups/elements.js.map +1 -1
- package/dist/pointGroups/identify.d.ts +10 -18
- package/dist/pointGroups/identify.d.ts.map +1 -1
- package/dist/pointGroups/identify.js +27 -79
- package/dist/pointGroups/identify.js.map +1 -1
- package/dist/pointGroups/itaOrder.d.ts +15 -14
- package/dist/pointGroups/itaOrder.d.ts.map +1 -1
- package/dist/pointGroups/itaOrder.js +116 -94
- package/dist/pointGroups/itaOrder.js.map +1 -1
- package/dist/pointGroups/itcData.d.ts +96 -0
- package/dist/pointGroups/itcData.d.ts.map +1 -0
- package/dist/pointGroups/itcData.js +336 -0
- package/dist/pointGroups/itcData.js.map +1 -0
- package/dist/pointGroups/itcMagneticData.d.ts +55 -0
- package/dist/pointGroups/itcMagneticData.d.ts.map +1 -0
- package/dist/pointGroups/itcMagneticData.js +172 -0
- package/dist/pointGroups/itcMagneticData.js.map +1 -0
- package/dist/pointGroups/keys.d.ts +32 -0
- package/dist/pointGroups/keys.d.ts.map +1 -0
- package/dist/pointGroups/keys.js +120 -0
- package/dist/pointGroups/keys.js.map +1 -0
- package/dist/pointGroups/magneticSymbols.d.ts +6 -5
- package/dist/pointGroups/magneticSymbols.d.ts.map +1 -1
- package/dist/pointGroups/magneticSymbols.js +15 -12
- package/dist/pointGroups/magneticSymbols.js.map +1 -1
- package/dist/pointGroups/orbits.d.ts +23 -42
- package/dist/pointGroups/orbits.d.ts.map +1 -1
- package/dist/pointGroups/orbits.js +20 -62
- package/dist/pointGroups/orbits.js.map +1 -1
- package/dist/pointGroups/pointGroups.d.ts +135 -67
- package/dist/pointGroups/pointGroups.d.ts.map +1 -1
- package/dist/pointGroups/pointGroups.js +409 -244
- package/dist/pointGroups/pointGroups.js.map +1 -1
- package/dist/pointGroups/properties.d.ts +21 -22
- package/dist/pointGroups/properties.d.ts.map +1 -1
- package/dist/pointGroups/properties.js +40 -37
- package/dist/pointGroups/properties.js.map +1 -1
- package/dist/pointGroups/seitzData.d.ts +26 -0
- package/dist/pointGroups/seitzData.d.ts.map +1 -0
- package/dist/pointGroups/seitzData.js +130 -0
- package/dist/pointGroups/seitzData.js.map +1 -0
- package/dist/pointGroups/wyckoff.d.ts +70 -40
- package/dist/pointGroups/wyckoff.d.ts.map +1 -1
- package/dist/pointGroups/wyckoff.js +98 -91
- package/dist/pointGroups/wyckoff.js.map +1 -1
- package/dist/pointGroups/wyckoffData.d.ts +7 -4
- package/dist/pointGroups/wyckoffData.d.ts.map +1 -1
- package/dist/pointGroups/wyckoffData.js +789 -168
- package/dist/pointGroups/wyckoffData.js.map +1 -1
- package/dist/siteSymmetry.d.ts +8 -16
- package/dist/siteSymmetry.d.ts.map +1 -1
- package/dist/siteSymmetry.js +34 -24
- package/dist/siteSymmetry.js.map +1 -1
- package/dist/spaceGroups/affine.d.ts.map +1 -1
- package/dist/spaceGroups/affine.js +3 -2
- package/dist/spaceGroups/affine.js.map +1 -1
- package/dist/spaceGroups/cell.d.ts +43 -31
- package/dist/spaceGroups/cell.d.ts.map +1 -1
- package/dist/spaceGroups/cell.js +173 -85
- package/dist/spaceGroups/cell.js.map +1 -1
- package/dist/spaceGroups/describe.d.ts +12 -10
- package/dist/spaceGroups/describe.d.ts.map +1 -1
- package/dist/spaceGroups/describe.js +11 -10
- package/dist/spaceGroups/describe.js.map +1 -1
- package/dist/spaceGroups/planeGroupData.d.ts +1 -1
- package/dist/spaceGroups/planeGroupData.d.ts.map +1 -1
- package/dist/spaceGroups/planeGroupData.js +8 -8
- package/dist/spaceGroups/planeGroupData.js.map +1 -1
- package/dist/spaceGroups/planeGroups.d.ts.map +1 -1
- package/dist/spaceGroups/planeGroups.js +2 -1
- package/dist/spaceGroups/planeGroups.js.map +1 -1
- package/dist/spaceGroups/positions.d.ts +48 -19
- package/dist/spaceGroups/positions.d.ts.map +1 -1
- package/dist/spaceGroups/positions.js +166 -67
- package/dist/spaceGroups/positions.js.map +1 -1
- package/dist/tensors/propertyTable.d.ts +3 -1
- package/dist/tensors/propertyTable.d.ts.map +1 -1
- package/dist/tensors/propertyTable.js +17 -10
- package/dist/tensors/propertyTable.js.map +1 -1
- package/dist/tensors/rowEchelon.d.ts +3 -3
- package/dist/tensors/rowEchelon.d.ts.map +1 -1
- package/dist/tensors/rowEchelon.js +4 -4
- package/dist/tensors/rowEchelon.js.map +1 -1
- package/dist/tensors/tensorForm.d.ts +75 -34
- package/dist/tensors/tensorForm.d.ts.map +1 -1
- package/dist/tensors/tensorForm.js +171 -67
- package/dist/tensors/tensorForm.js.map +1 -1
- package/dist/tensors/tensorProperties.d.ts +10 -9
- package/dist/tensors/tensorProperties.d.ts.map +1 -1
- package/dist/tensors/tensorProperties.js +22 -12
- package/dist/tensors/tensorProperties.js.map +1 -1
- package/dist/tolerances.d.ts +56 -1
- package/dist/tolerances.d.ts.map +1 -1
- package/dist/tolerances.js +51 -1
- package/dist/tolerances.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/src/cell.ts +78 -51
- package/src/checks.ts +84 -0
- package/src/closure.ts +214 -0
- package/src/crystalClasses.ts +232 -157
- package/src/freeze.ts +14 -0
- package/src/index.ts +21 -10
- package/src/indices.ts +108 -18
- package/src/lattice.ts +41 -1
- package/src/linalg.ts +3 -3
- package/src/magnetic.ts +14 -9
- package/src/notation.ts +73 -0
- package/src/operations.ts +78 -71
- package/src/plane.ts +253 -127
- package/src/pointGroups/crystalForms.ts +11 -44
- package/src/pointGroups/crystalFormsData.ts +66 -1
- package/src/pointGroups/elements.ts +82 -92
- package/src/pointGroups/identify.ts +38 -97
- package/src/pointGroups/itaOrder.ts +117 -101
- package/src/pointGroups/itcData.ts +404 -0
- package/src/pointGroups/itcMagneticData.ts +206 -0
- package/src/pointGroups/keys.ts +144 -0
- package/src/pointGroups/magneticSymbols.ts +18 -17
- package/src/pointGroups/orbits.ts +41 -89
- package/src/pointGroups/pointGroups.ts +540 -297
- package/src/pointGroups/properties.ts +44 -40
- package/src/pointGroups/seitzData.ts +147 -0
- package/src/pointGroups/wyckoff.ts +137 -112
- package/src/pointGroups/wyckoffData.ts +793 -170
- package/src/siteSymmetry.ts +43 -40
- package/src/spaceGroups/affine.ts +3 -2
- package/src/spaceGroups/cell.ts +227 -116
- package/src/spaceGroups/describe.ts +22 -19
- package/src/spaceGroups/planeGroupData.ts +9 -9
- package/src/spaceGroups/planeGroups.ts +2 -1
- package/src/spaceGroups/positions.ts +202 -78
- package/src/tensors/propertyTable.ts +26 -14
- package/src/tensors/rowEchelon.ts +4 -3
- package/src/tensors/tensorForm.ts +258 -88
- package/src/tensors/tensorProperties.ts +34 -14
- package/src/tolerances.ts +66 -1
- package/src/version.ts +1 -1
- package/dist/pointGroups/data.d.ts +0 -75
- package/dist/pointGroups/data.d.ts.map +0 -1
- package/dist/pointGroups/data.js +0 -212
- package/dist/pointGroups/data.js.map +0 -1
- package/dist/pointGroups/magneticData.d.ts +0 -66
- package/dist/pointGroups/magneticData.d.ts.map +0 -1
- package/dist/pointGroups/magneticData.js +0 -184
- package/dist/pointGroups/magneticData.js.map +0 -1
- package/dist/spaceGroups/snap.d.ts +0 -20
- package/dist/spaceGroups/snap.d.ts.map +0 -1
- package/dist/spaceGroups/snap.js +0 -103
- package/dist/spaceGroups/snap.js.map +0 -1
- package/src/pointGroups/data.ts +0 -305
- package/src/pointGroups/magneticData.ts +0 -328
- package/src/spaceGroups/snap.ts +0 -121
package/dist/crystalClasses.js
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* Everything is computed by the modules that serve both entry points; this module checks what
|
|
11
11
|
* comes in and leaves time reversal out of what goes back.
|
|
12
12
|
*/
|
|
13
|
+
import { checkOptions, shown, TOLERANCE_KEYS } from './checks.js';
|
|
13
14
|
import * as elements from './pointGroups/elements.js';
|
|
14
15
|
import * as groups from './pointGroups/pointGroups.js';
|
|
15
16
|
import * as properties from './pointGroups/properties.js';
|
|
@@ -21,6 +22,7 @@ import * as cell from './cell.js';
|
|
|
21
22
|
import * as site from './siteSymmetry.js';
|
|
22
23
|
import { TENSOR_PROPERTIES as ALL_TENSOR_PROPERTIES } from './tensors/propertyTable.js';
|
|
23
24
|
import * as tensors from './tensors/tensorForm.js';
|
|
25
|
+
import { deepFreeze } from './freeze.js';
|
|
24
26
|
const USE_MAGNETIC = "the crystallographic API has no time reversal; use the magnetic API ('symcrys/magnetic', in Python symcrys.magnetic)";
|
|
25
27
|
/**
|
|
26
28
|
* The named tensor properties of the crystal classes: those of time-even tensors. `'gyrotropic'`
|
|
@@ -28,11 +30,11 @@ const USE_MAGNETIC = "the crystallographic API has no time reversal; use the mag
|
|
|
28
30
|
* magnetic API.
|
|
29
31
|
*/
|
|
30
32
|
export const TENSOR_PROPERTIES = Object.freeze(Object.fromEntries(Object.entries(ALL_TENSOR_PROPERTIES)
|
|
31
|
-
.filter(([, p]) => p.spec.timeParity === '
|
|
33
|
+
.filter(([, p]) => p.spec.timeParity === 'even')
|
|
32
34
|
.map(([name, { spec, description, source }]) => [
|
|
33
35
|
name,
|
|
34
36
|
Object.freeze({
|
|
35
|
-
spec: Object.freeze({ rank: spec.rank,
|
|
37
|
+
spec: Object.freeze({ rank: spec.rank, kind: spec.kind, intrinsic: spec.intrinsic }),
|
|
36
38
|
description,
|
|
37
39
|
source,
|
|
38
40
|
}),
|
|
@@ -44,9 +46,9 @@ function classKey(key) {
|
|
|
44
46
|
if (groups.isPointGroupKey(key))
|
|
45
47
|
return key;
|
|
46
48
|
if (groups.isMagneticPointGroupKey(key)) {
|
|
47
|
-
throw new RangeError(`${
|
|
49
|
+
throw new RangeError(`${shown(key)} is a magnetic point group, not a crystal class: ${USE_MAGNETIC}`);
|
|
48
50
|
}
|
|
49
|
-
throw new RangeError(`Unknown point group key: ${
|
|
51
|
+
throw new RangeError(`Unknown point group key: ${shown(key)}`);
|
|
50
52
|
}
|
|
51
53
|
/** A name of the table of this API, checked. */
|
|
52
54
|
function propertyName(name) {
|
|
@@ -54,50 +56,59 @@ function propertyName(name) {
|
|
|
54
56
|
if (Object.hasOwn(TENSOR_PROPERTIES, name))
|
|
55
57
|
return name;
|
|
56
58
|
if (Object.hasOwn(ALL_TENSOR_PROPERTIES, name)) {
|
|
57
|
-
throw new RangeError(`${
|
|
59
|
+
throw new RangeError(`${shown(name)} is the property of a time-odd tensor: ${USE_MAGNETIC}`);
|
|
58
60
|
}
|
|
59
61
|
}
|
|
60
|
-
throw new RangeError(`Unknown tensor property: ${
|
|
62
|
+
throw new RangeError(`Unknown tensor property: ${shown(name)} (known: ${TENSOR_PROPERTY_NAMES.join(', ')})`);
|
|
61
63
|
}
|
|
62
64
|
/** The time-even tensor of a specification or of a property name, as the shared modules take it. */
|
|
63
65
|
function timeEven(specOrName) {
|
|
64
66
|
if (typeof specOrName === 'string')
|
|
65
67
|
return propertyName(specOrName);
|
|
66
68
|
if (typeof specOrName !== 'object' || specOrName === null) {
|
|
67
|
-
throw new RangeError(`Not a tensor specification: ${
|
|
69
|
+
throw new RangeError(`Not a tensor specification: ${shown(specOrName)}`);
|
|
68
70
|
}
|
|
69
71
|
const timeParity = specOrName.timeParity;
|
|
70
|
-
if (timeParity === 'c')
|
|
71
|
-
throw new RangeError(`A time-odd tensor (timeParity '
|
|
72
|
-
if (timeParity !== undefined && timeParity !== 'i') {
|
|
73
|
-
throw new RangeError(`Unknown time parity: ${JSON.stringify(timeParity)}`);
|
|
72
|
+
if (timeParity === 'odd' || timeParity === 'c') {
|
|
73
|
+
throw new RangeError(`A time-odd tensor (timeParity '${timeParity}'): ${USE_MAGNETIC}`);
|
|
74
74
|
}
|
|
75
|
-
|
|
75
|
+
if (timeParity !== undefined && timeParity !== 'even') {
|
|
76
|
+
// The shared check names the values and the names up to 0.10 ('i', 'c').
|
|
77
|
+
return { ...specOrName, timeParity: timeParity };
|
|
78
|
+
}
|
|
79
|
+
// The other fields are passed on as they are, so that the shared check reports a field of 0.10 (parity).
|
|
80
|
+
return { ...specOrName, timeParity: 'even' };
|
|
76
81
|
}
|
|
77
82
|
/** Checks a list of operations of a caller: an operation with time reversal is an error. */
|
|
78
83
|
function checkUnitary(operations) {
|
|
84
|
+
if (!Array.isArray(operations))
|
|
85
|
+
throw new RangeError('The operations must be an array');
|
|
79
86
|
operations.forEach((op, i) => {
|
|
87
|
+
if (typeof op !== 'object' || op === null)
|
|
88
|
+
throw new RangeError(`Operation ${i} is not an object`);
|
|
80
89
|
const timeReversal = op.timeReversal;
|
|
81
90
|
if (timeReversal === true) {
|
|
82
91
|
throw new RangeError(`Operation ${i} is combined with time reversal: ${USE_MAGNETIC}`);
|
|
83
92
|
}
|
|
84
93
|
if (timeReversal !== undefined && timeReversal !== false) {
|
|
85
|
-
throw new RangeError(`Operation ${i}: timeReversal must be false or absent, not ${
|
|
94
|
+
throw new RangeError(`Operation ${i}: timeReversal must be false or absent, not ${shown(timeReversal)}`);
|
|
86
95
|
}
|
|
87
96
|
});
|
|
88
97
|
}
|
|
89
98
|
/** A list of operations as the shared modules take it. */
|
|
90
99
|
function unitary(operations) {
|
|
91
100
|
checkUnitary(operations);
|
|
92
|
-
|
|
101
|
+
// The other fields are kept for the checks of the shared modules (a record with `matrix` only
|
|
102
|
+
// is refused there with a hint).
|
|
103
|
+
return operations.map((op) => ({ ...op, timeReversal: false }));
|
|
93
104
|
}
|
|
94
105
|
// --- what goes back --------------------------------------------------------------------------------
|
|
95
106
|
const withoutTimeCache = new WeakMap();
|
|
96
|
-
/** The operations
|
|
97
|
-
function
|
|
107
|
+
/** The operations without time reversal; the shared modules return the same frozen list for the same call. */
|
|
108
|
+
function withoutTime(ops) {
|
|
98
109
|
let result = withoutTimeCache.get(ops);
|
|
99
110
|
if (!result) {
|
|
100
|
-
result = Object.freeze(ops.map((op) => Object.freeze({ matrix: op.matrix })));
|
|
111
|
+
result = Object.freeze(ops.map((op) => Object.freeze({ matrix: op.matrix, cartesian: op.cartesian })));
|
|
101
112
|
withoutTimeCache.set(ops, result);
|
|
102
113
|
}
|
|
103
114
|
return result;
|
|
@@ -114,73 +125,98 @@ const groupCache = new Map();
|
|
|
114
125
|
export function pointGroup(key) {
|
|
115
126
|
let g = groupCache.get(classKey(key));
|
|
116
127
|
if (!g) {
|
|
117
|
-
const { crystalSystem, order, centrosymmetric, polar,
|
|
118
|
-
g = Object.freeze({ key, crystalSystem, order, centrosymmetric, polar,
|
|
128
|
+
const { crystalSystem, order, centrosymmetric, polar, enantiomorphic, laueClass } = groups.pointGroup(key);
|
|
129
|
+
g = Object.freeze({ key, crystalSystem, order, centrosymmetric, polar, enantiomorphic, laueClass });
|
|
119
130
|
groupCache.set(key, g);
|
|
120
131
|
}
|
|
121
132
|
return g;
|
|
122
133
|
}
|
|
123
134
|
/** All 32 crystal classes, in the order of `POINT_GROUP_KEYS` (by crystal system, as in ITA). */
|
|
124
135
|
export function pointGroups() {
|
|
125
|
-
return groups.POINT_GROUP_KEYS.map((key) => pointGroup(key));
|
|
136
|
+
return deepFreeze(groups.POINT_GROUP_KEYS.map((key) => pointGroup(key)));
|
|
126
137
|
}
|
|
127
138
|
/**
|
|
128
|
-
* Finds a crystal class by a
|
|
129
|
-
*
|
|
130
|
-
*
|
|
131
|
-
*
|
|
132
|
-
*
|
|
133
|
-
*
|
|
134
|
-
* the
|
|
135
|
-
*
|
|
139
|
+
* Finds a crystal class by a symbol, read tolerantly.
|
|
140
|
+
* It reads, spaces ignored (#96; docs/conventions.md, "Reading symbols"): the key; the short or
|
|
141
|
+
* full symbol of a setting (`312`, `1 1 2`); a Schoenflies symbol, ITA's or ITC Vol. D's (`D3`,
|
|
142
|
+
* `C3i`, `S6`); Birss's cubic symbols without the overbar on the 3 (`m3m`). A symbol that names
|
|
143
|
+
* several settings (the key `32`, which is also the symbol of the setting with rhombohedral axes;
|
|
144
|
+
* `2` for unique axis b, c and a; any Schoenflies symbol) gives the standard (ITC default) setting,
|
|
145
|
+
* unless the options `axes` or `uniqueAxis` choose another, as the headlines of ITA name the
|
|
146
|
+
* settings (the option `axes` set to `'rhombohedral'` for the key `32`).
|
|
147
|
+
*
|
|
148
|
+
* Spellings: the overbar as `-`, `−`, a combining overbar or `¯` after the digit (`m3̄m`), `bar3` (also with a backslash and braces, as in LaTeX);
|
|
149
|
+
* Schoenflies subscripts also as Unicode or LaTeX subscripts (`C₃ᵥ`, `C_{3v}`). Returns undefined if nothing matches,
|
|
150
|
+
* also for a value that is not a string and for the symbol of a magnetic group with time reversal; a
|
|
151
|
+
* symbol that names several groups is a RangeError that lists them.
|
|
136
152
|
*/
|
|
137
|
-
export function findPointGroup(
|
|
138
|
-
|
|
153
|
+
export function findPointGroup(symbol, options) {
|
|
154
|
+
if (arguments.length > 2)
|
|
155
|
+
groups.rejectConventionArgument(arguments.length);
|
|
156
|
+
return deepFreeze(groups.findPointGroup(symbol, options));
|
|
139
157
|
}
|
|
140
|
-
/** The settings of a crystal class, with symbols and the
|
|
141
|
-
export function settings(key
|
|
142
|
-
|
|
158
|
+
/** The settings of a crystal class, with their symbols and the ITC default. */
|
|
159
|
+
export function settings(key) {
|
|
160
|
+
groups.rejectConventionArgument(arguments.length);
|
|
161
|
+
return deepFreeze(groups.settings(classKey(key)));
|
|
143
162
|
}
|
|
144
163
|
/**
|
|
145
|
-
* All operations of the crystal class in the requested setting (default: the
|
|
146
|
-
*
|
|
147
|
-
*
|
|
148
|
-
*
|
|
164
|
+
* All operations of the crystal class in the requested setting (default: the ITC default setting),
|
|
165
|
+
* in ITA's order: identity first, then as ITA numbers the general position (docs/conventions.md,
|
|
166
|
+
* "Order of the operations"). Each operation is ITA's matrix W in the lattice basis of the setting
|
|
167
|
+
* (`matrix`) with the same operation as a Cartesian matrix (`cartesian`; docs/conventions.md,
|
|
168
|
+
* "Operations").
|
|
149
169
|
*/
|
|
150
170
|
export function operations(key, options) {
|
|
151
|
-
return
|
|
171
|
+
return withoutTime(groups.operations(classKey(key), options));
|
|
152
172
|
}
|
|
153
173
|
/**
|
|
154
|
-
* Generators of the crystal class in the requested setting (docs/conventions.md, "Generators")
|
|
155
|
-
*
|
|
156
|
-
*
|
|
157
|
-
*
|
|
158
|
-
* the identity, as in birss-app).
|
|
174
|
+
* Generators of the crystal class in the requested setting (docs/conventions.md, "Generators"):
|
|
175
|
+
* ITA's selected generators in printed order, without the identity and ITA's lattice translations,
|
|
176
|
+
* so the list is empty for `1`; for the settings ITA does not print (`mm2` settings 2 and 3, monoclinic unique axis a), those of setting 1
|
|
177
|
+
* carried into their frame.
|
|
159
178
|
*/
|
|
160
179
|
export function generators(key, options) {
|
|
161
|
-
return
|
|
180
|
+
return withoutTime(groups.generators(classKey(key), options));
|
|
162
181
|
}
|
|
163
|
-
/**
|
|
182
|
+
/**
|
|
183
|
+
* A symbol of the crystal class in the requested setting, as ITA writes it (Tables 3.2.1.2 and
|
|
184
|
+
* 3.2.3.2: `321`, `C3i`; docs/conventions.md, "Symbols").
|
|
185
|
+
*/
|
|
164
186
|
export function symbol(key, options) {
|
|
165
|
-
|
|
187
|
+
const result = groups.symbol(classKey(key), options);
|
|
188
|
+
// The Schoenflies symbol as ITA writes it (`C3i`); the magnetic API follows ITC Vol. D (`S6`).
|
|
189
|
+
return options?.form === 'schoenflies' ? groups.itaSchoenflies(key) : result;
|
|
166
190
|
}
|
|
167
191
|
// --- properties that follow from operations ---------------------------------------------------------
|
|
168
192
|
export { holohedry } from './pointGroups/properties.js';
|
|
193
|
+
/**
|
|
194
|
+
* The lattice systems of a crystal class: those whose lattices it can act on (ITA § 1.3.4.4.2 and
|
|
195
|
+
* Table 1.3.4.1, p. 39). One for every class but the trigonal ones, which belong to the hexagonal
|
|
196
|
+
* (hP) or the rhombohedral (hR) lattice system depending on the basis, so they give both,
|
|
197
|
+
* `['hexagonal', 'rhombohedral']`. The holohedry of each is `holohedry(latticeSystem)`. Throws a
|
|
198
|
+
* RangeError for an unknown key.
|
|
199
|
+
*/
|
|
200
|
+
export function latticeSystems(key) {
|
|
201
|
+
return groups.latticeSystems(classKey(key));
|
|
202
|
+
}
|
|
169
203
|
/**
|
|
170
204
|
* True if the group generated by `operations` contains the inversion, e.g. for the operations of a
|
|
171
|
-
* distorted crystal.
|
|
172
|
-
* `pointGroup(key).centrosymmetric`. Throws a
|
|
205
|
+
* distorted crystal. The list is closed into a group within the tolerance and made exact first, as
|
|
206
|
+
* `tensorFormOf` does. For a crystal class, read `pointGroup(key).centrosymmetric`. Throws a
|
|
207
|
+
* RangeError as `tensorFormOf`.
|
|
173
208
|
*/
|
|
174
|
-
export function isCentrosymmetricOf(operations) {
|
|
175
|
-
return properties.isCentrosymmetricOf(unitary(operations));
|
|
209
|
+
export function isCentrosymmetricOf(operations, options) {
|
|
210
|
+
return properties.isCentrosymmetricOf(unitary(operations), options);
|
|
176
211
|
}
|
|
177
212
|
/**
|
|
178
|
-
* True if the group generated by `operations` is
|
|
179
|
-
* class, read `pointGroup(key).
|
|
180
|
-
* `allowsPropertyOf(operations, 'pyroelectric')`. Throws a RangeError for
|
|
213
|
+
* True if the group generated by `operations` is enantiomorphic: proper rotations only (ITA
|
|
214
|
+
* § 3.2.2.1.3). For a crystal class, read `pointGroup(key).enantiomorphic`. Polar is the named property `'pyroelectric'`:
|
|
215
|
+
* `allowsPropertyOf(operations, 'pyroelectric')`. Throws a RangeError for an operation without an
|
|
216
|
+
* orthogonal Cartesian matrix (`cartesian`; within the tolerance).
|
|
181
217
|
*/
|
|
182
|
-
export function
|
|
183
|
-
return properties.
|
|
218
|
+
export function isEnantiomorphicOf(operations, options) {
|
|
219
|
+
return properties.isEnantiomorphicOf(unitary(operations), options);
|
|
184
220
|
}
|
|
185
221
|
/**
|
|
186
222
|
* The crystal class generated by a list of Cartesian operations, for instance those left after
|
|
@@ -188,8 +224,7 @@ export function isChiralOf(operations) {
|
|
|
188
224
|
* (absent if the group is the class in another orientation, e.g. a threefold axis along [111]). The
|
|
189
225
|
* list is closed into a group first, two matrices being equal when no entry differs by `tolerance`
|
|
190
226
|
* (default `EPSILON`) or more. Returns undefined if the operations generate no crystal class (an
|
|
191
|
-
* operation of order 5, a group larger than 48). Throws a RangeError for
|
|
192
|
-
* orthogonal (within `tolerance`, at least `EPSILON`). The classes `1` and `-1` have no
|
|
227
|
+
* operation of order 5, a group larger than 48). Throws a RangeError for an operation without an orthogonal Cartesian matrix (`cartesian`; within `tolerance`, at least `EPSILON`). The classes `1` and `-1` have no
|
|
193
228
|
* orientation, so they always have setting 1. The first call builds a table of the groups (about
|
|
194
229
|
* 0.1 s; docs/conventions.md, "Point group of a list of operations").
|
|
195
230
|
*/
|
|
@@ -201,7 +236,7 @@ export function pointGroupOf(operations, options) {
|
|
|
201
236
|
* Cartesian axis (rotation or rotoinversion axis, mirror normal) with its first non-zero component,
|
|
202
237
|
* in the order x, y, z, positive, and for n ≥ 3 the sense about that axis. The axes are not named
|
|
203
238
|
* by lattice directions, since the list need not belong to a setting; for a crystal class given by
|
|
204
|
-
* its key, `describeOperations` names them. Throws a RangeError for
|
|
239
|
+
* its key, `describeOperations` names them. Throws a RangeError for an operation without an orthogonal Cartesian matrix (`cartesian`)
|
|
205
240
|
* or not a crystallographic operation (a rotation part by an angle other than 360°/n, n = 1, 2, 3,
|
|
206
241
|
* 4, 6), both within `tolerance` (default `EPSILON`, as for `pointGroupOf`).
|
|
207
242
|
*/
|
|
@@ -214,26 +249,27 @@ export function describeOperationsOf(operations, options) {
|
|
|
214
249
|
// --- symmetry elements -----------------------------------------------------------------------------
|
|
215
250
|
/**
|
|
216
251
|
* Each operation of the crystal class described geometrically, in the order of `operations` for
|
|
217
|
-
* the same key and options.
|
|
218
|
-
*
|
|
219
|
-
*
|
|
252
|
+
* the same key and options. An axis lies along a symmetry direction and has the sign of the
|
|
253
|
+
* operation's Seitz symbol (ITA 6th ed., Tables 1.4.2.1–1.4.2.3, p. 52), e.g. [1, 1, 0] for 2₁₁₀ in
|
|
254
|
+
* the hexagonal family, where ITA Table 2.1.3.1 lists [1̄, 1̄, 0]; for n ≥ 3 the sign fixes what the
|
|
255
|
+
* sense refers to.
|
|
220
256
|
*/
|
|
221
257
|
export function describeOperations(key, options) {
|
|
222
258
|
const described = elements.describeOperations(classKey(key), options);
|
|
223
259
|
let result = descriptionCache.get(described);
|
|
224
260
|
if (!result) {
|
|
225
|
-
result = Object.freeze(described.map(({ kind,
|
|
261
|
+
result = Object.freeze(described.map(({ kind, n, axis, sense }) => Object.freeze({ kind, n, ...(axis ? { axis } : {}), ...(sense ? { sense } : {}) })));
|
|
226
262
|
descriptionCache.set(described, result);
|
|
227
263
|
}
|
|
228
264
|
return result;
|
|
229
265
|
}
|
|
230
266
|
/**
|
|
231
|
-
* The positions of the full Hermann–Mauguin symbol in the requested
|
|
232
|
-
*
|
|
233
|
-
*
|
|
234
|
-
* without `symbol`); the triclinic family has none.
|
|
235
|
-
*
|
|
236
|
-
*
|
|
267
|
+
* The positions of the full Hermann–Mauguin symbol in the requested setting, each with its
|
|
268
|
+
* symmetry directions (ITA Table 2.1.3.1) and the symmetry elements along them. All positions of the
|
|
269
|
+
* crystal family are listed (for rhombohedral axes the two of that row of the table), also those the
|
|
270
|
+
* symbol of the class leaves out (then without `symbol`); the triclinic family has none. A direction
|
|
271
|
+
* has the sign of ITA Table 2.1.3.1, the axis of an operation along it that of its Seitz symbol, so
|
|
272
|
+
* the two are parallel and may be opposite: match them by direction, up to sign.
|
|
237
273
|
*/
|
|
238
274
|
export function symmetryDirections(key, options) {
|
|
239
275
|
return elements.symmetryDirections(classKey(key), options);
|
|
@@ -245,19 +281,27 @@ export function symmetryDirections(key, options) {
|
|
|
245
281
|
* fixing the direction within the tolerance are closed under the products found in the list and
|
|
246
282
|
* the direction is set onto their fixed space, repeated until stable, so that for a group the
|
|
247
283
|
* result is a subgroup and the set direction lies exactly on its elements. For a list that is not a
|
|
248
|
-
* group, `multiplicity` may not be an integer.
|
|
249
|
-
*
|
|
284
|
+
* group, `multiplicity` may not be an integer. Each operation is read by its Cartesian matrix
|
|
285
|
+
* (`cartesian`). Throws a RangeError for an operation without an orthogonal Cartesian matrix (`cartesian`; within
|
|
250
286
|
* `tolerance`, at least `EPSILON`), for a zero vector, and if the closed operations fix no common
|
|
251
287
|
* direction or do not settle into a group (a tolerance far too large, e.g. 0.5).
|
|
252
288
|
*/
|
|
253
|
-
export function
|
|
289
|
+
export function siteSymmetryOf(operations, direction, options) {
|
|
254
290
|
checkUnitary(operations);
|
|
255
291
|
// The shared function reads the matrices only, so the list of the caller is passed on as it is.
|
|
256
|
-
return site.
|
|
292
|
+
return site.siteSymmetryOf(operations, direction, options);
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* The site symmetry of a direction (any non-zero Cartesian vector) under a crystal class in a
|
|
296
|
+
* setting: `siteSymmetryOf` applied to `operations(key, options)`, so the indices refer to those
|
|
297
|
+
* operations (#137 C1). Throws a RangeError as `siteSymmetryOf` does.
|
|
298
|
+
*/
|
|
299
|
+
export function siteSymmetry(key, direction, options) {
|
|
300
|
+
return wyckoff.siteSymmetry(classKey(key), direction, options);
|
|
257
301
|
}
|
|
258
302
|
/**
|
|
259
303
|
* The Wyckoff positions of a crystal class for directions, as ITA tabulates them (general position
|
|
260
|
-
* first)
|
|
304
|
+
* first) (docs/conventions.md, "Site symmetry and Wyckoff positions").
|
|
261
305
|
*/
|
|
262
306
|
export function wyckoffPositions(key, options) {
|
|
263
307
|
return wyckoff.wyckoffPositions(classKey(key), options);
|
|
@@ -265,16 +309,16 @@ export function wyckoffPositions(key, options) {
|
|
|
265
309
|
/**
|
|
266
310
|
* The Wyckoff position of a direction (Cartesian) in a crystal class: the position whose site
|
|
267
311
|
* symmetry is conjugate to that of the direction (ITA's definition). `tolerance` as for
|
|
268
|
-
* `
|
|
312
|
+
* `siteSymmetryOf`.
|
|
269
313
|
*/
|
|
270
|
-
export function
|
|
271
|
-
return wyckoff.
|
|
314
|
+
export function wyckoffPosition(key, direction, options) {
|
|
315
|
+
return wyckoff.wyckoffPosition(classKey(key), direction, options);
|
|
272
316
|
}
|
|
273
317
|
// --- lattice basis and orbits ---------------------------------------------------------------------
|
|
274
318
|
/**
|
|
275
319
|
* The operations of a list that keep the metric of a cell: W with WᵀGW = G, G the metric tensor
|
|
276
|
-
* of `basis`. The operations are integer
|
|
277
|
-
* gives them; the list is taken as it is and the kept operations are the ones of the list, in its
|
|
320
|
+
* of `basis`. The operations are read by `matrix`, the integer matrix W on lattice coordinates, as
|
|
321
|
+
* `operations` gives them; the list is taken as it is and the kept operations are the ones of the list, in its
|
|
278
322
|
* order. The deviation counts relative to the largest entry of G (`tolerance`, default
|
|
279
323
|
* `EPSILON`). An operation combined with time reversal belongs to the magnetic API.
|
|
280
324
|
*/
|
|
@@ -282,20 +326,6 @@ export function residualOperations(operations, basis, options) {
|
|
|
282
326
|
checkUnitary(operations);
|
|
283
327
|
return cell.residualOperations(operations, basis, options);
|
|
284
328
|
}
|
|
285
|
-
/**
|
|
286
|
-
* The operations of the crystal class in the conventional lattice basis (a, b, c; for the trigonal
|
|
287
|
-
* classes the hexagonal axes), in the order of `operations` for the same setting and convention:
|
|
288
|
-
* integer matrices W acting on the coordinates of a lattice direction [uvw], W = B⁻¹·R·B with the
|
|
289
|
-
* basis B of `latticeBasis` and the Cartesian matrix R of `operations`. They do not depend on the
|
|
290
|
-
* cell angles, so they exist for every family; for the monoclinic and triclinic families a, b, c
|
|
291
|
-
* are taken along x, y, z, as for the Wyckoff positions. In the ITC convention they are the
|
|
292
|
-
* matrices of ITA's general position (6th ed., Table 3.2.3.2). Not orthogonal in general: pass
|
|
293
|
-
* them to no function that takes Cartesian operations (docs/conventions.md, "Lattice basis and
|
|
294
|
-
* orbits").
|
|
295
|
-
*/
|
|
296
|
-
export function latticeOperations(key, options) {
|
|
297
|
-
return matricesOnly(orbits.latticeOperations(classKey(key), options));
|
|
298
|
-
}
|
|
299
329
|
export function orbit(key, indices, options) {
|
|
300
330
|
return orbits.orbit(classKey(key), indices, options);
|
|
301
331
|
}
|
|
@@ -303,9 +333,9 @@ export function orbit(key, indices, options) {
|
|
|
303
333
|
* The orbit of a direction (any non-zero vector, Cartesian, e.g. a face normal) under a list of
|
|
304
334
|
* operations, for instance those of a distorted crystal: the images of its unit vector under each
|
|
305
335
|
* operation, coinciding images merged (closer than `tolerance`, default `EPSILON`, as for
|
|
306
|
-
* `
|
|
336
|
+
* `siteSymmetryOf`), in the order in which the operations reach them, each with the indices of the
|
|
307
337
|
* operations that map the direction there. The list is taken as it is, not closed into a group.
|
|
308
|
-
* Throws a RangeError for a zero vector and for
|
|
338
|
+
* Throws a RangeError for a zero vector and for an operation without an orthogonal Cartesian matrix (`cartesian`; within
|
|
309
339
|
* `tolerance`, at least `EPSILON`).
|
|
310
340
|
*/
|
|
311
341
|
export function orbitOf(operations, direction, options) {
|
|
@@ -323,19 +353,16 @@ export const CRYSTAL_FORM_TYPES = forms.CRYSTAL_FORM_TYPES;
|
|
|
323
353
|
/**
|
|
324
354
|
* The crystal forms of a crystal class, as ITA 6th ed. Table 3.2.3.2 prints them: for each Wyckoff
|
|
325
355
|
* position (general position first) its basic form (two for the cubic faces (hhl) of -43m and
|
|
326
|
-
* m-3m), then its limiting forms.
|
|
327
|
-
* only, like the Wyckoff positions (docs/conventions.md, "Crystal forms").
|
|
356
|
+
* m-3m), then its limiting forms (docs/conventions.md, "Crystal forms").
|
|
328
357
|
*/
|
|
329
358
|
export function crystalForms(key, options) {
|
|
330
359
|
return forms.crystalForms(classKey(key), options);
|
|
331
360
|
}
|
|
332
361
|
// --- tensors ---------------------------------------------------------------------------------------
|
|
333
362
|
/**
|
|
334
|
-
* The form of a tensor under a crystal class in the requested setting (default: the default
|
|
335
|
-
* setting
|
|
336
|
-
*
|
|
337
|
-
* through the setting: the same setting index gives the same form in both conventions
|
|
338
|
-
* (docs/conventions.md, "Tensors").
|
|
363
|
+
* The form of a tensor under a crystal class in the requested setting (default: the ITC default
|
|
364
|
+
* setting). The tensor is given by its specification or by the name of a property in
|
|
365
|
+
* `TENSOR_PROPERTIES` (`'piezoelectric'`; docs/conventions.md, "Tensors").
|
|
339
366
|
*/
|
|
340
367
|
export function tensorForm(key, spec, options) {
|
|
341
368
|
return tensors.tensorForm(classKey(key), timeEven(spec), options);
|
|
@@ -343,28 +370,33 @@ export function tensorForm(key, spec, options) {
|
|
|
343
370
|
/**
|
|
344
371
|
* The form of a tensor under the group generated by `operations`, e.g. the site symmetry of a
|
|
345
372
|
* surface normal (`siteSymmetry`) or the operations of a distorted crystal. The tensor is given by
|
|
346
|
-
* its specification or by the name of a property in `TENSOR_PROPERTIES`.
|
|
347
|
-
* Cartesian
|
|
348
|
-
*
|
|
373
|
+
* its specification or by the name of a property in `TENSOR_PROPERTIES`. Each operation is read by
|
|
374
|
+
* its Cartesian matrix (`cartesian`), which must be orthogonal. The list is closed into a group
|
|
375
|
+
* within the tolerance, and that group is made exact before the form is computed, so that matrices
|
|
376
|
+
* with rounding errors (e.g. rounded to 6 decimals) give the form of the exact group, with its
|
|
377
|
+
* number of free parameters (docs/conventions.md, "Tolerances"). Throws a RangeError for an
|
|
378
|
+
* operation without an orthogonal Cartesian matrix (`cartesian`; within the tolerance) and for
|
|
379
|
+
* operations that generate no finite group within the tolerance.
|
|
349
380
|
*/
|
|
350
|
-
export function tensorFormOf(operations, spec) {
|
|
351
|
-
return tensors.tensorFormOf(unitary(operations), timeEven(spec));
|
|
381
|
+
export function tensorFormOf(operations, spec, options) {
|
|
382
|
+
return tensors.tensorFormOf(unitary(operations), timeEven(spec), options);
|
|
352
383
|
}
|
|
353
384
|
/**
|
|
354
|
-
* The
|
|
385
|
+
* The tensor `tensor` in a frame rotated by the orthogonal
|
|
355
386
|
* matrix `rotation`: t′_{i…} = f·Σ R_{ia}…R_{…}·t_{a…}, with f = det(R) for an axial tensor and 1
|
|
356
387
|
* for a polar one. To express a tensor in the frame of a surface, pass the matrix whose rows are
|
|
357
388
|
* the new axes in the old frame. The kind of tensor is given by its specification or by the name
|
|
358
|
-
* of a property in `TENSOR_PROPERTIES`.
|
|
389
|
+
* of a property in `TENSOR_PROPERTIES`. Throws a RangeError for a rotation that is not orthogonal
|
|
390
|
+
* within the tolerance (per matrix entry of RᵀR).
|
|
359
391
|
*/
|
|
360
|
-
export function rotateTensor(tensor, rotation,
|
|
361
|
-
return tensors.rotateTensor(tensor, rotation, timeEven(
|
|
392
|
+
export function rotateTensor(tensor, rotation, spec, options) {
|
|
393
|
+
return tensors.rotateTensor(tensor, rotation, timeEven(spec), options);
|
|
362
394
|
}
|
|
363
395
|
/**
|
|
364
396
|
* True if the crystal class allows the named property, e.g. `allowsProperty('-6m2',
|
|
365
397
|
* 'piezoelectric')`: the tensor that describes it (`TENSOR_PROPERTIES`) has a non-zero form under
|
|
366
398
|
* the class. Symmetry only allows a property; whether a crystal shows it is a question of the
|
|
367
|
-
* material. It does not depend on setting
|
|
399
|
+
* material. It does not depend on the setting. Throws a RangeError for an unknown key or
|
|
368
400
|
* name.
|
|
369
401
|
*/
|
|
370
402
|
export function allowsProperty(key, name) {
|
|
@@ -372,19 +404,27 @@ export function allowsProperty(key, name) {
|
|
|
372
404
|
}
|
|
373
405
|
/** The named properties the crystal class allows, in the order of `TENSOR_PROPERTIES`. */
|
|
374
406
|
export function allowedProperties(key) {
|
|
375
|
-
return TENSOR_PROPERTY_NAMES.filter((name) => allowsProperty(key, name));
|
|
407
|
+
return deepFreeze(TENSOR_PROPERTY_NAMES.filter((name) => allowsProperty(key, name)));
|
|
376
408
|
}
|
|
377
409
|
/**
|
|
378
410
|
* True if the group generated by `operations` allows the named property, e.g. for the site
|
|
379
|
-
* symmetry of a surface normal or the operations of a distorted crystal. The
|
|
380
|
-
*
|
|
411
|
+
* symmetry of a surface normal or the operations of a distorted crystal. The operations are read
|
|
412
|
+
* and closed as `tensorFormOf` reads them, within the tolerance, and it throws a RangeError as
|
|
413
|
+
* `tensorFormOf` does.
|
|
381
414
|
*/
|
|
382
|
-
export function allowsPropertyOf(operations, name) {
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
415
|
+
export function allowsPropertyOf(operations, name, options) {
|
|
416
|
+
checkOptions(options, TOLERANCE_KEYS, 'allowsPropertyOf');
|
|
417
|
+
const checked = propertyName(name);
|
|
418
|
+
const { spec, perms } = tensors.checkedSpec(checked);
|
|
419
|
+
return tensors.formOfGroup(tensors.callerGroup(unitary(operations), options), spec, perms).basis.length > 0;
|
|
420
|
+
}
|
|
421
|
+
/** The named properties the group generated by `operations` allows. Reads the operations as `allowsPropertyOf`. */
|
|
422
|
+
export function allowedPropertiesOf(operations, options) {
|
|
423
|
+
checkOptions(options, TOLERANCE_KEYS, 'allowedPropertiesOf');
|
|
424
|
+
const group = tensors.callerGroup(unitary(operations), options);
|
|
425
|
+
return deepFreeze(TENSOR_PROPERTY_NAMES.filter((name) => {
|
|
426
|
+
const { spec, perms } = tensors.checkedSpec(name);
|
|
427
|
+
return tensors.formOfGroup(group, spec, perms).basis.length > 0;
|
|
428
|
+
}));
|
|
389
429
|
}
|
|
390
430
|
//# sourceMappingURL=crystalClasses.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"crystalClasses.js","sourceRoot":"","sources":["../src/crystalClasses.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAKH,OAAO,KAAK,QAAQ,MAAM,2BAA2B,CAAC;AACtD,OAAO,KAAK,MAAM,MAAM,8BAA8B,CAAC;AAEvD,OAAO,KAAK,UAAU,MAAM,6BAA6B,C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AACnH,MAAM,UAAU,mBAAmB,CACjC,UAAwC,EACxC,OAA0B;IAE1B,YAAY,CAAC,OAAO,EAAE,cAAc,EAAE,qBAAqB,CAAC,CAAC;IAC7D,MAAM,KAAK,GAAG,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC,CAAC;IAChE,OAAO,UAAU,CACf,qBAAqB,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE;QACpC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QAClD,OAAO,OAAO,CAAC,WAAW,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;IAClE,CAAC,CAAC,CACH,CAAC;AACJ,CAAC"}
|
package/dist/freeze.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Freezing of results: every result of the API is frozen, nested arrays and objects included
|
|
3
|
+
* (#137 C4), so that a caller who wants to change one copies it. Internal.
|
|
4
|
+
*/
|
|
5
|
+
/** `value`, frozen with everything it holds (plain arrays and objects). */
|
|
6
|
+
export declare function deepFreeze<T>(value: T): T;
|
|
7
|
+
//# sourceMappingURL=freeze.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"freeze.d.ts","sourceRoot":"","sources":["../src/freeze.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,2EAA2E;AAC3E,wBAAgB,UAAU,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAOzC"}
|
package/dist/freeze.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Freezing of results: every result of the API is frozen, nested arrays and objects included
|
|
3
|
+
* (#137 C4), so that a caller who wants to change one copies it. Internal.
|
|
4
|
+
*/
|
|
5
|
+
/** `value`, frozen with everything it holds (plain arrays and objects). */
|
|
6
|
+
export function deepFreeze(value) {
|
|
7
|
+
if (value !== null && typeof value === 'object') {
|
|
8
|
+
// Also into a container that is frozen already: its children need not be.
|
|
9
|
+
for (const v of Object.values(value))
|
|
10
|
+
deepFreeze(v);
|
|
11
|
+
Object.freeze(value);
|
|
12
|
+
}
|
|
13
|
+
return value;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=freeze.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"freeze.js","sourceRoot":"","sources":["../src/freeze.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,2EAA2E;AAC3E,MAAM,UAAU,UAAU,CAAI,KAAQ;IACpC,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAChD,0EAA0E;QAC1E,KAAK,MAAM,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC;YAAE,UAAU,CAAC,CAAC,CAAC,CAAC;QACpD,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACvB,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
|