@elaraai/east-py-datascience 0.0.2-beta.8 → 0.0.2-beta.80
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 +58 -1
- package/dist/src/alns/alns.d.ts +528 -0
- package/dist/src/alns/alns.d.ts.map +1 -0
- package/dist/src/alns/alns.js +238 -0
- package/dist/src/alns/alns.js.map +1 -0
- package/dist/src/google_or/google_or.d.ts +2422 -0
- package/dist/src/google_or/google_or.d.ts.map +1 -0
- package/dist/src/google_or/google_or.js +542 -0
- package/dist/src/google_or/google_or.js.map +1 -0
- package/dist/{gp → src/gp}/gp.d.ts +185 -136
- package/dist/src/gp/gp.d.ts.map +1 -0
- package/dist/{gp → src/gp}/gp.js +64 -12
- package/dist/src/gp/gp.js.map +1 -0
- package/dist/src/index.d.ts +34 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +57 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/lightgbm/lightgbm.d.ts +575 -0
- package/dist/src/lightgbm/lightgbm.d.ts.map +1 -0
- package/dist/{lightgbm → src/lightgbm}/lightgbm.js +104 -18
- package/dist/src/lightgbm/lightgbm.js.map +1 -0
- package/dist/src/lightning/lightning.d.ts +1594 -0
- package/dist/src/lightning/lightning.d.ts.map +1 -0
- package/dist/src/lightning/lightning.js +468 -0
- package/dist/src/lightning/lightning.js.map +1 -0
- package/dist/{mads → src/mads}/mads.d.ts +109 -112
- package/dist/src/mads/mads.d.ts.map +1 -0
- package/dist/{mads → src/mads}/mads.js +6 -8
- package/dist/src/mads/mads.js.map +1 -0
- package/dist/src/mapie/mapie.d.ts +3680 -0
- package/dist/src/mapie/mapie.d.ts.map +1 -0
- package/dist/src/mapie/mapie.js +616 -0
- package/dist/src/mapie/mapie.js.map +1 -0
- package/dist/{ngboost → src/ngboost}/ngboost.d.ts +192 -142
- package/dist/src/ngboost/ngboost.d.ts.map +1 -0
- package/dist/{ngboost → src/ngboost}/ngboost.js +67 -14
- package/dist/src/ngboost/ngboost.js.map +1 -0
- package/dist/src/optimization/optimization.d.ts +420 -0
- package/dist/src/optimization/optimization.d.ts.map +1 -0
- package/dist/src/optimization/optimization.js +257 -0
- package/dist/src/optimization/optimization.js.map +1 -0
- package/dist/{optuna → src/optuna}/optuna.d.ts +374 -314
- package/dist/src/optuna/optuna.d.ts.map +1 -0
- package/dist/{optuna → src/optuna}/optuna.js +2 -0
- package/dist/src/optuna/optuna.js.map +1 -0
- package/dist/src/pymc/pymc.d.ts +2932 -0
- package/dist/src/pymc/pymc.d.ts.map +1 -0
- package/dist/src/pymc/pymc.js +688 -0
- package/dist/src/pymc/pymc.js.map +1 -0
- package/dist/src/scipy/scipy.d.ts +2205 -0
- package/dist/src/scipy/scipy.d.ts.map +1 -0
- package/dist/src/scipy/scipy.js +884 -0
- package/dist/src/scipy/scipy.js.map +1 -0
- package/dist/src/shap/shap.d.ts +2988 -0
- package/dist/src/shap/shap.d.ts.map +1 -0
- package/dist/src/shap/shap.js +500 -0
- package/dist/src/shap/shap.js.map +1 -0
- package/dist/{simanneal → src/simanneal}/simanneal.d.ts +257 -160
- package/dist/src/simanneal/simanneal.d.ts.map +1 -0
- package/dist/{simanneal → src/simanneal}/simanneal.js +105 -8
- package/dist/src/simanneal/simanneal.js.map +1 -0
- package/dist/src/simulation/simulation.d.ts +431 -0
- package/dist/src/simulation/simulation.d.ts.map +1 -0
- package/dist/src/simulation/simulation.js +306 -0
- package/dist/src/simulation/simulation.js.map +1 -0
- package/dist/src/sklearn/sklearn.d.ts +6362 -0
- package/dist/src/sklearn/sklearn.d.ts.map +1 -0
- package/dist/src/sklearn/sklearn.js +1508 -0
- package/dist/src/sklearn/sklearn.js.map +1 -0
- package/dist/src/torch/torch.d.ts +1205 -0
- package/dist/src/torch/torch.d.ts.map +1 -0
- package/dist/{torch → src/torch}/torch.js +109 -18
- package/dist/src/torch/torch.js.map +1 -0
- package/dist/src/types.d.ts +43 -0
- package/dist/src/types.d.ts.map +1 -0
- package/dist/src/types.js +44 -0
- package/dist/src/types.js.map +1 -0
- package/dist/src/xgboost/xgboost.d.ts +1424 -0
- package/dist/src/xgboost/xgboost.d.ts.map +1 -0
- package/dist/src/xgboost/xgboost.js +432 -0
- package/dist/src/xgboost/xgboost.js.map +1 -0
- package/package.json +12 -12
- package/dist/gp/gp.d.ts.map +0 -1
- package/dist/gp/gp.js.map +0 -1
- package/dist/index.d.ts +0 -27
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -41
- package/dist/index.js.map +0 -1
- package/dist/lightgbm/lightgbm.d.ts +0 -494
- package/dist/lightgbm/lightgbm.d.ts.map +0 -1
- package/dist/lightgbm/lightgbm.js.map +0 -1
- package/dist/mads/mads.d.ts.map +0 -1
- package/dist/mads/mads.js.map +0 -1
- package/dist/ngboost/ngboost.d.ts.map +0 -1
- package/dist/ngboost/ngboost.js.map +0 -1
- package/dist/optuna/optuna.d.ts.map +0 -1
- package/dist/optuna/optuna.js.map +0 -1
- package/dist/scipy/scipy.d.ts +0 -1260
- package/dist/scipy/scipy.d.ts.map +0 -1
- package/dist/scipy/scipy.js +0 -413
- package/dist/scipy/scipy.js.map +0 -1
- package/dist/shap/shap.d.ts +0 -657
- package/dist/shap/shap.d.ts.map +0 -1
- package/dist/shap/shap.js +0 -241
- package/dist/shap/shap.js.map +0 -1
- package/dist/simanneal/simanneal.d.ts.map +0 -1
- package/dist/simanneal/simanneal.js.map +0 -1
- package/dist/sklearn/sklearn.d.ts +0 -2691
- package/dist/sklearn/sklearn.d.ts.map +0 -1
- package/dist/sklearn/sklearn.js +0 -524
- package/dist/sklearn/sklearn.js.map +0 -1
- package/dist/torch/torch.d.ts +0 -1081
- package/dist/torch/torch.d.ts.map +0 -1
- package/dist/torch/torch.js.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/dist/types.d.ts +0 -80
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -81
- package/dist/types.js.map +0 -1
- package/dist/xgboost/xgboost.d.ts +0 -504
- package/dist/xgboost/xgboost.d.ts.map +0 -1
- package/dist/xgboost/xgboost.js +0 -177
- package/dist/xgboost/xgboost.js.map +0 -1
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
*
|
|
15
15
|
* @packageDocumentation
|
|
16
16
|
*/
|
|
17
|
-
import { StructType, VariantType, OptionType,
|
|
17
|
+
import { StructType, VariantType, OptionType, IntegerType, FloatType, BooleanType, FunctionType, VectorType } from "@elaraai/east";
|
|
18
18
|
/**
|
|
19
19
|
* Discrete state type for simulated annealing.
|
|
20
20
|
*
|
|
@@ -24,9 +24,9 @@ import { StructType, VariantType, OptionType, ArrayType, IntegerType, FloatType,
|
|
|
24
24
|
*/
|
|
25
25
|
export declare const DiscreteStateType: VariantType<{
|
|
26
26
|
/** Integer array state (permutations, assignments) */
|
|
27
|
-
int_array:
|
|
27
|
+
readonly int_array: VectorType<IntegerType>;
|
|
28
28
|
/** Boolean array state (subset selection) */
|
|
29
|
-
bool_array:
|
|
29
|
+
readonly bool_array: VectorType<BooleanType>;
|
|
30
30
|
}>;
|
|
31
31
|
/**
|
|
32
32
|
* Energy function type: state -> score.
|
|
@@ -36,9 +36,9 @@ export declare const DiscreteStateType: VariantType<{
|
|
|
36
36
|
*/
|
|
37
37
|
export declare const EnergyFunctionType: FunctionType<[VariantType<{
|
|
38
38
|
/** Integer array state (permutations, assignments) */
|
|
39
|
-
int_array:
|
|
39
|
+
readonly int_array: VectorType<IntegerType>;
|
|
40
40
|
/** Boolean array state (subset selection) */
|
|
41
|
-
bool_array:
|
|
41
|
+
readonly bool_array: VectorType<BooleanType>;
|
|
42
42
|
}>], FloatType>;
|
|
43
43
|
/**
|
|
44
44
|
* Move function type: state -> neighbor state.
|
|
@@ -48,61 +48,61 @@ export declare const EnergyFunctionType: FunctionType<[VariantType<{
|
|
|
48
48
|
*/
|
|
49
49
|
export declare const MoveFunctionType: FunctionType<[VariantType<{
|
|
50
50
|
/** Integer array state (permutations, assignments) */
|
|
51
|
-
int_array:
|
|
51
|
+
readonly int_array: VectorType<IntegerType>;
|
|
52
52
|
/** Boolean array state (subset selection) */
|
|
53
|
-
bool_array:
|
|
53
|
+
readonly bool_array: VectorType<BooleanType>;
|
|
54
54
|
}>], VariantType<{
|
|
55
55
|
/** Integer array state (permutations, assignments) */
|
|
56
|
-
int_array:
|
|
56
|
+
readonly int_array: VectorType<IntegerType>;
|
|
57
57
|
/** Boolean array state (subset selection) */
|
|
58
|
-
bool_array:
|
|
58
|
+
readonly bool_array: VectorType<BooleanType>;
|
|
59
59
|
}>>;
|
|
60
60
|
/**
|
|
61
61
|
* Permutation energy function type.
|
|
62
62
|
*
|
|
63
63
|
* Specialized for permutation-based optimization.
|
|
64
64
|
*/
|
|
65
|
-
export declare const PermutationEnergyType: FunctionType<[
|
|
65
|
+
export declare const PermutationEnergyType: FunctionType<[VectorType<IntegerType>], FloatType>;
|
|
66
66
|
/**
|
|
67
67
|
* Subset energy function type.
|
|
68
68
|
*
|
|
69
69
|
* Specialized for subset selection optimization.
|
|
70
70
|
*/
|
|
71
|
-
export declare const SubsetEnergyType: FunctionType<[
|
|
71
|
+
export declare const SubsetEnergyType: FunctionType<[VectorType<BooleanType>], FloatType>;
|
|
72
72
|
/**
|
|
73
73
|
* Simulated annealing configuration.
|
|
74
74
|
*/
|
|
75
75
|
export declare const AnnealConfigType: StructType<{
|
|
76
76
|
/** Starting temperature (default: 25000.0) */
|
|
77
|
-
t_max: OptionType<FloatType>;
|
|
77
|
+
readonly t_max: OptionType<FloatType>;
|
|
78
78
|
/** Ending temperature (default: 2.5) */
|
|
79
|
-
t_min: OptionType<FloatType>;
|
|
79
|
+
readonly t_min: OptionType<FloatType>;
|
|
80
80
|
/** Total iterations (default: 50000) */
|
|
81
|
-
steps: OptionType<IntegerType>;
|
|
81
|
+
readonly steps: OptionType<IntegerType>;
|
|
82
82
|
/** Progress report frequency (default: 0 = silent) */
|
|
83
|
-
updates: OptionType<IntegerType>;
|
|
83
|
+
readonly updates: OptionType<IntegerType>;
|
|
84
84
|
/** Minutes for auto-calibration (default: none) */
|
|
85
|
-
auto_schedule: OptionType<FloatType>;
|
|
85
|
+
readonly auto_schedule: OptionType<FloatType>;
|
|
86
86
|
/** Random seed for reproducibility */
|
|
87
|
-
random_state: OptionType<IntegerType>;
|
|
87
|
+
readonly random_state: OptionType<IntegerType>;
|
|
88
88
|
}>;
|
|
89
89
|
/**
|
|
90
90
|
* Simulated annealing result.
|
|
91
91
|
*/
|
|
92
92
|
export declare const AnnealResultType: StructType<{
|
|
93
93
|
/** Best state found */
|
|
94
|
-
best_state: VariantType<{
|
|
94
|
+
readonly best_state: VariantType<{
|
|
95
95
|
/** Integer array state (permutations, assignments) */
|
|
96
|
-
int_array:
|
|
96
|
+
readonly int_array: VectorType<IntegerType>;
|
|
97
97
|
/** Boolean array state (subset selection) */
|
|
98
|
-
bool_array:
|
|
98
|
+
readonly bool_array: VectorType<BooleanType>;
|
|
99
99
|
}>;
|
|
100
100
|
/** Energy of best state */
|
|
101
|
-
best_energy: FloatType;
|
|
101
|
+
readonly best_energy: FloatType;
|
|
102
102
|
/** Actual iterations performed */
|
|
103
|
-
steps_taken: IntegerType;
|
|
103
|
+
readonly steps_taken: IntegerType;
|
|
104
104
|
/** Whether optimization completed successfully */
|
|
105
|
-
success: BooleanType;
|
|
105
|
+
readonly success: BooleanType;
|
|
106
106
|
}>;
|
|
107
107
|
/**
|
|
108
108
|
* Run simulated annealing on a discrete state space.
|
|
@@ -117,51 +117,51 @@ export declare const AnnealResultType: StructType<{
|
|
|
117
117
|
*/
|
|
118
118
|
export declare const simanneal_optimize: import("@elaraai/east").PlatformDefinition<[VariantType<{
|
|
119
119
|
/** Integer array state (permutations, assignments) */
|
|
120
|
-
int_array:
|
|
120
|
+
readonly int_array: VectorType<IntegerType>;
|
|
121
121
|
/** Boolean array state (subset selection) */
|
|
122
|
-
bool_array:
|
|
122
|
+
readonly bool_array: VectorType<BooleanType>;
|
|
123
123
|
}>, FunctionType<[VariantType<{
|
|
124
124
|
/** Integer array state (permutations, assignments) */
|
|
125
|
-
int_array:
|
|
125
|
+
readonly int_array: VectorType<IntegerType>;
|
|
126
126
|
/** Boolean array state (subset selection) */
|
|
127
|
-
bool_array:
|
|
127
|
+
readonly bool_array: VectorType<BooleanType>;
|
|
128
128
|
}>], FloatType>, FunctionType<[VariantType<{
|
|
129
129
|
/** Integer array state (permutations, assignments) */
|
|
130
|
-
int_array:
|
|
130
|
+
readonly int_array: VectorType<IntegerType>;
|
|
131
131
|
/** Boolean array state (subset selection) */
|
|
132
|
-
bool_array:
|
|
132
|
+
readonly bool_array: VectorType<BooleanType>;
|
|
133
133
|
}>], VariantType<{
|
|
134
134
|
/** Integer array state (permutations, assignments) */
|
|
135
|
-
int_array:
|
|
135
|
+
readonly int_array: VectorType<IntegerType>;
|
|
136
136
|
/** Boolean array state (subset selection) */
|
|
137
|
-
bool_array:
|
|
137
|
+
readonly bool_array: VectorType<BooleanType>;
|
|
138
138
|
}>>, StructType<{
|
|
139
139
|
/** Starting temperature (default: 25000.0) */
|
|
140
|
-
t_max: OptionType<FloatType>;
|
|
140
|
+
readonly t_max: OptionType<FloatType>;
|
|
141
141
|
/** Ending temperature (default: 2.5) */
|
|
142
|
-
t_min: OptionType<FloatType>;
|
|
142
|
+
readonly t_min: OptionType<FloatType>;
|
|
143
143
|
/** Total iterations (default: 50000) */
|
|
144
|
-
steps: OptionType<IntegerType>;
|
|
144
|
+
readonly steps: OptionType<IntegerType>;
|
|
145
145
|
/** Progress report frequency (default: 0 = silent) */
|
|
146
|
-
updates: OptionType<IntegerType>;
|
|
146
|
+
readonly updates: OptionType<IntegerType>;
|
|
147
147
|
/** Minutes for auto-calibration (default: none) */
|
|
148
|
-
auto_schedule: OptionType<FloatType>;
|
|
148
|
+
readonly auto_schedule: OptionType<FloatType>;
|
|
149
149
|
/** Random seed for reproducibility */
|
|
150
|
-
random_state: OptionType<IntegerType>;
|
|
150
|
+
readonly random_state: OptionType<IntegerType>;
|
|
151
151
|
}>], StructType<{
|
|
152
152
|
/** Best state found */
|
|
153
|
-
best_state: VariantType<{
|
|
153
|
+
readonly best_state: VariantType<{
|
|
154
154
|
/** Integer array state (permutations, assignments) */
|
|
155
|
-
int_array:
|
|
155
|
+
readonly int_array: VectorType<IntegerType>;
|
|
156
156
|
/** Boolean array state (subset selection) */
|
|
157
|
-
bool_array:
|
|
157
|
+
readonly bool_array: VectorType<BooleanType>;
|
|
158
158
|
}>;
|
|
159
159
|
/** Energy of best state */
|
|
160
|
-
best_energy: FloatType;
|
|
160
|
+
readonly best_energy: FloatType;
|
|
161
161
|
/** Actual iterations performed */
|
|
162
|
-
steps_taken: IntegerType;
|
|
162
|
+
readonly steps_taken: IntegerType;
|
|
163
163
|
/** Whether optimization completed successfully */
|
|
164
|
-
success: BooleanType;
|
|
164
|
+
readonly success: BooleanType;
|
|
165
165
|
}>>;
|
|
166
166
|
/**
|
|
167
167
|
* Run simulated annealing on a permutation with swap moves.
|
|
@@ -174,33 +174,33 @@ export declare const simanneal_optimize: import("@elaraai/east").PlatformDefinit
|
|
|
174
174
|
* @param config - Annealing schedule configuration
|
|
175
175
|
* @returns Result with best permutation and energy
|
|
176
176
|
*/
|
|
177
|
-
export declare const simanneal_optimize_permutation: import("@elaraai/east").PlatformDefinition<[
|
|
177
|
+
export declare const simanneal_optimize_permutation: import("@elaraai/east").PlatformDefinition<[VectorType<IntegerType>, FunctionType<[VectorType<IntegerType>], FloatType>, StructType<{
|
|
178
178
|
/** Starting temperature (default: 25000.0) */
|
|
179
|
-
t_max: OptionType<FloatType>;
|
|
179
|
+
readonly t_max: OptionType<FloatType>;
|
|
180
180
|
/** Ending temperature (default: 2.5) */
|
|
181
|
-
t_min: OptionType<FloatType>;
|
|
181
|
+
readonly t_min: OptionType<FloatType>;
|
|
182
182
|
/** Total iterations (default: 50000) */
|
|
183
|
-
steps: OptionType<IntegerType>;
|
|
183
|
+
readonly steps: OptionType<IntegerType>;
|
|
184
184
|
/** Progress report frequency (default: 0 = silent) */
|
|
185
|
-
updates: OptionType<IntegerType>;
|
|
185
|
+
readonly updates: OptionType<IntegerType>;
|
|
186
186
|
/** Minutes for auto-calibration (default: none) */
|
|
187
|
-
auto_schedule: OptionType<FloatType>;
|
|
187
|
+
readonly auto_schedule: OptionType<FloatType>;
|
|
188
188
|
/** Random seed for reproducibility */
|
|
189
|
-
random_state: OptionType<IntegerType>;
|
|
189
|
+
readonly random_state: OptionType<IntegerType>;
|
|
190
190
|
}>], StructType<{
|
|
191
191
|
/** Best state found */
|
|
192
|
-
best_state: VariantType<{
|
|
192
|
+
readonly best_state: VariantType<{
|
|
193
193
|
/** Integer array state (permutations, assignments) */
|
|
194
|
-
int_array:
|
|
194
|
+
readonly int_array: VectorType<IntegerType>;
|
|
195
195
|
/** Boolean array state (subset selection) */
|
|
196
|
-
bool_array:
|
|
196
|
+
readonly bool_array: VectorType<BooleanType>;
|
|
197
197
|
}>;
|
|
198
198
|
/** Energy of best state */
|
|
199
|
-
best_energy: FloatType;
|
|
199
|
+
readonly best_energy: FloatType;
|
|
200
200
|
/** Actual iterations performed */
|
|
201
|
-
steps_taken: IntegerType;
|
|
201
|
+
readonly steps_taken: IntegerType;
|
|
202
202
|
/** Whether optimization completed successfully */
|
|
203
|
-
success: BooleanType;
|
|
203
|
+
readonly success: BooleanType;
|
|
204
204
|
}>>;
|
|
205
205
|
/**
|
|
206
206
|
* Run simulated annealing on a subset selection with bit-flip moves.
|
|
@@ -213,33 +213,33 @@ export declare const simanneal_optimize_permutation: import("@elaraai/east").Pla
|
|
|
213
213
|
* @param config - Annealing schedule configuration
|
|
214
214
|
* @returns Result with best selection and energy
|
|
215
215
|
*/
|
|
216
|
-
export declare const simanneal_optimize_subset: import("@elaraai/east").PlatformDefinition<[
|
|
216
|
+
export declare const simanneal_optimize_subset: import("@elaraai/east").PlatformDefinition<[VectorType<BooleanType>, FunctionType<[VectorType<BooleanType>], FloatType>, StructType<{
|
|
217
217
|
/** Starting temperature (default: 25000.0) */
|
|
218
|
-
t_max: OptionType<FloatType>;
|
|
218
|
+
readonly t_max: OptionType<FloatType>;
|
|
219
219
|
/** Ending temperature (default: 2.5) */
|
|
220
|
-
t_min: OptionType<FloatType>;
|
|
220
|
+
readonly t_min: OptionType<FloatType>;
|
|
221
221
|
/** Total iterations (default: 50000) */
|
|
222
|
-
steps: OptionType<IntegerType>;
|
|
222
|
+
readonly steps: OptionType<IntegerType>;
|
|
223
223
|
/** Progress report frequency (default: 0 = silent) */
|
|
224
|
-
updates: OptionType<IntegerType>;
|
|
224
|
+
readonly updates: OptionType<IntegerType>;
|
|
225
225
|
/** Minutes for auto-calibration (default: none) */
|
|
226
|
-
auto_schedule: OptionType<FloatType>;
|
|
226
|
+
readonly auto_schedule: OptionType<FloatType>;
|
|
227
227
|
/** Random seed for reproducibility */
|
|
228
|
-
random_state: OptionType<IntegerType>;
|
|
228
|
+
readonly random_state: OptionType<IntegerType>;
|
|
229
229
|
}>], StructType<{
|
|
230
230
|
/** Best state found */
|
|
231
|
-
best_state: VariantType<{
|
|
231
|
+
readonly best_state: VariantType<{
|
|
232
232
|
/** Integer array state (permutations, assignments) */
|
|
233
|
-
int_array:
|
|
233
|
+
readonly int_array: VectorType<IntegerType>;
|
|
234
234
|
/** Boolean array state (subset selection) */
|
|
235
|
-
bool_array:
|
|
235
|
+
readonly bool_array: VectorType<BooleanType>;
|
|
236
236
|
}>;
|
|
237
237
|
/** Energy of best state */
|
|
238
|
-
best_energy: FloatType;
|
|
238
|
+
readonly best_energy: FloatType;
|
|
239
239
|
/** Actual iterations performed */
|
|
240
|
-
steps_taken: IntegerType;
|
|
240
|
+
readonly steps_taken: IntegerType;
|
|
241
241
|
/** Whether optimization completed successfully */
|
|
242
|
-
success: BooleanType;
|
|
242
|
+
readonly success: BooleanType;
|
|
243
243
|
}>>;
|
|
244
244
|
/**
|
|
245
245
|
* Type definitions for Simulated Annealing.
|
|
@@ -248,63 +248,63 @@ export declare const SimAnnealTypes: {
|
|
|
248
248
|
/** Discrete state type */
|
|
249
249
|
readonly DiscreteStateType: VariantType<{
|
|
250
250
|
/** Integer array state (permutations, assignments) */
|
|
251
|
-
int_array:
|
|
251
|
+
readonly int_array: VectorType<IntegerType>;
|
|
252
252
|
/** Boolean array state (subset selection) */
|
|
253
|
-
bool_array:
|
|
253
|
+
readonly bool_array: VectorType<BooleanType>;
|
|
254
254
|
}>;
|
|
255
255
|
/** Energy function type */
|
|
256
256
|
readonly EnergyFunctionType: FunctionType<[VariantType<{
|
|
257
257
|
/** Integer array state (permutations, assignments) */
|
|
258
|
-
int_array:
|
|
258
|
+
readonly int_array: VectorType<IntegerType>;
|
|
259
259
|
/** Boolean array state (subset selection) */
|
|
260
|
-
bool_array:
|
|
260
|
+
readonly bool_array: VectorType<BooleanType>;
|
|
261
261
|
}>], FloatType>;
|
|
262
262
|
/** Move function type */
|
|
263
263
|
readonly MoveFunctionType: FunctionType<[VariantType<{
|
|
264
264
|
/** Integer array state (permutations, assignments) */
|
|
265
|
-
int_array:
|
|
265
|
+
readonly int_array: VectorType<IntegerType>;
|
|
266
266
|
/** Boolean array state (subset selection) */
|
|
267
|
-
bool_array:
|
|
267
|
+
readonly bool_array: VectorType<BooleanType>;
|
|
268
268
|
}>], VariantType<{
|
|
269
269
|
/** Integer array state (permutations, assignments) */
|
|
270
|
-
int_array:
|
|
270
|
+
readonly int_array: VectorType<IntegerType>;
|
|
271
271
|
/** Boolean array state (subset selection) */
|
|
272
|
-
bool_array:
|
|
272
|
+
readonly bool_array: VectorType<BooleanType>;
|
|
273
273
|
}>>;
|
|
274
274
|
/** Permutation energy function type */
|
|
275
|
-
readonly PermutationEnergyType: FunctionType<[
|
|
275
|
+
readonly PermutationEnergyType: FunctionType<[VectorType<IntegerType>], FloatType>;
|
|
276
276
|
/** Subset energy function type */
|
|
277
|
-
readonly SubsetEnergyType: FunctionType<[
|
|
277
|
+
readonly SubsetEnergyType: FunctionType<[VectorType<BooleanType>], FloatType>;
|
|
278
278
|
/** Configuration type */
|
|
279
279
|
readonly ConfigType: StructType<{
|
|
280
280
|
/** Starting temperature (default: 25000.0) */
|
|
281
|
-
t_max: OptionType<FloatType>;
|
|
281
|
+
readonly t_max: OptionType<FloatType>;
|
|
282
282
|
/** Ending temperature (default: 2.5) */
|
|
283
|
-
t_min: OptionType<FloatType>;
|
|
283
|
+
readonly t_min: OptionType<FloatType>;
|
|
284
284
|
/** Total iterations (default: 50000) */
|
|
285
|
-
steps: OptionType<IntegerType>;
|
|
285
|
+
readonly steps: OptionType<IntegerType>;
|
|
286
286
|
/** Progress report frequency (default: 0 = silent) */
|
|
287
|
-
updates: OptionType<IntegerType>;
|
|
287
|
+
readonly updates: OptionType<IntegerType>;
|
|
288
288
|
/** Minutes for auto-calibration (default: none) */
|
|
289
|
-
auto_schedule: OptionType<FloatType>;
|
|
289
|
+
readonly auto_schedule: OptionType<FloatType>;
|
|
290
290
|
/** Random seed for reproducibility */
|
|
291
|
-
random_state: OptionType<IntegerType>;
|
|
291
|
+
readonly random_state: OptionType<IntegerType>;
|
|
292
292
|
}>;
|
|
293
293
|
/** Result type */
|
|
294
294
|
readonly ResultType: StructType<{
|
|
295
295
|
/** Best state found */
|
|
296
|
-
best_state: VariantType<{
|
|
296
|
+
readonly best_state: VariantType<{
|
|
297
297
|
/** Integer array state (permutations, assignments) */
|
|
298
|
-
int_array:
|
|
298
|
+
readonly int_array: VectorType<IntegerType>;
|
|
299
299
|
/** Boolean array state (subset selection) */
|
|
300
|
-
bool_array:
|
|
300
|
+
readonly bool_array: VectorType<BooleanType>;
|
|
301
301
|
}>;
|
|
302
302
|
/** Energy of best state */
|
|
303
|
-
best_energy: FloatType;
|
|
303
|
+
readonly best_energy: FloatType;
|
|
304
304
|
/** Actual iterations performed */
|
|
305
|
-
steps_taken: IntegerType;
|
|
305
|
+
readonly steps_taken: IntegerType;
|
|
306
306
|
/** Whether optimization completed successfully */
|
|
307
|
-
success: BooleanType;
|
|
307
|
+
readonly success: BooleanType;
|
|
308
308
|
}>;
|
|
309
309
|
};
|
|
310
310
|
/**
|
|
@@ -327,7 +327,7 @@ export declare const SimAnnealTypes: {
|
|
|
327
327
|
*
|
|
328
328
|
* // TSP: minimize total route distance
|
|
329
329
|
* const energy = East.function(
|
|
330
|
-
* [
|
|
330
|
+
* [VectorType(IntegerType)],
|
|
331
331
|
* FloatType,
|
|
332
332
|
* ($, route) => {
|
|
333
333
|
* // Calculate total route distance
|
|
@@ -350,116 +350,213 @@ export declare const SimAnnealTypes: {
|
|
|
350
350
|
export declare const SimAnneal: {
|
|
351
351
|
/**
|
|
352
352
|
* Run simulated annealing with custom energy and move functions.
|
|
353
|
+
*
|
|
354
|
+
* @example
|
|
355
|
+
* ```ts
|
|
356
|
+
* import { East, FloatType, IntegerType, VectorType, variant } from "@elaraai/east";
|
|
357
|
+
* import { SimAnneal, AnnealConfigType, DiscreteStateType } from "@elaraai/east-py-datascience";
|
|
358
|
+
*
|
|
359
|
+
* const solve = East.function([], SimAnneal.Types.ResultType, ($) => {
|
|
360
|
+
* const energy = East.function([DiscreteStateType], FloatType, ($, state) => {
|
|
361
|
+
* const cost = $.let(0.0);
|
|
362
|
+
* $.match(state, {
|
|
363
|
+
* int_array: ($, arr) => {
|
|
364
|
+
* const a0 = $.let(arr.get(0n));
|
|
365
|
+
* $.if(East.equal(a0, 2n), $ => {}).else($ => { $.assign(cost, cost.add(1.0)); });
|
|
366
|
+
* },
|
|
367
|
+
* bool_array: ($) => { $.assign(cost, 999.0); },
|
|
368
|
+
* });
|
|
369
|
+
* return $.return(cost);
|
|
370
|
+
* });
|
|
371
|
+
* const move = East.function([DiscreteStateType], DiscreteStateType, ($, state) => {
|
|
372
|
+
* const result = $.let(state);
|
|
373
|
+
* $.match(state, {
|
|
374
|
+
* int_array: ($, arr) => {
|
|
375
|
+
* const new_arr = $.let(East.Vector.fromArray([arr.get(0n).add(1n).remainder(3n), arr.get(1n), arr.get(2n)]));
|
|
376
|
+
* $.assign(result, variant("int_array", new_arr));
|
|
377
|
+
* },
|
|
378
|
+
* bool_array: ($, arr) => { $.assign(result, variant("bool_array", arr)); },
|
|
379
|
+
* });
|
|
380
|
+
* return $.return(result);
|
|
381
|
+
* });
|
|
382
|
+
* const initial = $.let(variant("int_array", new BigInt64Array([0n, 0n, 0n])), DiscreteStateType);
|
|
383
|
+
* const config = $.let({
|
|
384
|
+
* t_max: variant("some", 100.0), t_min: variant("some", 0.01),
|
|
385
|
+
* steps: variant("some", 1000n), updates: variant("none", null),
|
|
386
|
+
* auto_schedule: variant("none", null), random_state: variant("some", 42n),
|
|
387
|
+
* }, AnnealConfigType);
|
|
388
|
+
* return $.return(SimAnneal.optimize(initial, energy, move, config));
|
|
389
|
+
* });
|
|
390
|
+
* ```
|
|
353
391
|
*/
|
|
354
392
|
readonly optimize: import("@elaraai/east").PlatformDefinition<[VariantType<{
|
|
355
393
|
/** Integer array state (permutations, assignments) */
|
|
356
|
-
int_array:
|
|
394
|
+
readonly int_array: VectorType<IntegerType>;
|
|
357
395
|
/** Boolean array state (subset selection) */
|
|
358
|
-
bool_array:
|
|
396
|
+
readonly bool_array: VectorType<BooleanType>;
|
|
359
397
|
}>, FunctionType<[VariantType<{
|
|
360
398
|
/** Integer array state (permutations, assignments) */
|
|
361
|
-
int_array:
|
|
399
|
+
readonly int_array: VectorType<IntegerType>;
|
|
362
400
|
/** Boolean array state (subset selection) */
|
|
363
|
-
bool_array:
|
|
401
|
+
readonly bool_array: VectorType<BooleanType>;
|
|
364
402
|
}>], FloatType>, FunctionType<[VariantType<{
|
|
365
403
|
/** Integer array state (permutations, assignments) */
|
|
366
|
-
int_array:
|
|
404
|
+
readonly int_array: VectorType<IntegerType>;
|
|
367
405
|
/** Boolean array state (subset selection) */
|
|
368
|
-
bool_array:
|
|
406
|
+
readonly bool_array: VectorType<BooleanType>;
|
|
369
407
|
}>], VariantType<{
|
|
370
408
|
/** Integer array state (permutations, assignments) */
|
|
371
|
-
int_array:
|
|
409
|
+
readonly int_array: VectorType<IntegerType>;
|
|
372
410
|
/** Boolean array state (subset selection) */
|
|
373
|
-
bool_array:
|
|
411
|
+
readonly bool_array: VectorType<BooleanType>;
|
|
374
412
|
}>>, StructType<{
|
|
375
413
|
/** Starting temperature (default: 25000.0) */
|
|
376
|
-
t_max: OptionType<FloatType>;
|
|
414
|
+
readonly t_max: OptionType<FloatType>;
|
|
377
415
|
/** Ending temperature (default: 2.5) */
|
|
378
|
-
t_min: OptionType<FloatType>;
|
|
416
|
+
readonly t_min: OptionType<FloatType>;
|
|
379
417
|
/** Total iterations (default: 50000) */
|
|
380
|
-
steps: OptionType<IntegerType>;
|
|
418
|
+
readonly steps: OptionType<IntegerType>;
|
|
381
419
|
/** Progress report frequency (default: 0 = silent) */
|
|
382
|
-
updates: OptionType<IntegerType>;
|
|
420
|
+
readonly updates: OptionType<IntegerType>;
|
|
383
421
|
/** Minutes for auto-calibration (default: none) */
|
|
384
|
-
auto_schedule: OptionType<FloatType>;
|
|
422
|
+
readonly auto_schedule: OptionType<FloatType>;
|
|
385
423
|
/** Random seed for reproducibility */
|
|
386
|
-
random_state: OptionType<IntegerType>;
|
|
424
|
+
readonly random_state: OptionType<IntegerType>;
|
|
387
425
|
}>], StructType<{
|
|
388
426
|
/** Best state found */
|
|
389
|
-
best_state: VariantType<{
|
|
427
|
+
readonly best_state: VariantType<{
|
|
390
428
|
/** Integer array state (permutations, assignments) */
|
|
391
|
-
int_array:
|
|
429
|
+
readonly int_array: VectorType<IntegerType>;
|
|
392
430
|
/** Boolean array state (subset selection) */
|
|
393
|
-
bool_array:
|
|
431
|
+
readonly bool_array: VectorType<BooleanType>;
|
|
394
432
|
}>;
|
|
395
433
|
/** Energy of best state */
|
|
396
|
-
best_energy: FloatType;
|
|
434
|
+
readonly best_energy: FloatType;
|
|
397
435
|
/** Actual iterations performed */
|
|
398
|
-
steps_taken: IntegerType;
|
|
436
|
+
readonly steps_taken: IntegerType;
|
|
399
437
|
/** Whether optimization completed successfully */
|
|
400
|
-
success: BooleanType;
|
|
438
|
+
readonly success: BooleanType;
|
|
401
439
|
}>>;
|
|
402
440
|
/**
|
|
403
441
|
* Run simulated annealing on a permutation with swap moves.
|
|
442
|
+
*
|
|
443
|
+
* Convenience function for permutation-based problems (TSP, scheduling).
|
|
444
|
+
* Automatically uses swap moves to generate neighbors.
|
|
445
|
+
*
|
|
446
|
+
* @example
|
|
447
|
+
* ```ts
|
|
448
|
+
* import { East, FloatType, IntegerType, VectorType, variant } from "@elaraai/east";
|
|
449
|
+
* import { SimAnneal, AnnealConfigType } from "@elaraai/east-py-datascience";
|
|
450
|
+
*
|
|
451
|
+
* const solve = East.function([], SimAnneal.Types.ResultType, ($) => {
|
|
452
|
+
* const energy = East.function([VectorType(IntegerType)], FloatType, ($, route) => {
|
|
453
|
+
* const total = $.let(0.0);
|
|
454
|
+
* $.for(East.Array.range(0n, route.length()), ($, i) => {
|
|
455
|
+
* const from = $.let(route.get(i));
|
|
456
|
+
* const to = $.let(route.get(i.add(1n).remainder(route.length())));
|
|
457
|
+
* const diff = $.let(from.subtract(to).abs());
|
|
458
|
+
* $.if(East.equal(diff, 1n).or(() => East.equal(diff, 3n)), $ => {
|
|
459
|
+
* $.assign(total, total.add(1.0));
|
|
460
|
+
* }).else($ => { $.assign(total, total.add(1.414)); });
|
|
461
|
+
* });
|
|
462
|
+
* return $.return(total);
|
|
463
|
+
* });
|
|
464
|
+
* const initial = $.let(new BigInt64Array([0n, 1n, 2n, 3n]));
|
|
465
|
+
* const config = $.let({
|
|
466
|
+
* t_max: variant("some", 1000.0), t_min: variant("some", 0.1),
|
|
467
|
+
* steps: variant("some", 5000n), updates: variant("none", null),
|
|
468
|
+
* auto_schedule: variant("none", null), random_state: variant("some", 42n),
|
|
469
|
+
* }, AnnealConfigType);
|
|
470
|
+
* return $.return(SimAnneal.optimizePermutation(initial, energy, config));
|
|
471
|
+
* });
|
|
472
|
+
* ```
|
|
404
473
|
*/
|
|
405
|
-
readonly optimizePermutation: import("@elaraai/east").PlatformDefinition<[
|
|
474
|
+
readonly optimizePermutation: import("@elaraai/east").PlatformDefinition<[VectorType<IntegerType>, FunctionType<[VectorType<IntegerType>], FloatType>, StructType<{
|
|
406
475
|
/** Starting temperature (default: 25000.0) */
|
|
407
|
-
t_max: OptionType<FloatType>;
|
|
476
|
+
readonly t_max: OptionType<FloatType>;
|
|
408
477
|
/** Ending temperature (default: 2.5) */
|
|
409
|
-
t_min: OptionType<FloatType>;
|
|
478
|
+
readonly t_min: OptionType<FloatType>;
|
|
410
479
|
/** Total iterations (default: 50000) */
|
|
411
|
-
steps: OptionType<IntegerType>;
|
|
480
|
+
readonly steps: OptionType<IntegerType>;
|
|
412
481
|
/** Progress report frequency (default: 0 = silent) */
|
|
413
|
-
updates: OptionType<IntegerType>;
|
|
482
|
+
readonly updates: OptionType<IntegerType>;
|
|
414
483
|
/** Minutes for auto-calibration (default: none) */
|
|
415
|
-
auto_schedule: OptionType<FloatType>;
|
|
484
|
+
readonly auto_schedule: OptionType<FloatType>;
|
|
416
485
|
/** Random seed for reproducibility */
|
|
417
|
-
random_state: OptionType<IntegerType>;
|
|
486
|
+
readonly random_state: OptionType<IntegerType>;
|
|
418
487
|
}>], StructType<{
|
|
419
488
|
/** Best state found */
|
|
420
|
-
best_state: VariantType<{
|
|
489
|
+
readonly best_state: VariantType<{
|
|
421
490
|
/** Integer array state (permutations, assignments) */
|
|
422
|
-
int_array:
|
|
491
|
+
readonly int_array: VectorType<IntegerType>;
|
|
423
492
|
/** Boolean array state (subset selection) */
|
|
424
|
-
bool_array:
|
|
493
|
+
readonly bool_array: VectorType<BooleanType>;
|
|
425
494
|
}>;
|
|
426
495
|
/** Energy of best state */
|
|
427
|
-
best_energy: FloatType;
|
|
496
|
+
readonly best_energy: FloatType;
|
|
428
497
|
/** Actual iterations performed */
|
|
429
|
-
steps_taken: IntegerType;
|
|
498
|
+
readonly steps_taken: IntegerType;
|
|
430
499
|
/** Whether optimization completed successfully */
|
|
431
|
-
success: BooleanType;
|
|
500
|
+
readonly success: BooleanType;
|
|
432
501
|
}>>;
|
|
433
502
|
/**
|
|
434
503
|
* Run simulated annealing on a subset selection with bit-flip moves.
|
|
504
|
+
*
|
|
505
|
+
* Convenience function for subset selection problems (feature selection, knapsack).
|
|
506
|
+
* Automatically uses bit-flip moves to generate neighbors.
|
|
507
|
+
*
|
|
508
|
+
* @example
|
|
509
|
+
* ```ts
|
|
510
|
+
* import { East, FloatType, BooleanType, VectorType, variant } from "@elaraai/east";
|
|
511
|
+
* import { SimAnneal, AnnealConfigType } from "@elaraai/east-py-datascience";
|
|
512
|
+
*
|
|
513
|
+
* const solve = East.function([], SimAnneal.Types.ResultType, ($) => {
|
|
514
|
+
* const items = $.let(new Float64Array([3.0, 7.0, 1.0, 8.0, 4.0]));
|
|
515
|
+
* const target = $.let(12.0);
|
|
516
|
+
* const energy = East.function([VectorType(BooleanType)], FloatType, ($, selection) => {
|
|
517
|
+
* const sum = $.let(0.0);
|
|
518
|
+
* $.for(East.Array.range(0n, selection.length()), ($, i) => {
|
|
519
|
+
* $.if(selection.get(i), $ => { $.assign(sum, sum.add(items.get(i))); });
|
|
520
|
+
* });
|
|
521
|
+
* return $.return(sum.subtract(target).abs());
|
|
522
|
+
* });
|
|
523
|
+
* const initial = $.let(East.Vector.fromArray([true, true, true, true, true]));
|
|
524
|
+
* const config = $.let({
|
|
525
|
+
* t_max: variant("some", 500.0), t_min: variant("some", 0.1),
|
|
526
|
+
* steps: variant("some", 2000n), updates: variant("none", null),
|
|
527
|
+
* auto_schedule: variant("none", null), random_state: variant("some", 123n),
|
|
528
|
+
* }, AnnealConfigType);
|
|
529
|
+
* return $.return(SimAnneal.optimizeSubset(initial, energy, config));
|
|
530
|
+
* });
|
|
531
|
+
* ```
|
|
435
532
|
*/
|
|
436
|
-
readonly optimizeSubset: import("@elaraai/east").PlatformDefinition<[
|
|
533
|
+
readonly optimizeSubset: import("@elaraai/east").PlatformDefinition<[VectorType<BooleanType>, FunctionType<[VectorType<BooleanType>], FloatType>, StructType<{
|
|
437
534
|
/** Starting temperature (default: 25000.0) */
|
|
438
|
-
t_max: OptionType<FloatType>;
|
|
535
|
+
readonly t_max: OptionType<FloatType>;
|
|
439
536
|
/** Ending temperature (default: 2.5) */
|
|
440
|
-
t_min: OptionType<FloatType>;
|
|
537
|
+
readonly t_min: OptionType<FloatType>;
|
|
441
538
|
/** Total iterations (default: 50000) */
|
|
442
|
-
steps: OptionType<IntegerType>;
|
|
539
|
+
readonly steps: OptionType<IntegerType>;
|
|
443
540
|
/** Progress report frequency (default: 0 = silent) */
|
|
444
|
-
updates: OptionType<IntegerType>;
|
|
541
|
+
readonly updates: OptionType<IntegerType>;
|
|
445
542
|
/** Minutes for auto-calibration (default: none) */
|
|
446
|
-
auto_schedule: OptionType<FloatType>;
|
|
543
|
+
readonly auto_schedule: OptionType<FloatType>;
|
|
447
544
|
/** Random seed for reproducibility */
|
|
448
|
-
random_state: OptionType<IntegerType>;
|
|
545
|
+
readonly random_state: OptionType<IntegerType>;
|
|
449
546
|
}>], StructType<{
|
|
450
547
|
/** Best state found */
|
|
451
|
-
best_state: VariantType<{
|
|
548
|
+
readonly best_state: VariantType<{
|
|
452
549
|
/** Integer array state (permutations, assignments) */
|
|
453
|
-
int_array:
|
|
550
|
+
readonly int_array: VectorType<IntegerType>;
|
|
454
551
|
/** Boolean array state (subset selection) */
|
|
455
|
-
bool_array:
|
|
552
|
+
readonly bool_array: VectorType<BooleanType>;
|
|
456
553
|
}>;
|
|
457
554
|
/** Energy of best state */
|
|
458
|
-
best_energy: FloatType;
|
|
555
|
+
readonly best_energy: FloatType;
|
|
459
556
|
/** Actual iterations performed */
|
|
460
|
-
steps_taken: IntegerType;
|
|
557
|
+
readonly steps_taken: IntegerType;
|
|
461
558
|
/** Whether optimization completed successfully */
|
|
462
|
-
success: BooleanType;
|
|
559
|
+
readonly success: BooleanType;
|
|
463
560
|
}>>;
|
|
464
561
|
/**
|
|
465
562
|
* Type definitions for SimAnneal functions.
|
|
@@ -468,63 +565,63 @@ export declare const SimAnneal: {
|
|
|
468
565
|
/** Discrete state type */
|
|
469
566
|
readonly DiscreteStateType: VariantType<{
|
|
470
567
|
/** Integer array state (permutations, assignments) */
|
|
471
|
-
int_array:
|
|
568
|
+
readonly int_array: VectorType<IntegerType>;
|
|
472
569
|
/** Boolean array state (subset selection) */
|
|
473
|
-
bool_array:
|
|
570
|
+
readonly bool_array: VectorType<BooleanType>;
|
|
474
571
|
}>;
|
|
475
572
|
/** Energy function type */
|
|
476
573
|
readonly EnergyFunctionType: FunctionType<[VariantType<{
|
|
477
574
|
/** Integer array state (permutations, assignments) */
|
|
478
|
-
int_array:
|
|
575
|
+
readonly int_array: VectorType<IntegerType>;
|
|
479
576
|
/** Boolean array state (subset selection) */
|
|
480
|
-
bool_array:
|
|
577
|
+
readonly bool_array: VectorType<BooleanType>;
|
|
481
578
|
}>], FloatType>;
|
|
482
579
|
/** Move function type */
|
|
483
580
|
readonly MoveFunctionType: FunctionType<[VariantType<{
|
|
484
581
|
/** Integer array state (permutations, assignments) */
|
|
485
|
-
int_array:
|
|
582
|
+
readonly int_array: VectorType<IntegerType>;
|
|
486
583
|
/** Boolean array state (subset selection) */
|
|
487
|
-
bool_array:
|
|
584
|
+
readonly bool_array: VectorType<BooleanType>;
|
|
488
585
|
}>], VariantType<{
|
|
489
586
|
/** Integer array state (permutations, assignments) */
|
|
490
|
-
int_array:
|
|
587
|
+
readonly int_array: VectorType<IntegerType>;
|
|
491
588
|
/** Boolean array state (subset selection) */
|
|
492
|
-
bool_array:
|
|
589
|
+
readonly bool_array: VectorType<BooleanType>;
|
|
493
590
|
}>>;
|
|
494
591
|
/** Permutation energy function type */
|
|
495
|
-
readonly PermutationEnergyType: FunctionType<[
|
|
592
|
+
readonly PermutationEnergyType: FunctionType<[VectorType<IntegerType>], FloatType>;
|
|
496
593
|
/** Subset energy function type */
|
|
497
|
-
readonly SubsetEnergyType: FunctionType<[
|
|
594
|
+
readonly SubsetEnergyType: FunctionType<[VectorType<BooleanType>], FloatType>;
|
|
498
595
|
/** Configuration type */
|
|
499
596
|
readonly ConfigType: StructType<{
|
|
500
597
|
/** Starting temperature (default: 25000.0) */
|
|
501
|
-
t_max: OptionType<FloatType>;
|
|
598
|
+
readonly t_max: OptionType<FloatType>;
|
|
502
599
|
/** Ending temperature (default: 2.5) */
|
|
503
|
-
t_min: OptionType<FloatType>;
|
|
600
|
+
readonly t_min: OptionType<FloatType>;
|
|
504
601
|
/** Total iterations (default: 50000) */
|
|
505
|
-
steps: OptionType<IntegerType>;
|
|
602
|
+
readonly steps: OptionType<IntegerType>;
|
|
506
603
|
/** Progress report frequency (default: 0 = silent) */
|
|
507
|
-
updates: OptionType<IntegerType>;
|
|
604
|
+
readonly updates: OptionType<IntegerType>;
|
|
508
605
|
/** Minutes for auto-calibration (default: none) */
|
|
509
|
-
auto_schedule: OptionType<FloatType>;
|
|
606
|
+
readonly auto_schedule: OptionType<FloatType>;
|
|
510
607
|
/** Random seed for reproducibility */
|
|
511
|
-
random_state: OptionType<IntegerType>;
|
|
608
|
+
readonly random_state: OptionType<IntegerType>;
|
|
512
609
|
}>;
|
|
513
610
|
/** Result type */
|
|
514
611
|
readonly ResultType: StructType<{
|
|
515
612
|
/** Best state found */
|
|
516
|
-
best_state: VariantType<{
|
|
613
|
+
readonly best_state: VariantType<{
|
|
517
614
|
/** Integer array state (permutations, assignments) */
|
|
518
|
-
int_array:
|
|
615
|
+
readonly int_array: VectorType<IntegerType>;
|
|
519
616
|
/** Boolean array state (subset selection) */
|
|
520
|
-
bool_array:
|
|
617
|
+
readonly bool_array: VectorType<BooleanType>;
|
|
521
618
|
}>;
|
|
522
619
|
/** Energy of best state */
|
|
523
|
-
best_energy: FloatType;
|
|
620
|
+
readonly best_energy: FloatType;
|
|
524
621
|
/** Actual iterations performed */
|
|
525
|
-
steps_taken: IntegerType;
|
|
622
|
+
readonly steps_taken: IntegerType;
|
|
526
623
|
/** Whether optimization completed successfully */
|
|
527
|
-
success: BooleanType;
|
|
624
|
+
readonly success: BooleanType;
|
|
528
625
|
}>;
|
|
529
626
|
};
|
|
530
627
|
};
|