@elaraai/east-py-datascience 0.0.2-beta.1

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.
Files changed (56) hide show
  1. package/LICENSE.md +18 -0
  2. package/README.md +104 -0
  3. package/dist/gp/gp.d.ts +398 -0
  4. package/dist/gp/gp.d.ts.map +1 -0
  5. package/dist/gp/gp.js +170 -0
  6. package/dist/gp/gp.js.map +1 -0
  7. package/dist/index.d.ts +27 -0
  8. package/dist/index.d.ts.map +1 -0
  9. package/dist/index.js +39 -0
  10. package/dist/index.js.map +1 -0
  11. package/dist/lightgbm/lightgbm.d.ts +494 -0
  12. package/dist/lightgbm/lightgbm.d.ts.map +1 -0
  13. package/dist/lightgbm/lightgbm.js +155 -0
  14. package/dist/lightgbm/lightgbm.js.map +1 -0
  15. package/dist/mads/mads.d.ts +413 -0
  16. package/dist/mads/mads.d.ts.map +1 -0
  17. package/dist/mads/mads.js +221 -0
  18. package/dist/mads/mads.js.map +1 -0
  19. package/dist/ngboost/ngboost.d.ts +433 -0
  20. package/dist/ngboost/ngboost.d.ts.map +1 -0
  21. package/dist/ngboost/ngboost.js +178 -0
  22. package/dist/ngboost/ngboost.js.map +1 -0
  23. package/dist/optuna/optuna.d.ts +797 -0
  24. package/dist/optuna/optuna.d.ts.map +1 -0
  25. package/dist/optuna/optuna.js +268 -0
  26. package/dist/optuna/optuna.js.map +1 -0
  27. package/dist/scipy/scipy.d.ts +954 -0
  28. package/dist/scipy/scipy.d.ts.map +1 -0
  29. package/dist/scipy/scipy.js +287 -0
  30. package/dist/scipy/scipy.js.map +1 -0
  31. package/dist/shap/shap.d.ts +657 -0
  32. package/dist/shap/shap.d.ts.map +1 -0
  33. package/dist/shap/shap.js +241 -0
  34. package/dist/shap/shap.js.map +1 -0
  35. package/dist/simanneal/simanneal.d.ts +531 -0
  36. package/dist/simanneal/simanneal.d.ts.map +1 -0
  37. package/dist/simanneal/simanneal.js +231 -0
  38. package/dist/simanneal/simanneal.js.map +1 -0
  39. package/dist/sklearn/sklearn.d.ts +1272 -0
  40. package/dist/sklearn/sklearn.d.ts.map +1 -0
  41. package/dist/sklearn/sklearn.js +307 -0
  42. package/dist/sklearn/sklearn.js.map +1 -0
  43. package/dist/torch/torch.d.ts +658 -0
  44. package/dist/torch/torch.d.ts.map +1 -0
  45. package/dist/torch/torch.js +233 -0
  46. package/dist/torch/torch.js.map +1 -0
  47. package/dist/tsconfig.tsbuildinfo +1 -0
  48. package/dist/types.d.ts +80 -0
  49. package/dist/types.d.ts.map +1 -0
  50. package/dist/types.js +81 -0
  51. package/dist/types.js.map +1 -0
  52. package/dist/xgboost/xgboost.d.ts +504 -0
  53. package/dist/xgboost/xgboost.d.ts.map +1 -0
  54. package/dist/xgboost/xgboost.js +177 -0
  55. package/dist/xgboost/xgboost.js.map +1 -0
  56. package/package.json +82 -0
@@ -0,0 +1,531 @@
1
+ /**
2
+ * Copyright (c) 2025 Elara AI Pty Ltd
3
+ * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
4
+ */
5
+ /**
6
+ * Discrete optimization using Simulated Annealing.
7
+ *
8
+ * Provides combinatorial optimization for discrete state spaces using the
9
+ * simanneal library. Ideal for:
10
+ * - Permutation problems (TSP, scheduling)
11
+ * - Subset selection (feature selection, knapsack)
12
+ * - Assignment problems
13
+ * - Any discrete optimization where gradient methods don't apply
14
+ *
15
+ * @packageDocumentation
16
+ */
17
+ import { StructType, VariantType, OptionType, ArrayType, IntegerType, FloatType, BooleanType, FunctionType } from "@elaraai/east";
18
+ /**
19
+ * Discrete state type for simulated annealing.
20
+ *
21
+ * Supports different representations for combinatorial problems:
22
+ * - int_array: Permutations, assignments, sequences of integers
23
+ * - bool_array: Subset selections, binary decisions
24
+ */
25
+ export declare const DiscreteStateType: VariantType<{
26
+ /** Integer array state (permutations, assignments) */
27
+ int_array: ArrayType<IntegerType>;
28
+ /** Boolean array state (subset selection) */
29
+ bool_array: ArrayType<BooleanType>;
30
+ }>;
31
+ /**
32
+ * Energy function type: state -> score.
33
+ *
34
+ * Computes the objective value (energy) for a given state.
35
+ * Lower energy is better (minimization).
36
+ */
37
+ export declare const EnergyFunctionType: FunctionType<[VariantType<{
38
+ /** Integer array state (permutations, assignments) */
39
+ int_array: ArrayType<IntegerType>;
40
+ /** Boolean array state (subset selection) */
41
+ bool_array: ArrayType<BooleanType>;
42
+ }>], FloatType>;
43
+ /**
44
+ * Move function type: state -> neighbor state.
45
+ *
46
+ * Generates a random neighbor of the current state.
47
+ * Should make small, local changes (e.g., swap two elements).
48
+ */
49
+ export declare const MoveFunctionType: FunctionType<[VariantType<{
50
+ /** Integer array state (permutations, assignments) */
51
+ int_array: ArrayType<IntegerType>;
52
+ /** Boolean array state (subset selection) */
53
+ bool_array: ArrayType<BooleanType>;
54
+ }>], VariantType<{
55
+ /** Integer array state (permutations, assignments) */
56
+ int_array: ArrayType<IntegerType>;
57
+ /** Boolean array state (subset selection) */
58
+ bool_array: ArrayType<BooleanType>;
59
+ }>>;
60
+ /**
61
+ * Permutation energy function type.
62
+ *
63
+ * Specialized for permutation-based optimization.
64
+ */
65
+ export declare const PermutationEnergyType: FunctionType<[ArrayType<IntegerType>], FloatType>;
66
+ /**
67
+ * Subset energy function type.
68
+ *
69
+ * Specialized for subset selection optimization.
70
+ */
71
+ export declare const SubsetEnergyType: FunctionType<[ArrayType<BooleanType>], FloatType>;
72
+ /**
73
+ * Simulated annealing configuration.
74
+ */
75
+ export declare const AnnealConfigType: StructType<{
76
+ /** Starting temperature (default: 25000.0) */
77
+ t_max: OptionType<FloatType>;
78
+ /** Ending temperature (default: 2.5) */
79
+ t_min: OptionType<FloatType>;
80
+ /** Total iterations (default: 50000) */
81
+ steps: OptionType<IntegerType>;
82
+ /** Progress report frequency (default: 0 = silent) */
83
+ updates: OptionType<IntegerType>;
84
+ /** Minutes for auto-calibration (default: none) */
85
+ auto_schedule: OptionType<FloatType>;
86
+ /** Random seed for reproducibility */
87
+ random_state: OptionType<IntegerType>;
88
+ }>;
89
+ /**
90
+ * Simulated annealing result.
91
+ */
92
+ export declare const AnnealResultType: StructType<{
93
+ /** Best state found */
94
+ best_state: VariantType<{
95
+ /** Integer array state (permutations, assignments) */
96
+ int_array: ArrayType<IntegerType>;
97
+ /** Boolean array state (subset selection) */
98
+ bool_array: ArrayType<BooleanType>;
99
+ }>;
100
+ /** Energy of best state */
101
+ best_energy: FloatType;
102
+ /** Actual iterations performed */
103
+ steps_taken: IntegerType;
104
+ /** Whether optimization completed successfully */
105
+ success: BooleanType;
106
+ }>;
107
+ /**
108
+ * Run simulated annealing on a discrete state space.
109
+ *
110
+ * Uses custom energy and move functions for flexible optimization.
111
+ *
112
+ * @param initial_state - Starting state
113
+ * @param energy_fn - Function to compute state energy (lower is better)
114
+ * @param move_fn - Function to generate neighbor states
115
+ * @param config - Annealing schedule configuration
116
+ * @returns Result with best state and energy
117
+ */
118
+ export declare const simanneal_optimize: import("@elaraai/east").PlatformDefinition<[VariantType<{
119
+ /** Integer array state (permutations, assignments) */
120
+ int_array: ArrayType<IntegerType>;
121
+ /** Boolean array state (subset selection) */
122
+ bool_array: ArrayType<BooleanType>;
123
+ }>, FunctionType<[VariantType<{
124
+ /** Integer array state (permutations, assignments) */
125
+ int_array: ArrayType<IntegerType>;
126
+ /** Boolean array state (subset selection) */
127
+ bool_array: ArrayType<BooleanType>;
128
+ }>], FloatType>, FunctionType<[VariantType<{
129
+ /** Integer array state (permutations, assignments) */
130
+ int_array: ArrayType<IntegerType>;
131
+ /** Boolean array state (subset selection) */
132
+ bool_array: ArrayType<BooleanType>;
133
+ }>], VariantType<{
134
+ /** Integer array state (permutations, assignments) */
135
+ int_array: ArrayType<IntegerType>;
136
+ /** Boolean array state (subset selection) */
137
+ bool_array: ArrayType<BooleanType>;
138
+ }>>, StructType<{
139
+ /** Starting temperature (default: 25000.0) */
140
+ t_max: OptionType<FloatType>;
141
+ /** Ending temperature (default: 2.5) */
142
+ t_min: OptionType<FloatType>;
143
+ /** Total iterations (default: 50000) */
144
+ steps: OptionType<IntegerType>;
145
+ /** Progress report frequency (default: 0 = silent) */
146
+ updates: OptionType<IntegerType>;
147
+ /** Minutes for auto-calibration (default: none) */
148
+ auto_schedule: OptionType<FloatType>;
149
+ /** Random seed for reproducibility */
150
+ random_state: OptionType<IntegerType>;
151
+ }>], StructType<{
152
+ /** Best state found */
153
+ best_state: VariantType<{
154
+ /** Integer array state (permutations, assignments) */
155
+ int_array: ArrayType<IntegerType>;
156
+ /** Boolean array state (subset selection) */
157
+ bool_array: ArrayType<BooleanType>;
158
+ }>;
159
+ /** Energy of best state */
160
+ best_energy: FloatType;
161
+ /** Actual iterations performed */
162
+ steps_taken: IntegerType;
163
+ /** Whether optimization completed successfully */
164
+ success: BooleanType;
165
+ }>>;
166
+ /**
167
+ * Run simulated annealing on a permutation with swap moves.
168
+ *
169
+ * Convenience function for permutation-based problems (TSP, scheduling).
170
+ * Automatically uses swap moves to generate neighbors.
171
+ *
172
+ * @param initial_perm - Starting permutation
173
+ * @param energy_fn - Function to compute permutation energy
174
+ * @param config - Annealing schedule configuration
175
+ * @returns Result with best permutation and energy
176
+ */
177
+ export declare const simanneal_optimize_permutation: import("@elaraai/east").PlatformDefinition<[ArrayType<IntegerType>, FunctionType<[ArrayType<IntegerType>], FloatType>, StructType<{
178
+ /** Starting temperature (default: 25000.0) */
179
+ t_max: OptionType<FloatType>;
180
+ /** Ending temperature (default: 2.5) */
181
+ t_min: OptionType<FloatType>;
182
+ /** Total iterations (default: 50000) */
183
+ steps: OptionType<IntegerType>;
184
+ /** Progress report frequency (default: 0 = silent) */
185
+ updates: OptionType<IntegerType>;
186
+ /** Minutes for auto-calibration (default: none) */
187
+ auto_schedule: OptionType<FloatType>;
188
+ /** Random seed for reproducibility */
189
+ random_state: OptionType<IntegerType>;
190
+ }>], StructType<{
191
+ /** Best state found */
192
+ best_state: VariantType<{
193
+ /** Integer array state (permutations, assignments) */
194
+ int_array: ArrayType<IntegerType>;
195
+ /** Boolean array state (subset selection) */
196
+ bool_array: ArrayType<BooleanType>;
197
+ }>;
198
+ /** Energy of best state */
199
+ best_energy: FloatType;
200
+ /** Actual iterations performed */
201
+ steps_taken: IntegerType;
202
+ /** Whether optimization completed successfully */
203
+ success: BooleanType;
204
+ }>>;
205
+ /**
206
+ * Run simulated annealing on a subset selection with bit-flip moves.
207
+ *
208
+ * Convenience function for subset selection problems (feature selection, knapsack).
209
+ * Automatically uses bit-flip moves to generate neighbors.
210
+ *
211
+ * @param initial_selection - Starting selection (boolean array)
212
+ * @param energy_fn - Function to compute selection energy
213
+ * @param config - Annealing schedule configuration
214
+ * @returns Result with best selection and energy
215
+ */
216
+ export declare const simanneal_optimize_subset: import("@elaraai/east").PlatformDefinition<[ArrayType<BooleanType>, FunctionType<[ArrayType<BooleanType>], FloatType>, StructType<{
217
+ /** Starting temperature (default: 25000.0) */
218
+ t_max: OptionType<FloatType>;
219
+ /** Ending temperature (default: 2.5) */
220
+ t_min: OptionType<FloatType>;
221
+ /** Total iterations (default: 50000) */
222
+ steps: OptionType<IntegerType>;
223
+ /** Progress report frequency (default: 0 = silent) */
224
+ updates: OptionType<IntegerType>;
225
+ /** Minutes for auto-calibration (default: none) */
226
+ auto_schedule: OptionType<FloatType>;
227
+ /** Random seed for reproducibility */
228
+ random_state: OptionType<IntegerType>;
229
+ }>], StructType<{
230
+ /** Best state found */
231
+ best_state: VariantType<{
232
+ /** Integer array state (permutations, assignments) */
233
+ int_array: ArrayType<IntegerType>;
234
+ /** Boolean array state (subset selection) */
235
+ bool_array: ArrayType<BooleanType>;
236
+ }>;
237
+ /** Energy of best state */
238
+ best_energy: FloatType;
239
+ /** Actual iterations performed */
240
+ steps_taken: IntegerType;
241
+ /** Whether optimization completed successfully */
242
+ success: BooleanType;
243
+ }>>;
244
+ /**
245
+ * Type definitions for Simulated Annealing.
246
+ */
247
+ export declare const SimAnnealTypes: {
248
+ /** Discrete state type */
249
+ readonly DiscreteStateType: VariantType<{
250
+ /** Integer array state (permutations, assignments) */
251
+ int_array: ArrayType<IntegerType>;
252
+ /** Boolean array state (subset selection) */
253
+ bool_array: ArrayType<BooleanType>;
254
+ }>;
255
+ /** Energy function type */
256
+ readonly EnergyFunctionType: FunctionType<[VariantType<{
257
+ /** Integer array state (permutations, assignments) */
258
+ int_array: ArrayType<IntegerType>;
259
+ /** Boolean array state (subset selection) */
260
+ bool_array: ArrayType<BooleanType>;
261
+ }>], FloatType>;
262
+ /** Move function type */
263
+ readonly MoveFunctionType: FunctionType<[VariantType<{
264
+ /** Integer array state (permutations, assignments) */
265
+ int_array: ArrayType<IntegerType>;
266
+ /** Boolean array state (subset selection) */
267
+ bool_array: ArrayType<BooleanType>;
268
+ }>], VariantType<{
269
+ /** Integer array state (permutations, assignments) */
270
+ int_array: ArrayType<IntegerType>;
271
+ /** Boolean array state (subset selection) */
272
+ bool_array: ArrayType<BooleanType>;
273
+ }>>;
274
+ /** Permutation energy function type */
275
+ readonly PermutationEnergyType: FunctionType<[ArrayType<IntegerType>], FloatType>;
276
+ /** Subset energy function type */
277
+ readonly SubsetEnergyType: FunctionType<[ArrayType<BooleanType>], FloatType>;
278
+ /** Configuration type */
279
+ readonly ConfigType: StructType<{
280
+ /** Starting temperature (default: 25000.0) */
281
+ t_max: OptionType<FloatType>;
282
+ /** Ending temperature (default: 2.5) */
283
+ t_min: OptionType<FloatType>;
284
+ /** Total iterations (default: 50000) */
285
+ steps: OptionType<IntegerType>;
286
+ /** Progress report frequency (default: 0 = silent) */
287
+ updates: OptionType<IntegerType>;
288
+ /** Minutes for auto-calibration (default: none) */
289
+ auto_schedule: OptionType<FloatType>;
290
+ /** Random seed for reproducibility */
291
+ random_state: OptionType<IntegerType>;
292
+ }>;
293
+ /** Result type */
294
+ readonly ResultType: StructType<{
295
+ /** Best state found */
296
+ best_state: VariantType<{
297
+ /** Integer array state (permutations, assignments) */
298
+ int_array: ArrayType<IntegerType>;
299
+ /** Boolean array state (subset selection) */
300
+ bool_array: ArrayType<BooleanType>;
301
+ }>;
302
+ /** Energy of best state */
303
+ best_energy: FloatType;
304
+ /** Actual iterations performed */
305
+ steps_taken: IntegerType;
306
+ /** Whether optimization completed successfully */
307
+ success: BooleanType;
308
+ }>;
309
+ };
310
+ /**
311
+ * Discrete optimization using Simulated Annealing.
312
+ *
313
+ * Provides combinatorial optimization for discrete state spaces.
314
+ * Simulated annealing is a probabilistic technique that can escape
315
+ * local minima by occasionally accepting worse solutions.
316
+ *
317
+ * Ideal for:
318
+ * - Permutation problems (TSP, job scheduling)
319
+ * - Subset selection (feature selection, knapsack)
320
+ * - Assignment problems
321
+ * - Any discrete optimization with many local minima
322
+ *
323
+ * @example
324
+ * ```ts
325
+ * import { East, FloatType, variant } from "@elaraai/east";
326
+ * import { SimAnneal } from "@elaraai/east-py-datascience";
327
+ *
328
+ * // TSP: minimize total route distance
329
+ * const energy = East.function(
330
+ * [ArrayType(IntegerType)],
331
+ * FloatType,
332
+ * ($, route) => {
333
+ * // Calculate total route distance
334
+ * return $.return(totalDistance);
335
+ * }
336
+ * );
337
+ *
338
+ * const config = $.let({
339
+ * t_max: variant("some", 10000.0),
340
+ * t_min: variant("some", 1.0),
341
+ * steps: variant("some", 50000n),
342
+ * updates: variant("none", null),
343
+ * auto_schedule: variant("none", null),
344
+ * random_state: variant("some", 42n),
345
+ * });
346
+ *
347
+ * const result = SimAnneal.optimizePermutation(initial, energy, config);
348
+ * ```
349
+ */
350
+ export declare const SimAnneal: {
351
+ /**
352
+ * Run simulated annealing with custom energy and move functions.
353
+ */
354
+ readonly optimize: import("@elaraai/east").PlatformDefinition<[VariantType<{
355
+ /** Integer array state (permutations, assignments) */
356
+ int_array: ArrayType<IntegerType>;
357
+ /** Boolean array state (subset selection) */
358
+ bool_array: ArrayType<BooleanType>;
359
+ }>, FunctionType<[VariantType<{
360
+ /** Integer array state (permutations, assignments) */
361
+ int_array: ArrayType<IntegerType>;
362
+ /** Boolean array state (subset selection) */
363
+ bool_array: ArrayType<BooleanType>;
364
+ }>], FloatType>, FunctionType<[VariantType<{
365
+ /** Integer array state (permutations, assignments) */
366
+ int_array: ArrayType<IntegerType>;
367
+ /** Boolean array state (subset selection) */
368
+ bool_array: ArrayType<BooleanType>;
369
+ }>], VariantType<{
370
+ /** Integer array state (permutations, assignments) */
371
+ int_array: ArrayType<IntegerType>;
372
+ /** Boolean array state (subset selection) */
373
+ bool_array: ArrayType<BooleanType>;
374
+ }>>, StructType<{
375
+ /** Starting temperature (default: 25000.0) */
376
+ t_max: OptionType<FloatType>;
377
+ /** Ending temperature (default: 2.5) */
378
+ t_min: OptionType<FloatType>;
379
+ /** Total iterations (default: 50000) */
380
+ steps: OptionType<IntegerType>;
381
+ /** Progress report frequency (default: 0 = silent) */
382
+ updates: OptionType<IntegerType>;
383
+ /** Minutes for auto-calibration (default: none) */
384
+ auto_schedule: OptionType<FloatType>;
385
+ /** Random seed for reproducibility */
386
+ random_state: OptionType<IntegerType>;
387
+ }>], StructType<{
388
+ /** Best state found */
389
+ best_state: VariantType<{
390
+ /** Integer array state (permutations, assignments) */
391
+ int_array: ArrayType<IntegerType>;
392
+ /** Boolean array state (subset selection) */
393
+ bool_array: ArrayType<BooleanType>;
394
+ }>;
395
+ /** Energy of best state */
396
+ best_energy: FloatType;
397
+ /** Actual iterations performed */
398
+ steps_taken: IntegerType;
399
+ /** Whether optimization completed successfully */
400
+ success: BooleanType;
401
+ }>>;
402
+ /**
403
+ * Run simulated annealing on a permutation with swap moves.
404
+ */
405
+ readonly optimizePermutation: import("@elaraai/east").PlatformDefinition<[ArrayType<IntegerType>, FunctionType<[ArrayType<IntegerType>], FloatType>, StructType<{
406
+ /** Starting temperature (default: 25000.0) */
407
+ t_max: OptionType<FloatType>;
408
+ /** Ending temperature (default: 2.5) */
409
+ t_min: OptionType<FloatType>;
410
+ /** Total iterations (default: 50000) */
411
+ steps: OptionType<IntegerType>;
412
+ /** Progress report frequency (default: 0 = silent) */
413
+ updates: OptionType<IntegerType>;
414
+ /** Minutes for auto-calibration (default: none) */
415
+ auto_schedule: OptionType<FloatType>;
416
+ /** Random seed for reproducibility */
417
+ random_state: OptionType<IntegerType>;
418
+ }>], StructType<{
419
+ /** Best state found */
420
+ best_state: VariantType<{
421
+ /** Integer array state (permutations, assignments) */
422
+ int_array: ArrayType<IntegerType>;
423
+ /** Boolean array state (subset selection) */
424
+ bool_array: ArrayType<BooleanType>;
425
+ }>;
426
+ /** Energy of best state */
427
+ best_energy: FloatType;
428
+ /** Actual iterations performed */
429
+ steps_taken: IntegerType;
430
+ /** Whether optimization completed successfully */
431
+ success: BooleanType;
432
+ }>>;
433
+ /**
434
+ * Run simulated annealing on a subset selection with bit-flip moves.
435
+ */
436
+ readonly optimizeSubset: import("@elaraai/east").PlatformDefinition<[ArrayType<BooleanType>, FunctionType<[ArrayType<BooleanType>], FloatType>, StructType<{
437
+ /** Starting temperature (default: 25000.0) */
438
+ t_max: OptionType<FloatType>;
439
+ /** Ending temperature (default: 2.5) */
440
+ t_min: OptionType<FloatType>;
441
+ /** Total iterations (default: 50000) */
442
+ steps: OptionType<IntegerType>;
443
+ /** Progress report frequency (default: 0 = silent) */
444
+ updates: OptionType<IntegerType>;
445
+ /** Minutes for auto-calibration (default: none) */
446
+ auto_schedule: OptionType<FloatType>;
447
+ /** Random seed for reproducibility */
448
+ random_state: OptionType<IntegerType>;
449
+ }>], StructType<{
450
+ /** Best state found */
451
+ best_state: VariantType<{
452
+ /** Integer array state (permutations, assignments) */
453
+ int_array: ArrayType<IntegerType>;
454
+ /** Boolean array state (subset selection) */
455
+ bool_array: ArrayType<BooleanType>;
456
+ }>;
457
+ /** Energy of best state */
458
+ best_energy: FloatType;
459
+ /** Actual iterations performed */
460
+ steps_taken: IntegerType;
461
+ /** Whether optimization completed successfully */
462
+ success: BooleanType;
463
+ }>>;
464
+ /**
465
+ * Type definitions for SimAnneal functions.
466
+ */
467
+ readonly Types: {
468
+ /** Discrete state type */
469
+ readonly DiscreteStateType: VariantType<{
470
+ /** Integer array state (permutations, assignments) */
471
+ int_array: ArrayType<IntegerType>;
472
+ /** Boolean array state (subset selection) */
473
+ bool_array: ArrayType<BooleanType>;
474
+ }>;
475
+ /** Energy function type */
476
+ readonly EnergyFunctionType: FunctionType<[VariantType<{
477
+ /** Integer array state (permutations, assignments) */
478
+ int_array: ArrayType<IntegerType>;
479
+ /** Boolean array state (subset selection) */
480
+ bool_array: ArrayType<BooleanType>;
481
+ }>], FloatType>;
482
+ /** Move function type */
483
+ readonly MoveFunctionType: FunctionType<[VariantType<{
484
+ /** Integer array state (permutations, assignments) */
485
+ int_array: ArrayType<IntegerType>;
486
+ /** Boolean array state (subset selection) */
487
+ bool_array: ArrayType<BooleanType>;
488
+ }>], VariantType<{
489
+ /** Integer array state (permutations, assignments) */
490
+ int_array: ArrayType<IntegerType>;
491
+ /** Boolean array state (subset selection) */
492
+ bool_array: ArrayType<BooleanType>;
493
+ }>>;
494
+ /** Permutation energy function type */
495
+ readonly PermutationEnergyType: FunctionType<[ArrayType<IntegerType>], FloatType>;
496
+ /** Subset energy function type */
497
+ readonly SubsetEnergyType: FunctionType<[ArrayType<BooleanType>], FloatType>;
498
+ /** Configuration type */
499
+ readonly ConfigType: StructType<{
500
+ /** Starting temperature (default: 25000.0) */
501
+ t_max: OptionType<FloatType>;
502
+ /** Ending temperature (default: 2.5) */
503
+ t_min: OptionType<FloatType>;
504
+ /** Total iterations (default: 50000) */
505
+ steps: OptionType<IntegerType>;
506
+ /** Progress report frequency (default: 0 = silent) */
507
+ updates: OptionType<IntegerType>;
508
+ /** Minutes for auto-calibration (default: none) */
509
+ auto_schedule: OptionType<FloatType>;
510
+ /** Random seed for reproducibility */
511
+ random_state: OptionType<IntegerType>;
512
+ }>;
513
+ /** Result type */
514
+ readonly ResultType: StructType<{
515
+ /** Best state found */
516
+ best_state: VariantType<{
517
+ /** Integer array state (permutations, assignments) */
518
+ int_array: ArrayType<IntegerType>;
519
+ /** Boolean array state (subset selection) */
520
+ bool_array: ArrayType<BooleanType>;
521
+ }>;
522
+ /** Energy of best state */
523
+ best_energy: FloatType;
524
+ /** Actual iterations performed */
525
+ steps_taken: IntegerType;
526
+ /** Whether optimization completed successfully */
527
+ success: BooleanType;
528
+ }>;
529
+ };
530
+ };
531
+ //# sourceMappingURL=simanneal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"simanneal.d.ts","sourceRoot":"","sources":["../../src/simanneal/simanneal.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;GAWG;AAEH,OAAO,EAEH,UAAU,EACV,WAAW,EACX,UAAU,EACV,SAAS,EACT,WAAW,EACX,SAAS,EACT,WAAW,EACX,YAAY,EACf,MAAM,eAAe,CAAC;AAMvB;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB;IAC1B,sDAAsD;;IAEtD,6CAA6C;;EAE/C,CAAC;AAMH;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB;IAhB3B,sDAAsD;;IAEtD,6CAA6C;;eAiBhD,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB;IA3BzB,sDAAsD;;IAEtD,6CAA6C;;;IAF7C,sDAAsD;;IAEtD,6CAA6C;;GA4BhD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,mDAGjC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,mDAG5B,CAAC;AAMF;;GAEG;AACH,eAAO,MAAM,gBAAgB;IACzB,8CAA8C;;IAE9C,wCAAwC;;IAExC,wCAAwC;;IAExC,sDAAsD;;IAEtD,mDAAmD;;IAEnD,sCAAsC;;EAExC,CAAC;AAMH;;GAEG;AACH,eAAO,MAAM,gBAAgB;IACzB,uBAAuB;;QAlFvB,sDAAsD;;QAEtD,6CAA6C;;;IAkF7C,2BAA2B;;IAE3B,kCAAkC;;IAElC,kDAAkD;;EAEpD,CAAC;AAMH;;;;;;;;;;GAUG;AACH,eAAO,MAAM,kBAAkB;IA3G3B,sDAAsD;;IAEtD,6CAA6C;;;IAF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