sleipnirgroup-jormungandr 0.2.1.dev11__cp312-abi3-manylinux_2_39_x86_64.whl

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.

Potentially problematic release.


This version of sleipnirgroup-jormungandr might be problematic. Click here for more details.

@@ -0,0 +1,2528 @@
1
+ from collections.abc import Callable, Iterator, Sequence
2
+ import enum
3
+ from typing import Annotated, overload
4
+
5
+ import numpy
6
+ from numpy.typing import NDArray
7
+ import scipy
8
+
9
+ import _jormungandr.optimization
10
+
11
+
12
+ class ExpressionType(enum.Enum):
13
+ """
14
+ Expression type.
15
+
16
+ Used for autodiff caching.
17
+ """
18
+
19
+ NONE = 0
20
+ """There is no expression."""
21
+
22
+ CONSTANT = 1
23
+ """The expression is a constant."""
24
+
25
+ LINEAR = 2
26
+ """The expression is composed of linear and lower-order operators."""
27
+
28
+ QUADRATIC = 3
29
+ """The expression is composed of quadratic and lower-order operators."""
30
+
31
+ NONLINEAR = 4
32
+ """The expression is composed of nonlinear and lower-order operators."""
33
+
34
+ class Variable:
35
+ """
36
+ An autodiff variable pointing to an expression node.
37
+
38
+ Template parameter ``Scalar_``:
39
+ Scalar type.
40
+ """
41
+
42
+ @overload
43
+ def __init__(self) -> None:
44
+ """Constructs a linear Variable with a value of zero."""
45
+
46
+ @overload
47
+ def __init__(self, value: float) -> None:
48
+ """Constructs an empty Variable."""
49
+
50
+ @overload
51
+ def __init__(self, value: int) -> None:
52
+ """Constructs an empty Variable."""
53
+
54
+ @overload
55
+ def __init__(self, arg: VariableMatrix, /) -> None: ...
56
+
57
+ @overload
58
+ def set_value(self, value: float) -> None:
59
+ """
60
+ Sets Variable's internal value.
61
+
62
+ Parameter ``value``:
63
+ The value of the Variable.
64
+ """
65
+
66
+ @overload
67
+ def set_value(self, value: float) -> None: ...
68
+
69
+ def value(self) -> float:
70
+ """
71
+ Returns the value of this variable.
72
+
73
+ Returns:
74
+ The value of this variable.
75
+ """
76
+
77
+ def type(self) -> ExpressionType:
78
+ """
79
+ Returns the type of this expression (constant, linear, quadratic, or
80
+ nonlinear).
81
+
82
+ Returns:
83
+ The type of this expression.
84
+ """
85
+
86
+ def __rmul__(self, lhs: float) -> Variable: ...
87
+
88
+ @overload
89
+ def __mul__(self, rhs: float) -> Variable: ...
90
+
91
+ @overload
92
+ def __mul__(self, rhs: Variable) -> Variable: ...
93
+
94
+ @overload
95
+ def __imul__(self, rhs: float) -> Variable:
96
+ """
97
+ Variable-Variable compound multiplication operator.
98
+
99
+ Parameter ``rhs``:
100
+ Operator right-hand side.
101
+
102
+ Returns:
103
+ Result of multiplication.
104
+ """
105
+
106
+ @overload
107
+ def __imul__(self, rhs: Variable) -> Variable: ...
108
+
109
+ def __rtruediv__(self, lhs: float) -> Variable: ...
110
+
111
+ @overload
112
+ def __truediv__(self, rhs: float) -> Variable: ...
113
+
114
+ @overload
115
+ def __truediv__(self, rhs: Variable) -> Variable: ...
116
+
117
+ @overload
118
+ def __itruediv__(self, rhs: float) -> Variable:
119
+ """
120
+ Variable-Variable compound division operator.
121
+
122
+ Parameter ``rhs``:
123
+ Operator right-hand side.
124
+
125
+ Returns:
126
+ Result of division.
127
+ """
128
+
129
+ @overload
130
+ def __itruediv__(self, rhs: Variable) -> Variable: ...
131
+
132
+ def __radd__(self, lhs: float) -> Variable: ...
133
+
134
+ @overload
135
+ def __add__(self, rhs: float) -> Variable: ...
136
+
137
+ @overload
138
+ def __add__(self, rhs: Variable) -> Variable: ...
139
+
140
+ @overload
141
+ def __iadd__(self, rhs: float) -> Variable:
142
+ """
143
+ Variable-Variable compound addition operator.
144
+
145
+ Parameter ``rhs``:
146
+ Operator right-hand side.
147
+
148
+ Returns:
149
+ Result of addition.
150
+ """
151
+
152
+ @overload
153
+ def __iadd__(self, rhs: Variable) -> Variable: ...
154
+
155
+ def __rsub__(self, lhs: float) -> Variable: ...
156
+
157
+ @overload
158
+ def __sub__(self, rhs: float) -> Variable: ...
159
+
160
+ @overload
161
+ def __sub__(self, rhs: Variable) -> Variable: ...
162
+
163
+ @overload
164
+ def __isub__(self, rhs: float) -> Variable:
165
+ """
166
+ Variable-Variable compound subtraction operator.
167
+
168
+ Parameter ``rhs``:
169
+ Operator right-hand side.
170
+
171
+ Returns:
172
+ Result of subtraction.
173
+ """
174
+
175
+ @overload
176
+ def __isub__(self, rhs: Variable) -> Variable: ...
177
+
178
+ def __pow__(self, power: int) -> Variable: ...
179
+
180
+ def __neg__(self) -> Variable: ...
181
+
182
+ def __pos__(self) -> Variable: ...
183
+
184
+ @overload
185
+ def __eq__(self, rhs: Variable) -> _jormungandr.optimization.EqualityConstraints:
186
+ """
187
+ Equality operator that returns an equality constraint for two
188
+ Variables.
189
+
190
+ Parameter ``lhs``:
191
+ Left-hand side.
192
+
193
+ Parameter ``rhs``:
194
+ Left-hand side.
195
+ """
196
+
197
+ @overload
198
+ def __eq__(self, rhs: float) -> _jormungandr.optimization.EqualityConstraints: ...
199
+
200
+ @overload
201
+ def __eq__(self, lhs: float) -> _jormungandr.optimization.EqualityConstraints: ...
202
+
203
+ @overload
204
+ def __lt__(self, rhs: Variable) -> _jormungandr.optimization.InequalityConstraints:
205
+ """
206
+ Less-than comparison operator that returns an inequality constraint
207
+ for two Variables.
208
+
209
+ Parameter ``lhs``:
210
+ Left-hand side.
211
+
212
+ Parameter ``rhs``:
213
+ Left-hand side.
214
+ """
215
+
216
+ @overload
217
+ def __lt__(self, rhs: float) -> _jormungandr.optimization.InequalityConstraints:
218
+ """
219
+ Less-than comparison operator that returns an inequality constraint
220
+ for two Variables.
221
+
222
+ Parameter ``lhs``:
223
+ Left-hand side.
224
+
225
+ Parameter ``rhs``:
226
+ Left-hand side.
227
+ """
228
+
229
+ @overload
230
+ def __lt__(self, lhs: float) -> _jormungandr.optimization.InequalityConstraints:
231
+ """
232
+ Greater-than comparison operator that returns an inequality constraint
233
+ for two Variables.
234
+
235
+ Parameter ``lhs``:
236
+ Left-hand side.
237
+
238
+ Parameter ``rhs``:
239
+ Left-hand side.
240
+ """
241
+
242
+ @overload
243
+ def __le__(self, rhs: Variable) -> _jormungandr.optimization.InequalityConstraints:
244
+ """
245
+ Less-than-or-equal-to comparison operator that returns an inequality
246
+ constraint for two Variables.
247
+
248
+ Parameter ``lhs``:
249
+ Left-hand side.
250
+
251
+ Parameter ``rhs``:
252
+ Left-hand side.
253
+ """
254
+
255
+ @overload
256
+ def __le__(self, rhs: float) -> _jormungandr.optimization.InequalityConstraints:
257
+ """
258
+ Less-than-or-equal-to comparison operator that returns an inequality
259
+ constraint for two Variables.
260
+
261
+ Parameter ``lhs``:
262
+ Left-hand side.
263
+
264
+ Parameter ``rhs``:
265
+ Left-hand side.
266
+ """
267
+
268
+ @overload
269
+ def __le__(self, lhs: float) -> _jormungandr.optimization.InequalityConstraints:
270
+ """
271
+ Greater-than-or-equal-to comparison operator that returns an
272
+ inequality constraint for two Variables.
273
+
274
+ Parameter ``lhs``:
275
+ Left-hand side.
276
+
277
+ Parameter ``rhs``:
278
+ Left-hand side.
279
+ """
280
+
281
+ @overload
282
+ def __gt__(self, rhs: Variable) -> _jormungandr.optimization.InequalityConstraints:
283
+ """
284
+ Greater-than comparison operator that returns an inequality constraint
285
+ for two Variables.
286
+
287
+ Parameter ``lhs``:
288
+ Left-hand side.
289
+
290
+ Parameter ``rhs``:
291
+ Left-hand side.
292
+ """
293
+
294
+ @overload
295
+ def __gt__(self, rhs: float) -> _jormungandr.optimization.InequalityConstraints:
296
+ """
297
+ Greater-than comparison operator that returns an inequality constraint
298
+ for two Variables.
299
+
300
+ Parameter ``lhs``:
301
+ Left-hand side.
302
+
303
+ Parameter ``rhs``:
304
+ Left-hand side.
305
+ """
306
+
307
+ @overload
308
+ def __gt__(self, lhs: float) -> _jormungandr.optimization.InequalityConstraints:
309
+ """
310
+ Less-than comparison operator that returns an inequality constraint
311
+ for two Variables.
312
+
313
+ Parameter ``lhs``:
314
+ Left-hand side.
315
+
316
+ Parameter ``rhs``:
317
+ Left-hand side.
318
+ """
319
+
320
+ @overload
321
+ def __ge__(self, rhs: Variable) -> _jormungandr.optimization.InequalityConstraints:
322
+ """
323
+ Greater-than-or-equal-to comparison operator that returns an
324
+ inequality constraint for two Variables.
325
+
326
+ Parameter ``lhs``:
327
+ Left-hand side.
328
+
329
+ Parameter ``rhs``:
330
+ Left-hand side.
331
+ """
332
+
333
+ @overload
334
+ def __ge__(self, rhs: float) -> _jormungandr.optimization.InequalityConstraints:
335
+ """
336
+ Greater-than-or-equal-to comparison operator that returns an
337
+ inequality constraint for two Variables.
338
+
339
+ Parameter ``lhs``:
340
+ Left-hand side.
341
+
342
+ Parameter ``rhs``:
343
+ Left-hand side.
344
+ """
345
+
346
+ @overload
347
+ def __ge__(self, lhs: float) -> _jormungandr.optimization.InequalityConstraints:
348
+ """
349
+ Less-than-or-equal-to comparison operator that returns an inequality
350
+ constraint for two Variables.
351
+
352
+ Parameter ``lhs``:
353
+ Left-hand side.
354
+
355
+ Parameter ``rhs``:
356
+ Left-hand side.
357
+ """
358
+
359
+ class VariableMatrix:
360
+ """
361
+ A matrix of autodiff variables.
362
+
363
+ Template parameter ``Scalar_``:
364
+ Scalar type.
365
+ """
366
+
367
+ @overload
368
+ def __init__(self) -> None:
369
+ """Constructs an empty VariableMatrix."""
370
+
371
+ @overload
372
+ def __init__(self, rows: int) -> None:
373
+ """
374
+ Constructs a zero-initialized VariableMatrix column vector with the
375
+ given rows.
376
+
377
+ Parameter ``rows``:
378
+ The number of matrix rows.
379
+ """
380
+
381
+ @overload
382
+ def __init__(self, rows: int, cols: int) -> None:
383
+ """
384
+ Constructs a zero-initialized VariableMatrix with the given
385
+ dimensions.
386
+
387
+ Parameter ``rows``:
388
+ The number of matrix rows.
389
+
390
+ Parameter ``cols``:
391
+ The number of matrix columns.
392
+ """
393
+
394
+ @overload
395
+ def __init__(self, list: Sequence[Sequence[Variable]]) -> None:
396
+ """
397
+ Constructs a scalar VariableMatrix from a nested list of Variables.
398
+
399
+ Parameter ``list``:
400
+ The nested list of Variables.
401
+ """
402
+
403
+ @overload
404
+ def __init__(self, list: Sequence[Sequence[float]]) -> None:
405
+ """
406
+ Constructs a scalar VariableMatrix from a nested list of scalars.
407
+
408
+ This overload is for Python bindings only.
409
+
410
+ Parameter ``list``:
411
+ The nested list of Variables.
412
+ """
413
+
414
+ @overload
415
+ def __init__(self, values: Annotated[NDArray[numpy.float64], dict(shape=(None, None))]) -> None:
416
+ """
417
+ Constructs a VariableMatrix from an Eigen matrix.
418
+
419
+ Parameter ``values``:
420
+ Eigen matrix of values.
421
+ """
422
+
423
+ @overload
424
+ def __init__(self, values: Annotated[NDArray[numpy.float32], dict(shape=(None, None))]) -> None:
425
+ """
426
+ Constructs a VariableMatrix from an Eigen matrix.
427
+
428
+ Parameter ``values``:
429
+ Eigen matrix of values.
430
+ """
431
+
432
+ @overload
433
+ def __init__(self, variable: Variable) -> None:
434
+ """
435
+ Constructs a scalar VariableMatrix from a Variable.
436
+
437
+ Parameter ``variable``:
438
+ Variable.
439
+ """
440
+
441
+ @overload
442
+ def __init__(self, values: VariableBlock) -> None:
443
+ """
444
+ Constructs a VariableMatrix from a VariableBlock.
445
+
446
+ Parameter ``values``:
447
+ VariableBlock of values.
448
+ """
449
+
450
+ @overload
451
+ def __init__(self, arg: VariableBlock, /) -> None: ...
452
+
453
+ @overload
454
+ def set_value(self, values: Annotated[NDArray[numpy.float64], dict(shape=(None, None))]) -> None:
455
+ """
456
+ Sets the VariableMatrix's internal values.
457
+
458
+ Parameter ``values``:
459
+ Eigen matrix of values.
460
+ """
461
+
462
+ @overload
463
+ def set_value(self, values: Annotated[NDArray[numpy.float32], dict(shape=(None, None))]) -> None: ...
464
+
465
+ @overload
466
+ def set_value(self, values: Annotated[NDArray[numpy.int64], dict(shape=(None, None))]) -> None: ...
467
+
468
+ @overload
469
+ def set_value(self, values: Annotated[NDArray[numpy.int32], dict(shape=(None, None))]) -> None: ...
470
+
471
+ @overload
472
+ def __setitem__(self, row: int, value: Variable) -> Variable: ...
473
+
474
+ @overload
475
+ def __setitem__(self, slices: tuple, value: object) -> None: ...
476
+
477
+ @overload
478
+ def __getitem__(self, row: int) -> Variable:
479
+ """
480
+ Returns the element at the given index.
481
+
482
+ Parameter ``index``:
483
+ The index.
484
+
485
+ Returns:
486
+ The element at the given index.
487
+ """
488
+
489
+ @overload
490
+ def __getitem__(self, slices: tuple) -> object:
491
+ """
492
+ Returns the element at the given row and column.
493
+
494
+ Parameter ``row``:
495
+ The row.
496
+
497
+ Parameter ``col``:
498
+ The column.
499
+
500
+ Returns:
501
+ The element at the given row and column.
502
+ """
503
+
504
+ def row(self, row: int) -> VariableBlock:
505
+ """
506
+ Returns a row slice of the variable matrix.
507
+
508
+ Parameter ``row``:
509
+ The row to slice.
510
+
511
+ Returns:
512
+ A row slice of the variable matrix.
513
+ """
514
+
515
+ def col(self, col: int) -> VariableBlock:
516
+ """
517
+ Returns a column slice of the variable matrix.
518
+
519
+ Parameter ``col``:
520
+ The column to slice.
521
+
522
+ Returns:
523
+ A column slice of the variable matrix.
524
+ """
525
+
526
+ @overload
527
+ def __mul__(self, rhs: VariableMatrix) -> VariableMatrix: ...
528
+
529
+ @overload
530
+ def __mul__(self, rhs: VariableBlock) -> VariableMatrix: ...
531
+
532
+ @overload
533
+ def __mul__(self, rhs: VariableMatrix) -> VariableMatrix: ...
534
+
535
+ @overload
536
+ def __mul__(self, rhs: VariableBlock) -> VariableMatrix: ...
537
+
538
+ @overload
539
+ def __mul__(self, rhs: Variable) -> VariableMatrix: ...
540
+
541
+ @overload
542
+ def __mul__(self, rhs: float) -> VariableMatrix: ...
543
+
544
+ @overload
545
+ def __mul__(self, rhs: VariableBlock) -> VariableMatrix: ...
546
+
547
+ @overload
548
+ def __rmul__(self, lhs: VariableMatrix) -> VariableMatrix: ...
549
+
550
+ @overload
551
+ def __rmul__(self, lhs: VariableBlock) -> VariableMatrix: ...
552
+
553
+ @overload
554
+ def __rmul__(self, lhs: VariableMatrix) -> VariableMatrix: ...
555
+
556
+ @overload
557
+ def __rmul__(self, lhs: VariableBlock) -> VariableMatrix: ...
558
+
559
+ @overload
560
+ def __rmul__(self, lhs: Variable) -> VariableMatrix: ...
561
+
562
+ @overload
563
+ def __rmul__(self, lhs: float) -> VariableMatrix: ...
564
+
565
+ @overload
566
+ def __rmul__(self, rhs: VariableBlock) -> VariableMatrix: ...
567
+
568
+ @overload
569
+ def __matmul__(self, rhs: VariableMatrix) -> VariableMatrix: ...
570
+
571
+ @overload
572
+ def __matmul__(self, rhs: VariableBlock) -> VariableMatrix: ...
573
+
574
+ @overload
575
+ def __matmul__(self, rhs: VariableMatrix) -> VariableMatrix: ...
576
+
577
+ @overload
578
+ def __matmul__(self, rhs: VariableBlock) -> VariableMatrix: ...
579
+
580
+ @overload
581
+ def __matmul__(self, rhs: VariableBlock) -> VariableMatrix: ...
582
+
583
+ def __array_ufunc__(self, ufunc: object, method: str, *inputs, **kwargs) -> object: ...
584
+
585
+ @overload
586
+ def __truediv__(self, rhs: Variable) -> VariableMatrix: ...
587
+
588
+ @overload
589
+ def __truediv__(self, rhs: float) -> VariableMatrix: ...
590
+
591
+ @overload
592
+ def __itruediv__(self, rhs: Variable) -> VariableMatrix: ...
593
+
594
+ @overload
595
+ def __itruediv__(self, rhs: float) -> VariableMatrix: ...
596
+
597
+ @overload
598
+ def __add__(self, rhs: VariableMatrix) -> VariableMatrix: ...
599
+
600
+ @overload
601
+ def __add__(self, rhs: Variable) -> VariableMatrix: ...
602
+
603
+ @overload
604
+ def __add__(self, rhs: VariableMatrix) -> VariableMatrix: ...
605
+
606
+ @overload
607
+ def __add__(self, rhs: Annotated[NDArray[numpy.float64], dict(shape=(None, None))]) -> VariableMatrix: ...
608
+
609
+ @overload
610
+ def __add__(self, rhs: VariableBlock) -> VariableMatrix: ...
611
+
612
+ @overload
613
+ def __radd__(self, lhs: Variable) -> VariableMatrix: ...
614
+
615
+ @overload
616
+ def __radd__(self, lhs: float) -> VariableMatrix: ...
617
+
618
+ @overload
619
+ def __radd__(self, lhs: Annotated[NDArray[numpy.float64], dict(shape=(None, None))]) -> VariableMatrix: ...
620
+
621
+ @overload
622
+ def __sub__(self, rhs: VariableMatrix) -> VariableMatrix: ...
623
+
624
+ @overload
625
+ def __sub__(self, rhs: Variable) -> VariableMatrix: ...
626
+
627
+ @overload
628
+ def __sub__(self, rhs: Annotated[NDArray[numpy.float64], dict(shape=(None, None))]) -> VariableMatrix: ...
629
+
630
+ @overload
631
+ def __sub__(self, rhs: VariableBlock) -> VariableMatrix: ...
632
+
633
+ @overload
634
+ def __rsub__(self, lhs: Variable) -> VariableMatrix: ...
635
+
636
+ @overload
637
+ def __rsub__(self, lhs: Annotated[NDArray[numpy.float64], dict(shape=(None, None))]) -> VariableMatrix: ...
638
+
639
+ def __neg__(self) -> VariableMatrix: ...
640
+
641
+ def __pow__(self, power: int) -> VariableMatrix: ...
642
+
643
+ @property
644
+ def T(self) -> VariableMatrix:
645
+ """
646
+ Returns the transpose of the variable matrix.
647
+
648
+ Returns:
649
+ The transpose of the variable matrix.
650
+ """
651
+
652
+ def rows(self) -> int:
653
+ """
654
+ Returns the number of rows in the matrix.
655
+
656
+ Returns:
657
+ The number of rows in the matrix.
658
+ """
659
+
660
+ def cols(self) -> int:
661
+ """
662
+ Returns the number of columns in the matrix.
663
+
664
+ Returns:
665
+ The number of columns in the matrix.
666
+ """
667
+
668
+ @property
669
+ def shape(self) -> tuple: ...
670
+
671
+ @overload
672
+ def value(self, row: int, col: int) -> float:
673
+ """
674
+ Returns an element of the variable matrix.
675
+
676
+ Parameter ``row``:
677
+ The row of the element to return.
678
+
679
+ Parameter ``col``:
680
+ The column of the element to return.
681
+
682
+ Returns:
683
+ An element of the variable matrix.
684
+ """
685
+
686
+ @overload
687
+ def value(self, index: int) -> float:
688
+ """
689
+ Returns an element of the variable matrix.
690
+
691
+ Parameter ``index``:
692
+ The index of the element to return.
693
+
694
+ Returns:
695
+ An element of the variable matrix.
696
+ """
697
+
698
+ @overload
699
+ def value(self) -> Annotated[NDArray[numpy.float64], dict(shape=(None, None), order='F')]:
700
+ """
701
+ Returns the contents of the variable matrix.
702
+
703
+ Returns:
704
+ The contents of the variable matrix.
705
+ """
706
+
707
+ def cwise_map(self, func: Callable[[Variable], Variable]) -> VariableMatrix:
708
+ """
709
+ Transforms the matrix coefficient-wise with an unary operator.
710
+
711
+ Parameter ``unary_op``:
712
+ The unary operator to use for the transform operation.
713
+
714
+ Returns:
715
+ Result of the unary operator.
716
+ """
717
+
718
+ @staticmethod
719
+ def zero(rows: int, cols: int) -> VariableMatrix:
720
+ """
721
+ Returns a variable matrix filled with zeroes.
722
+
723
+ Parameter ``rows``:
724
+ The number of matrix rows.
725
+
726
+ Parameter ``cols``:
727
+ The number of matrix columns.
728
+
729
+ Returns:
730
+ A variable matrix filled with zeroes.
731
+ """
732
+
733
+ @staticmethod
734
+ def ones(rows: int, cols: int) -> VariableMatrix:
735
+ """
736
+ Returns a variable matrix filled with ones.
737
+
738
+ Parameter ``rows``:
739
+ The number of matrix rows.
740
+
741
+ Parameter ``cols``:
742
+ The number of matrix columns.
743
+
744
+ Returns:
745
+ A variable matrix filled with ones.
746
+ """
747
+
748
+ @overload
749
+ def __eq__(self, rhs: VariableMatrix) -> _jormungandr.optimization.EqualityConstraints:
750
+ """
751
+ Equality operator that returns an equality constraint for two
752
+ Variables.
753
+
754
+ Parameter ``lhs``:
755
+ Left-hand side.
756
+
757
+ Parameter ``rhs``:
758
+ Left-hand side.
759
+ """
760
+
761
+ @overload
762
+ def __eq__(self, rhs: Variable) -> _jormungandr.optimization.EqualityConstraints: ...
763
+
764
+ @overload
765
+ def __eq__(self, rhs: float) -> _jormungandr.optimization.EqualityConstraints: ...
766
+
767
+ @overload
768
+ def __eq__(self, rhs: int) -> _jormungandr.optimization.EqualityConstraints: ...
769
+
770
+ @overload
771
+ def __eq__(self, lhs: Variable) -> _jormungandr.optimization.EqualityConstraints: ...
772
+
773
+ @overload
774
+ def __eq__(self, lhs: float) -> _jormungandr.optimization.EqualityConstraints: ...
775
+
776
+ @overload
777
+ def __eq__(self, lhs: int) -> _jormungandr.optimization.EqualityConstraints: ...
778
+
779
+ @overload
780
+ def __eq__(self, rhs: VariableBlock) -> _jormungandr.optimization.EqualityConstraints: ...
781
+
782
+ @overload
783
+ def __eq__(self, rhs: Annotated[NDArray[numpy.float64], dict(shape=(None, None))]) -> _jormungandr.optimization.EqualityConstraints: ...
784
+
785
+ @overload
786
+ def __lt__(self, rhs: VariableMatrix) -> _jormungandr.optimization.InequalityConstraints:
787
+ """
788
+ Less-than comparison operator that returns an inequality constraint
789
+ for two Variables.
790
+
791
+ Parameter ``lhs``:
792
+ Left-hand side.
793
+
794
+ Parameter ``rhs``:
795
+ Left-hand side.
796
+ """
797
+
798
+ @overload
799
+ def __lt__(self, rhs: Variable) -> _jormungandr.optimization.InequalityConstraints:
800
+ """
801
+ Less-than comparison operator that returns an inequality constraint
802
+ for two Variables.
803
+
804
+ Parameter ``lhs``:
805
+ Left-hand side.
806
+
807
+ Parameter ``rhs``:
808
+ Left-hand side.
809
+ """
810
+
811
+ @overload
812
+ def __lt__(self, rhs: float) -> _jormungandr.optimization.InequalityConstraints:
813
+ """
814
+ Less-than comparison operator that returns an inequality constraint
815
+ for two Variables.
816
+
817
+ Parameter ``lhs``:
818
+ Left-hand side.
819
+
820
+ Parameter ``rhs``:
821
+ Left-hand side.
822
+ """
823
+
824
+ @overload
825
+ def __lt__(self, rhs: int) -> _jormungandr.optimization.InequalityConstraints:
826
+ """
827
+ Less-than comparison operator that returns an inequality constraint
828
+ for two Variables.
829
+
830
+ Parameter ``lhs``:
831
+ Left-hand side.
832
+
833
+ Parameter ``rhs``:
834
+ Left-hand side.
835
+ """
836
+
837
+ @overload
838
+ def __lt__(self, lhs: Variable) -> _jormungandr.optimization.InequalityConstraints:
839
+ """
840
+ Greater-than comparison operator that returns an inequality constraint
841
+ for two Variables.
842
+
843
+ Parameter ``lhs``:
844
+ Left-hand side.
845
+
846
+ Parameter ``rhs``:
847
+ Left-hand side.
848
+ """
849
+
850
+ @overload
851
+ def __lt__(self, lhs: float) -> _jormungandr.optimization.InequalityConstraints:
852
+ """
853
+ Greater-than comparison operator that returns an inequality constraint
854
+ for two Variables.
855
+
856
+ Parameter ``lhs``:
857
+ Left-hand side.
858
+
859
+ Parameter ``rhs``:
860
+ Left-hand side.
861
+ """
862
+
863
+ @overload
864
+ def __lt__(self, lhs: int) -> _jormungandr.optimization.InequalityConstraints:
865
+ """
866
+ Greater-than comparison operator that returns an inequality constraint
867
+ for two Variables.
868
+
869
+ Parameter ``lhs``:
870
+ Left-hand side.
871
+
872
+ Parameter ``rhs``:
873
+ Left-hand side.
874
+ """
875
+
876
+ @overload
877
+ def __lt__(self, rhs: VariableBlock) -> _jormungandr.optimization.InequalityConstraints:
878
+ """
879
+ Less-than comparison operator that returns an inequality constraint
880
+ for two Variables.
881
+
882
+ Parameter ``lhs``:
883
+ Left-hand side.
884
+
885
+ Parameter ``rhs``:
886
+ Left-hand side.
887
+ """
888
+
889
+ @overload
890
+ def __lt__(self, rhs: Annotated[NDArray[numpy.float64], dict(shape=(None, None))]) -> _jormungandr.optimization.InequalityConstraints:
891
+ """
892
+ Less-than comparison operator that returns an inequality constraint
893
+ for two Variables.
894
+
895
+ Parameter ``lhs``:
896
+ Left-hand side.
897
+
898
+ Parameter ``rhs``:
899
+ Left-hand side.
900
+ """
901
+
902
+ @overload
903
+ def __gt__(self, lhs: Variable) -> _jormungandr.optimization.InequalityConstraints:
904
+ """
905
+ Less-than comparison operator that returns an inequality constraint
906
+ for two Variables.
907
+
908
+ Parameter ``lhs``:
909
+ Left-hand side.
910
+
911
+ Parameter ``rhs``:
912
+ Left-hand side.
913
+ """
914
+
915
+ @overload
916
+ def __gt__(self, lhs: float) -> _jormungandr.optimization.InequalityConstraints:
917
+ """
918
+ Less-than comparison operator that returns an inequality constraint
919
+ for two Variables.
920
+
921
+ Parameter ``lhs``:
922
+ Left-hand side.
923
+
924
+ Parameter ``rhs``:
925
+ Left-hand side.
926
+ """
927
+
928
+ @overload
929
+ def __gt__(self, lhs: int) -> _jormungandr.optimization.InequalityConstraints:
930
+ """
931
+ Less-than comparison operator that returns an inequality constraint
932
+ for two Variables.
933
+
934
+ Parameter ``lhs``:
935
+ Left-hand side.
936
+
937
+ Parameter ``rhs``:
938
+ Left-hand side.
939
+ """
940
+
941
+ @overload
942
+ def __gt__(self, rhs: VariableMatrix) -> _jormungandr.optimization.InequalityConstraints:
943
+ """
944
+ Greater-than comparison operator that returns an inequality constraint
945
+ for two Variables.
946
+
947
+ Parameter ``lhs``:
948
+ Left-hand side.
949
+
950
+ Parameter ``rhs``:
951
+ Left-hand side.
952
+ """
953
+
954
+ @overload
955
+ def __gt__(self, rhs: Variable) -> _jormungandr.optimization.InequalityConstraints:
956
+ """
957
+ Greater-than comparison operator that returns an inequality constraint
958
+ for two Variables.
959
+
960
+ Parameter ``lhs``:
961
+ Left-hand side.
962
+
963
+ Parameter ``rhs``:
964
+ Left-hand side.
965
+ """
966
+
967
+ @overload
968
+ def __gt__(self, rhs: float) -> _jormungandr.optimization.InequalityConstraints:
969
+ """
970
+ Greater-than comparison operator that returns an inequality constraint
971
+ for two Variables.
972
+
973
+ Parameter ``lhs``:
974
+ Left-hand side.
975
+
976
+ Parameter ``rhs``:
977
+ Left-hand side.
978
+ """
979
+
980
+ @overload
981
+ def __gt__(self, rhs: int) -> _jormungandr.optimization.InequalityConstraints:
982
+ """
983
+ Greater-than comparison operator that returns an inequality constraint
984
+ for two Variables.
985
+
986
+ Parameter ``lhs``:
987
+ Left-hand side.
988
+
989
+ Parameter ``rhs``:
990
+ Left-hand side.
991
+ """
992
+
993
+ @overload
994
+ def __gt__(self, rhs: VariableBlock) -> _jormungandr.optimization.InequalityConstraints:
995
+ """
996
+ Greater-than comparison operator that returns an inequality constraint
997
+ for two Variables.
998
+
999
+ Parameter ``lhs``:
1000
+ Left-hand side.
1001
+
1002
+ Parameter ``rhs``:
1003
+ Left-hand side.
1004
+ """
1005
+
1006
+ @overload
1007
+ def __gt__(self, rhs: Annotated[NDArray[numpy.float64], dict(shape=(None, None))]) -> _jormungandr.optimization.InequalityConstraints:
1008
+ """
1009
+ Greater-than comparison operator that returns an inequality constraint
1010
+ for two Variables.
1011
+
1012
+ Parameter ``lhs``:
1013
+ Left-hand side.
1014
+
1015
+ Parameter ``rhs``:
1016
+ Left-hand side.
1017
+ """
1018
+
1019
+ @overload
1020
+ def __le__(self, rhs: VariableMatrix) -> _jormungandr.optimization.InequalityConstraints:
1021
+ """
1022
+ Less-than-or-equal-to comparison operator that returns an inequality
1023
+ constraint for two Variables.
1024
+
1025
+ Parameter ``lhs``:
1026
+ Left-hand side.
1027
+
1028
+ Parameter ``rhs``:
1029
+ Left-hand side.
1030
+ """
1031
+
1032
+ @overload
1033
+ def __le__(self, rhs: Variable) -> _jormungandr.optimization.InequalityConstraints:
1034
+ """
1035
+ Less-than-or-equal-to comparison operator that returns an inequality
1036
+ constraint for two Variables.
1037
+
1038
+ Parameter ``lhs``:
1039
+ Left-hand side.
1040
+
1041
+ Parameter ``rhs``:
1042
+ Left-hand side.
1043
+ """
1044
+
1045
+ @overload
1046
+ def __le__(self, rhs: float) -> _jormungandr.optimization.InequalityConstraints:
1047
+ """
1048
+ Less-than-or-equal-to comparison operator that returns an inequality
1049
+ constraint for two Variables.
1050
+
1051
+ Parameter ``lhs``:
1052
+ Left-hand side.
1053
+
1054
+ Parameter ``rhs``:
1055
+ Left-hand side.
1056
+ """
1057
+
1058
+ @overload
1059
+ def __le__(self, rhs: int) -> _jormungandr.optimization.InequalityConstraints:
1060
+ """
1061
+ Less-than-or-equal-to comparison operator that returns an inequality
1062
+ constraint for two Variables.
1063
+
1064
+ Parameter ``lhs``:
1065
+ Left-hand side.
1066
+
1067
+ Parameter ``rhs``:
1068
+ Left-hand side.
1069
+ """
1070
+
1071
+ @overload
1072
+ def __le__(self, lhs: Variable) -> _jormungandr.optimization.InequalityConstraints:
1073
+ """
1074
+ Greater-than-or-equal-to comparison operator that returns an
1075
+ inequality constraint for two Variables.
1076
+
1077
+ Parameter ``lhs``:
1078
+ Left-hand side.
1079
+
1080
+ Parameter ``rhs``:
1081
+ Left-hand side.
1082
+ """
1083
+
1084
+ @overload
1085
+ def __le__(self, lhs: float) -> _jormungandr.optimization.InequalityConstraints:
1086
+ """
1087
+ Greater-than-or-equal-to comparison operator that returns an
1088
+ inequality constraint for two Variables.
1089
+
1090
+ Parameter ``lhs``:
1091
+ Left-hand side.
1092
+
1093
+ Parameter ``rhs``:
1094
+ Left-hand side.
1095
+ """
1096
+
1097
+ @overload
1098
+ def __le__(self, lhs: int) -> _jormungandr.optimization.InequalityConstraints:
1099
+ """
1100
+ Greater-than-or-equal-to comparison operator that returns an
1101
+ inequality constraint for two Variables.
1102
+
1103
+ Parameter ``lhs``:
1104
+ Left-hand side.
1105
+
1106
+ Parameter ``rhs``:
1107
+ Left-hand side.
1108
+ """
1109
+
1110
+ @overload
1111
+ def __le__(self, rhs: VariableBlock) -> _jormungandr.optimization.InequalityConstraints:
1112
+ """
1113
+ Less-than-or-equal-to comparison operator that returns an inequality
1114
+ constraint for two Variables.
1115
+
1116
+ Parameter ``lhs``:
1117
+ Left-hand side.
1118
+
1119
+ Parameter ``rhs``:
1120
+ Left-hand side.
1121
+ """
1122
+
1123
+ @overload
1124
+ def __le__(self, rhs: Annotated[NDArray[numpy.float64], dict(shape=(None, None))]) -> _jormungandr.optimization.InequalityConstraints:
1125
+ """
1126
+ Less-than-or-equal-to comparison operator that returns an inequality
1127
+ constraint for two Variables.
1128
+
1129
+ Parameter ``lhs``:
1130
+ Left-hand side.
1131
+
1132
+ Parameter ``rhs``:
1133
+ Left-hand side.
1134
+ """
1135
+
1136
+ @overload
1137
+ def __ge__(self, lhs: Variable) -> _jormungandr.optimization.InequalityConstraints:
1138
+ """
1139
+ Less-than-or-equal-to comparison operator that returns an inequality
1140
+ constraint for two Variables.
1141
+
1142
+ Parameter ``lhs``:
1143
+ Left-hand side.
1144
+
1145
+ Parameter ``rhs``:
1146
+ Left-hand side.
1147
+ """
1148
+
1149
+ @overload
1150
+ def __ge__(self, lhs: float) -> _jormungandr.optimization.InequalityConstraints:
1151
+ """
1152
+ Less-than-or-equal-to comparison operator that returns an inequality
1153
+ constraint for two Variables.
1154
+
1155
+ Parameter ``lhs``:
1156
+ Left-hand side.
1157
+
1158
+ Parameter ``rhs``:
1159
+ Left-hand side.
1160
+ """
1161
+
1162
+ @overload
1163
+ def __ge__(self, lhs: int) -> _jormungandr.optimization.InequalityConstraints:
1164
+ """
1165
+ Less-than-or-equal-to comparison operator that returns an inequality
1166
+ constraint for two Variables.
1167
+
1168
+ Parameter ``lhs``:
1169
+ Left-hand side.
1170
+
1171
+ Parameter ``rhs``:
1172
+ Left-hand side.
1173
+ """
1174
+
1175
+ @overload
1176
+ def __ge__(self, rhs: VariableMatrix) -> _jormungandr.optimization.InequalityConstraints:
1177
+ """
1178
+ Greater-than-or-equal-to comparison operator that returns an
1179
+ inequality constraint for two Variables.
1180
+
1181
+ Parameter ``lhs``:
1182
+ Left-hand side.
1183
+
1184
+ Parameter ``rhs``:
1185
+ Left-hand side.
1186
+ """
1187
+
1188
+ @overload
1189
+ def __ge__(self, rhs: Variable) -> _jormungandr.optimization.InequalityConstraints:
1190
+ """
1191
+ Greater-than-or-equal-to comparison operator that returns an
1192
+ inequality constraint for two Variables.
1193
+
1194
+ Parameter ``lhs``:
1195
+ Left-hand side.
1196
+
1197
+ Parameter ``rhs``:
1198
+ Left-hand side.
1199
+ """
1200
+
1201
+ @overload
1202
+ def __ge__(self, rhs: float) -> _jormungandr.optimization.InequalityConstraints:
1203
+ """
1204
+ Greater-than-or-equal-to comparison operator that returns an
1205
+ inequality constraint for two Variables.
1206
+
1207
+ Parameter ``lhs``:
1208
+ Left-hand side.
1209
+
1210
+ Parameter ``rhs``:
1211
+ Left-hand side.
1212
+ """
1213
+
1214
+ @overload
1215
+ def __ge__(self, rhs: int) -> _jormungandr.optimization.InequalityConstraints:
1216
+ """
1217
+ Greater-than-or-equal-to comparison operator that returns an
1218
+ inequality constraint for two Variables.
1219
+
1220
+ Parameter ``lhs``:
1221
+ Left-hand side.
1222
+
1223
+ Parameter ``rhs``:
1224
+ Left-hand side.
1225
+ """
1226
+
1227
+ @overload
1228
+ def __ge__(self, rhs: VariableBlock) -> _jormungandr.optimization.InequalityConstraints:
1229
+ """
1230
+ Greater-than-or-equal-to comparison operator that returns an
1231
+ inequality constraint for two Variables.
1232
+
1233
+ Parameter ``lhs``:
1234
+ Left-hand side.
1235
+
1236
+ Parameter ``rhs``:
1237
+ Left-hand side.
1238
+ """
1239
+
1240
+ @overload
1241
+ def __ge__(self, rhs: Annotated[NDArray[numpy.float64], dict(shape=(None, None))]) -> _jormungandr.optimization.InequalityConstraints:
1242
+ """
1243
+ Greater-than-or-equal-to comparison operator that returns an
1244
+ inequality constraint for two Variables.
1245
+
1246
+ Parameter ``lhs``:
1247
+ Left-hand side.
1248
+
1249
+ Parameter ``rhs``:
1250
+ Left-hand side.
1251
+ """
1252
+
1253
+ def __len__(self) -> int:
1254
+ """
1255
+ Returns the number of rows in the matrix.
1256
+
1257
+ Returns:
1258
+ The number of rows in the matrix.
1259
+ """
1260
+
1261
+ def __iter__(self) -> Iterator[Variable]: ...
1262
+
1263
+ class VariableBlock:
1264
+ """
1265
+ A submatrix of autodiff variables with reference semantics.
1266
+
1267
+ Template parameter ``Mat``:
1268
+ The type of the matrix whose storage this class points to.
1269
+ """
1270
+
1271
+ @overload
1272
+ def __mul__(self, rhs: VariableMatrix) -> VariableMatrix: ...
1273
+
1274
+ @overload
1275
+ def __mul__(self, rhs: Variable) -> VariableMatrix: ...
1276
+
1277
+ @overload
1278
+ def __mul__(self, rhs: float) -> VariableMatrix: ...
1279
+
1280
+ @overload
1281
+ def __add__(self, rhs: VariableMatrix) -> VariableMatrix: ...
1282
+
1283
+ @overload
1284
+ def __add__(self, rhs: VariableBlock) -> VariableMatrix: ...
1285
+
1286
+ @overload
1287
+ def __add__(self, rhs: Annotated[NDArray[numpy.float64], dict(shape=(None, None))]) -> VariableMatrix: ...
1288
+
1289
+ @overload
1290
+ def __add__(self, rhs: VariableBlock) -> VariableMatrix: ...
1291
+
1292
+ @overload
1293
+ def __sub__(self, rhs: VariableMatrix) -> VariableMatrix: ...
1294
+
1295
+ @overload
1296
+ def __sub__(self, rhs: VariableBlock) -> VariableMatrix: ...
1297
+
1298
+ @overload
1299
+ def __sub__(self, rhs: Annotated[NDArray[numpy.float64], dict(shape=(None, None))]) -> VariableMatrix: ...
1300
+
1301
+ @overload
1302
+ def __sub__(self, rhs: VariableBlock) -> VariableMatrix: ...
1303
+
1304
+ @overload
1305
+ def __eq__(self, rhs: VariableMatrix) -> _jormungandr.optimization.EqualityConstraints:
1306
+ """
1307
+ Equality operator that returns an equality constraint for two
1308
+ Variables.
1309
+
1310
+ Parameter ``lhs``:
1311
+ Left-hand side.
1312
+
1313
+ Parameter ``rhs``:
1314
+ Left-hand side.
1315
+ """
1316
+
1317
+ @overload
1318
+ def __eq__(self, rhs: VariableBlock) -> _jormungandr.optimization.EqualityConstraints: ...
1319
+
1320
+ @overload
1321
+ def __eq__(self, rhs: Variable) -> _jormungandr.optimization.EqualityConstraints: ...
1322
+
1323
+ @overload
1324
+ def __eq__(self, rhs: float) -> _jormungandr.optimization.EqualityConstraints: ...
1325
+
1326
+ @overload
1327
+ def __eq__(self, rhs: int) -> _jormungandr.optimization.EqualityConstraints: ...
1328
+
1329
+ @overload
1330
+ def __eq__(self, lhs: Variable) -> _jormungandr.optimization.EqualityConstraints: ...
1331
+
1332
+ @overload
1333
+ def __eq__(self, lhs: float) -> _jormungandr.optimization.EqualityConstraints: ...
1334
+
1335
+ @overload
1336
+ def __eq__(self, lhs: int) -> _jormungandr.optimization.EqualityConstraints: ...
1337
+
1338
+ @overload
1339
+ def __eq__(self, rhs: Annotated[NDArray[numpy.float64], dict(shape=(None, None))]) -> _jormungandr.optimization.EqualityConstraints: ...
1340
+
1341
+ @overload
1342
+ def __lt__(self, rhs: VariableMatrix) -> _jormungandr.optimization.InequalityConstraints:
1343
+ """
1344
+ Less-than comparison operator that returns an inequality constraint
1345
+ for two Variables.
1346
+
1347
+ Parameter ``lhs``:
1348
+ Left-hand side.
1349
+
1350
+ Parameter ``rhs``:
1351
+ Left-hand side.
1352
+ """
1353
+
1354
+ @overload
1355
+ def __lt__(self, rhs: VariableBlock) -> _jormungandr.optimization.InequalityConstraints:
1356
+ """
1357
+ Less-than comparison operator that returns an inequality constraint
1358
+ for two Variables.
1359
+
1360
+ Parameter ``lhs``:
1361
+ Left-hand side.
1362
+
1363
+ Parameter ``rhs``:
1364
+ Left-hand side.
1365
+ """
1366
+
1367
+ @overload
1368
+ def __lt__(self, rhs: Variable) -> _jormungandr.optimization.InequalityConstraints:
1369
+ """
1370
+ Less-than comparison operator that returns an inequality constraint
1371
+ for two Variables.
1372
+
1373
+ Parameter ``lhs``:
1374
+ Left-hand side.
1375
+
1376
+ Parameter ``rhs``:
1377
+ Left-hand side.
1378
+ """
1379
+
1380
+ @overload
1381
+ def __lt__(self, rhs: float) -> _jormungandr.optimization.InequalityConstraints:
1382
+ """
1383
+ Less-than comparison operator that returns an inequality constraint
1384
+ for two Variables.
1385
+
1386
+ Parameter ``lhs``:
1387
+ Left-hand side.
1388
+
1389
+ Parameter ``rhs``:
1390
+ Left-hand side.
1391
+ """
1392
+
1393
+ @overload
1394
+ def __lt__(self, rhs: int) -> _jormungandr.optimization.InequalityConstraints:
1395
+ """
1396
+ Less-than comparison operator that returns an inequality constraint
1397
+ for two Variables.
1398
+
1399
+ Parameter ``lhs``:
1400
+ Left-hand side.
1401
+
1402
+ Parameter ``rhs``:
1403
+ Left-hand side.
1404
+ """
1405
+
1406
+ @overload
1407
+ def __lt__(self, lhs: Variable) -> _jormungandr.optimization.InequalityConstraints:
1408
+ """
1409
+ Greater-than comparison operator that returns an inequality constraint
1410
+ for two Variables.
1411
+
1412
+ Parameter ``lhs``:
1413
+ Left-hand side.
1414
+
1415
+ Parameter ``rhs``:
1416
+ Left-hand side.
1417
+ """
1418
+
1419
+ @overload
1420
+ def __lt__(self, lhs: float) -> _jormungandr.optimization.InequalityConstraints:
1421
+ """
1422
+ Greater-than comparison operator that returns an inequality constraint
1423
+ for two Variables.
1424
+
1425
+ Parameter ``lhs``:
1426
+ Left-hand side.
1427
+
1428
+ Parameter ``rhs``:
1429
+ Left-hand side.
1430
+ """
1431
+
1432
+ @overload
1433
+ def __lt__(self, lhs: int) -> _jormungandr.optimization.InequalityConstraints:
1434
+ """
1435
+ Greater-than comparison operator that returns an inequality constraint
1436
+ for two Variables.
1437
+
1438
+ Parameter ``lhs``:
1439
+ Left-hand side.
1440
+
1441
+ Parameter ``rhs``:
1442
+ Left-hand side.
1443
+ """
1444
+
1445
+ @overload
1446
+ def __lt__(self, rhs: Annotated[NDArray[numpy.float64], dict(shape=(None, None))]) -> _jormungandr.optimization.InequalityConstraints:
1447
+ """
1448
+ Less-than comparison operator that returns an inequality constraint
1449
+ for two Variables.
1450
+
1451
+ Parameter ``lhs``:
1452
+ Left-hand side.
1453
+
1454
+ Parameter ``rhs``:
1455
+ Left-hand side.
1456
+ """
1457
+
1458
+ @overload
1459
+ def __le__(self, rhs: VariableMatrix) -> _jormungandr.optimization.InequalityConstraints:
1460
+ """
1461
+ Less-than-or-equal-to comparison operator that returns an inequality
1462
+ constraint for two Variables.
1463
+
1464
+ Parameter ``lhs``:
1465
+ Left-hand side.
1466
+
1467
+ Parameter ``rhs``:
1468
+ Left-hand side.
1469
+ """
1470
+
1471
+ @overload
1472
+ def __le__(self, rhs: VariableBlock) -> _jormungandr.optimization.InequalityConstraints:
1473
+ """
1474
+ Less-than-or-equal-to comparison operator that returns an inequality
1475
+ constraint for two Variables.
1476
+
1477
+ Parameter ``lhs``:
1478
+ Left-hand side.
1479
+
1480
+ Parameter ``rhs``:
1481
+ Left-hand side.
1482
+ """
1483
+
1484
+ @overload
1485
+ def __le__(self, rhs: Variable) -> _jormungandr.optimization.InequalityConstraints:
1486
+ """
1487
+ Less-than-or-equal-to comparison operator that returns an inequality
1488
+ constraint for two Variables.
1489
+
1490
+ Parameter ``lhs``:
1491
+ Left-hand side.
1492
+
1493
+ Parameter ``rhs``:
1494
+ Left-hand side.
1495
+ """
1496
+
1497
+ @overload
1498
+ def __le__(self, rhs: float) -> _jormungandr.optimization.InequalityConstraints:
1499
+ """
1500
+ Less-than-or-equal-to comparison operator that returns an inequality
1501
+ constraint for two Variables.
1502
+
1503
+ Parameter ``lhs``:
1504
+ Left-hand side.
1505
+
1506
+ Parameter ``rhs``:
1507
+ Left-hand side.
1508
+ """
1509
+
1510
+ @overload
1511
+ def __le__(self, rhs: int) -> _jormungandr.optimization.InequalityConstraints:
1512
+ """
1513
+ Less-than-or-equal-to comparison operator that returns an inequality
1514
+ constraint for two Variables.
1515
+
1516
+ Parameter ``lhs``:
1517
+ Left-hand side.
1518
+
1519
+ Parameter ``rhs``:
1520
+ Left-hand side.
1521
+ """
1522
+
1523
+ @overload
1524
+ def __le__(self, lhs: Variable) -> _jormungandr.optimization.InequalityConstraints:
1525
+ """
1526
+ Greater-than-or-equal-to comparison operator that returns an
1527
+ inequality constraint for two Variables.
1528
+
1529
+ Parameter ``lhs``:
1530
+ Left-hand side.
1531
+
1532
+ Parameter ``rhs``:
1533
+ Left-hand side.
1534
+ """
1535
+
1536
+ @overload
1537
+ def __le__(self, lhs: float) -> _jormungandr.optimization.InequalityConstraints:
1538
+ """
1539
+ Greater-than-or-equal-to comparison operator that returns an
1540
+ inequality constraint for two Variables.
1541
+
1542
+ Parameter ``lhs``:
1543
+ Left-hand side.
1544
+
1545
+ Parameter ``rhs``:
1546
+ Left-hand side.
1547
+ """
1548
+
1549
+ @overload
1550
+ def __le__(self, lhs: int) -> _jormungandr.optimization.InequalityConstraints:
1551
+ """
1552
+ Greater-than-or-equal-to comparison operator that returns an
1553
+ inequality constraint for two Variables.
1554
+
1555
+ Parameter ``lhs``:
1556
+ Left-hand side.
1557
+
1558
+ Parameter ``rhs``:
1559
+ Left-hand side.
1560
+ """
1561
+
1562
+ @overload
1563
+ def __le__(self, rhs: Annotated[NDArray[numpy.float64], dict(shape=(None, None))]) -> _jormungandr.optimization.InequalityConstraints:
1564
+ """
1565
+ Less-than-or-equal-to comparison operator that returns an inequality
1566
+ constraint for two Variables.
1567
+
1568
+ Parameter ``lhs``:
1569
+ Left-hand side.
1570
+
1571
+ Parameter ``rhs``:
1572
+ Left-hand side.
1573
+ """
1574
+
1575
+ @overload
1576
+ def __gt__(self, rhs: VariableMatrix) -> _jormungandr.optimization.InequalityConstraints:
1577
+ """
1578
+ Greater-than comparison operator that returns an inequality constraint
1579
+ for two Variables.
1580
+
1581
+ Parameter ``lhs``:
1582
+ Left-hand side.
1583
+
1584
+ Parameter ``rhs``:
1585
+ Left-hand side.
1586
+ """
1587
+
1588
+ @overload
1589
+ def __gt__(self, lhs: Variable) -> _jormungandr.optimization.InequalityConstraints:
1590
+ """
1591
+ Less-than comparison operator that returns an inequality constraint
1592
+ for two Variables.
1593
+
1594
+ Parameter ``lhs``:
1595
+ Left-hand side.
1596
+
1597
+ Parameter ``rhs``:
1598
+ Left-hand side.
1599
+ """
1600
+
1601
+ @overload
1602
+ def __gt__(self, lhs: float) -> _jormungandr.optimization.InequalityConstraints:
1603
+ """
1604
+ Less-than comparison operator that returns an inequality constraint
1605
+ for two Variables.
1606
+
1607
+ Parameter ``lhs``:
1608
+ Left-hand side.
1609
+
1610
+ Parameter ``rhs``:
1611
+ Left-hand side.
1612
+ """
1613
+
1614
+ @overload
1615
+ def __gt__(self, lhs: int) -> _jormungandr.optimization.InequalityConstraints:
1616
+ """
1617
+ Less-than comparison operator that returns an inequality constraint
1618
+ for two Variables.
1619
+
1620
+ Parameter ``lhs``:
1621
+ Left-hand side.
1622
+
1623
+ Parameter ``rhs``:
1624
+ Left-hand side.
1625
+ """
1626
+
1627
+ @overload
1628
+ def __gt__(self, rhs: VariableBlock) -> _jormungandr.optimization.InequalityConstraints:
1629
+ """
1630
+ Greater-than comparison operator that returns an inequality constraint
1631
+ for two Variables.
1632
+
1633
+ Parameter ``lhs``:
1634
+ Left-hand side.
1635
+
1636
+ Parameter ``rhs``:
1637
+ Left-hand side.
1638
+ """
1639
+
1640
+ @overload
1641
+ def __gt__(self, rhs: Variable) -> _jormungandr.optimization.InequalityConstraints:
1642
+ """
1643
+ Greater-than comparison operator that returns an inequality constraint
1644
+ for two Variables.
1645
+
1646
+ Parameter ``lhs``:
1647
+ Left-hand side.
1648
+
1649
+ Parameter ``rhs``:
1650
+ Left-hand side.
1651
+ """
1652
+
1653
+ @overload
1654
+ def __gt__(self, rhs: float) -> _jormungandr.optimization.InequalityConstraints:
1655
+ """
1656
+ Greater-than comparison operator that returns an inequality constraint
1657
+ for two Variables.
1658
+
1659
+ Parameter ``lhs``:
1660
+ Left-hand side.
1661
+
1662
+ Parameter ``rhs``:
1663
+ Left-hand side.
1664
+ """
1665
+
1666
+ @overload
1667
+ def __gt__(self, rhs: int) -> _jormungandr.optimization.InequalityConstraints:
1668
+ """
1669
+ Greater-than comparison operator that returns an inequality constraint
1670
+ for two Variables.
1671
+
1672
+ Parameter ``lhs``:
1673
+ Left-hand side.
1674
+
1675
+ Parameter ``rhs``:
1676
+ Left-hand side.
1677
+ """
1678
+
1679
+ @overload
1680
+ def __gt__(self, rhs: Annotated[NDArray[numpy.float64], dict(shape=(None, None))]) -> _jormungandr.optimization.InequalityConstraints:
1681
+ """
1682
+ Greater-than comparison operator that returns an inequality constraint
1683
+ for two Variables.
1684
+
1685
+ Parameter ``lhs``:
1686
+ Left-hand side.
1687
+
1688
+ Parameter ``rhs``:
1689
+ Left-hand side.
1690
+ """
1691
+
1692
+ @overload
1693
+ def __ge__(self, rhs: VariableMatrix) -> _jormungandr.optimization.InequalityConstraints:
1694
+ """
1695
+ Greater-than-or-equal-to comparison operator that returns an
1696
+ inequality constraint for two Variables.
1697
+
1698
+ Parameter ``lhs``:
1699
+ Left-hand side.
1700
+
1701
+ Parameter ``rhs``:
1702
+ Left-hand side.
1703
+ """
1704
+
1705
+ @overload
1706
+ def __ge__(self, lhs: Variable) -> _jormungandr.optimization.InequalityConstraints:
1707
+ """
1708
+ Less-than-or-equal-to comparison operator that returns an inequality
1709
+ constraint for two Variables.
1710
+
1711
+ Parameter ``lhs``:
1712
+ Left-hand side.
1713
+
1714
+ Parameter ``rhs``:
1715
+ Left-hand side.
1716
+ """
1717
+
1718
+ @overload
1719
+ def __ge__(self, lhs: float) -> _jormungandr.optimization.InequalityConstraints:
1720
+ """
1721
+ Less-than-or-equal-to comparison operator that returns an inequality
1722
+ constraint for two Variables.
1723
+
1724
+ Parameter ``lhs``:
1725
+ Left-hand side.
1726
+
1727
+ Parameter ``rhs``:
1728
+ Left-hand side.
1729
+ """
1730
+
1731
+ @overload
1732
+ def __ge__(self, lhs: int) -> _jormungandr.optimization.InequalityConstraints:
1733
+ """
1734
+ Less-than-or-equal-to comparison operator that returns an inequality
1735
+ constraint for two Variables.
1736
+
1737
+ Parameter ``lhs``:
1738
+ Left-hand side.
1739
+
1740
+ Parameter ``rhs``:
1741
+ Left-hand side.
1742
+ """
1743
+
1744
+ @overload
1745
+ def __ge__(self, rhs: VariableBlock) -> _jormungandr.optimization.InequalityConstraints:
1746
+ """
1747
+ Greater-than-or-equal-to comparison operator that returns an
1748
+ inequality constraint for two Variables.
1749
+
1750
+ Parameter ``lhs``:
1751
+ Left-hand side.
1752
+
1753
+ Parameter ``rhs``:
1754
+ Left-hand side.
1755
+ """
1756
+
1757
+ @overload
1758
+ def __ge__(self, rhs: Variable) -> _jormungandr.optimization.InequalityConstraints:
1759
+ """
1760
+ Greater-than-or-equal-to comparison operator that returns an
1761
+ inequality constraint for two Variables.
1762
+
1763
+ Parameter ``lhs``:
1764
+ Left-hand side.
1765
+
1766
+ Parameter ``rhs``:
1767
+ Left-hand side.
1768
+ """
1769
+
1770
+ @overload
1771
+ def __ge__(self, rhs: float) -> _jormungandr.optimization.InequalityConstraints:
1772
+ """
1773
+ Greater-than-or-equal-to comparison operator that returns an
1774
+ inequality constraint for two Variables.
1775
+
1776
+ Parameter ``lhs``:
1777
+ Left-hand side.
1778
+
1779
+ Parameter ``rhs``:
1780
+ Left-hand side.
1781
+ """
1782
+
1783
+ @overload
1784
+ def __ge__(self, rhs: int) -> _jormungandr.optimization.InequalityConstraints:
1785
+ """
1786
+ Greater-than-or-equal-to comparison operator that returns an
1787
+ inequality constraint for two Variables.
1788
+
1789
+ Parameter ``lhs``:
1790
+ Left-hand side.
1791
+
1792
+ Parameter ``rhs``:
1793
+ Left-hand side.
1794
+ """
1795
+
1796
+ @overload
1797
+ def __ge__(self, rhs: Annotated[NDArray[numpy.float64], dict(shape=(None, None))]) -> _jormungandr.optimization.InequalityConstraints:
1798
+ """
1799
+ Greater-than-or-equal-to comparison operator that returns an
1800
+ inequality constraint for two Variables.
1801
+
1802
+ Parameter ``lhs``:
1803
+ Left-hand side.
1804
+
1805
+ Parameter ``rhs``:
1806
+ Left-hand side.
1807
+ """
1808
+
1809
+ @overload
1810
+ def set_value(self, value: float) -> None:
1811
+ """
1812
+ Assigns a scalar to the block.
1813
+
1814
+ This only works for blocks with one row and one column.
1815
+
1816
+ Parameter ``value``:
1817
+ Value to assign.
1818
+ """
1819
+
1820
+ @overload
1821
+ def set_value(self, values: Annotated[NDArray[numpy.float64], dict(shape=(None, None))]) -> None:
1822
+ """
1823
+ Sets block's internal values.
1824
+
1825
+ Parameter ``values``:
1826
+ Eigen matrix of values.
1827
+ """
1828
+
1829
+ @overload
1830
+ def set_value(self, values: Annotated[NDArray[numpy.float32], dict(shape=(None, None))]) -> None:
1831
+ """
1832
+ Sets block's internal values.
1833
+
1834
+ Parameter ``values``:
1835
+ Eigen matrix of values.
1836
+ """
1837
+
1838
+ @overload
1839
+ def set_value(self, values: Annotated[NDArray[numpy.int64], dict(shape=(None, None))]) -> None:
1840
+ """
1841
+ Sets block's internal values.
1842
+
1843
+ Parameter ``values``:
1844
+ Eigen matrix of values.
1845
+ """
1846
+
1847
+ @overload
1848
+ def set_value(self, values: Annotated[NDArray[numpy.int32], dict(shape=(None, None))]) -> None:
1849
+ """
1850
+ Sets block's internal values.
1851
+
1852
+ Parameter ``values``:
1853
+ Eigen matrix of values.
1854
+ """
1855
+
1856
+ @overload
1857
+ def __setitem__(self, row: int, value: Variable) -> Variable: ...
1858
+
1859
+ @overload
1860
+ def __setitem__(self, slices: tuple, value: object) -> None: ...
1861
+
1862
+ @overload
1863
+ def __getitem__(self, row: int) -> Variable:
1864
+ """
1865
+ Returns a scalar subblock at the given index.
1866
+
1867
+ Parameter ``index``:
1868
+ The scalar subblock's index.
1869
+
1870
+ Returns:
1871
+ A scalar subblock at the given index.
1872
+ """
1873
+
1874
+ @overload
1875
+ def __getitem__(self, slices: tuple) -> object:
1876
+ """
1877
+ Returns a scalar subblock at the given row and column.
1878
+
1879
+ Parameter ``row``:
1880
+ The scalar subblock's row.
1881
+
1882
+ Parameter ``col``:
1883
+ The scalar subblock's column.
1884
+
1885
+ Returns:
1886
+ A scalar subblock at the given row and column.
1887
+ """
1888
+
1889
+ def row(self, row: int) -> VariableBlock:
1890
+ """
1891
+ Returns a row slice of the variable matrix.
1892
+
1893
+ Parameter ``row``:
1894
+ The row to slice.
1895
+
1896
+ Returns:
1897
+ A row slice of the variable matrix.
1898
+ """
1899
+
1900
+ def col(self, col: int) -> VariableBlock:
1901
+ """
1902
+ Returns a column slice of the variable matrix.
1903
+
1904
+ Parameter ``col``:
1905
+ The column to slice.
1906
+
1907
+ Returns:
1908
+ A column slice of the variable matrix.
1909
+ """
1910
+
1911
+ def __array_ufunc__(self, ufunc: object, method: str, *inputs, **kwargs) -> object: ...
1912
+
1913
+ @overload
1914
+ def __rmul__(self, lhs: Variable) -> VariableMatrix: ...
1915
+
1916
+ @overload
1917
+ def __rmul__(self, lhs: float) -> VariableMatrix: ...
1918
+
1919
+ @overload
1920
+ def __truediv__(self, rhs: Variable) -> VariableMatrix: ...
1921
+
1922
+ @overload
1923
+ def __truediv__(self, rhs: float) -> VariableMatrix: ...
1924
+
1925
+ def __neg__(self) -> VariableMatrix: ...
1926
+
1927
+ def __pow__(self, power: int) -> VariableMatrix: ...
1928
+
1929
+ @property
1930
+ def T(self) -> VariableMatrix:
1931
+ """
1932
+ Returns the transpose of the variable matrix.
1933
+
1934
+ Returns:
1935
+ The transpose of the variable matrix.
1936
+ """
1937
+
1938
+ def rows(self) -> int:
1939
+ """
1940
+ Returns the number of rows in the matrix.
1941
+
1942
+ Returns:
1943
+ The number of rows in the matrix.
1944
+ """
1945
+
1946
+ def cols(self) -> int:
1947
+ """
1948
+ Returns the number of columns in the matrix.
1949
+
1950
+ Returns:
1951
+ The number of columns in the matrix.
1952
+ """
1953
+
1954
+ @property
1955
+ def shape(self) -> tuple: ...
1956
+
1957
+ @overload
1958
+ def value(self, row: int, col: int) -> float:
1959
+ """
1960
+ Returns an element of the variable matrix.
1961
+
1962
+ Parameter ``row``:
1963
+ The row of the element to return.
1964
+
1965
+ Parameter ``col``:
1966
+ The column of the element to return.
1967
+
1968
+ Returns:
1969
+ An element of the variable matrix.
1970
+ """
1971
+
1972
+ @overload
1973
+ def value(self, index: int) -> float:
1974
+ """
1975
+ Returns an element of the variable block.
1976
+
1977
+ Parameter ``index``:
1978
+ The index of the element to return.
1979
+
1980
+ Returns:
1981
+ An element of the variable block.
1982
+ """
1983
+
1984
+ @overload
1985
+ def value(self) -> Annotated[NDArray[numpy.float64], dict(shape=(None, None), order='F')]:
1986
+ """
1987
+ Returns the contents of the variable matrix.
1988
+
1989
+ Returns:
1990
+ The contents of the variable matrix.
1991
+ """
1992
+
1993
+ def cwise_map(self, func: Callable[[Variable], Variable]) -> VariableMatrix:
1994
+ """
1995
+ Transforms the matrix coefficient-wise with an unary operator.
1996
+
1997
+ Parameter ``unary_op``:
1998
+ The unary operator to use for the transform operation.
1999
+
2000
+ Returns:
2001
+ Result of the unary operator.
2002
+ """
2003
+
2004
+ def __len__(self) -> int:
2005
+ """
2006
+ Returns the number of rows in the matrix.
2007
+
2008
+ Returns:
2009
+ The number of rows in the matrix.
2010
+ """
2011
+
2012
+ def __iter__(self) -> Iterator[Variable]: ...
2013
+
2014
+ class Gradient:
2015
+ """
2016
+ This class calculates the gradient of a variable with respect to a
2017
+ vector of variables.
2018
+
2019
+ The gradient is only recomputed if the variable expression is
2020
+ quadratic or higher order.
2021
+
2022
+ Template parameter ``Scalar``:
2023
+ Scalar type.
2024
+ """
2025
+
2026
+ @overload
2027
+ def __init__(self, variable: Variable, wrt: Variable) -> None:
2028
+ """
2029
+ Constructs a Gradient object.
2030
+
2031
+ Parameter ``variable``:
2032
+ Variable of which to compute the gradient.
2033
+
2034
+ Parameter ``wrt``:
2035
+ Variable with respect to which to compute the gradient.
2036
+ """
2037
+
2038
+ @overload
2039
+ def __init__(self, variable: Variable, wrt: VariableMatrix) -> None: ...
2040
+
2041
+ def get(self) -> VariableMatrix:
2042
+ """
2043
+ Returns the gradient as a VariableMatrix.
2044
+
2045
+ This is useful when constructing optimization problems with
2046
+ derivatives in them.
2047
+
2048
+ Returns:
2049
+ The gradient as a VariableMatrix.
2050
+ """
2051
+
2052
+ def value(self) -> scipy.sparse.csc_matrix[float]:
2053
+ """
2054
+ Evaluates the gradient at wrt's value.
2055
+
2056
+ Returns:
2057
+ The gradient at wrt's value.
2058
+ """
2059
+
2060
+ class Hessian:
2061
+ """
2062
+ This class calculates the Hessian of a variable with respect to a
2063
+ vector of variables.
2064
+
2065
+ The gradient tree is cached so subsequent Hessian calculations are
2066
+ faster, and the Hessian is only recomputed if the variable expression
2067
+ is nonlinear.
2068
+
2069
+ Template parameter ``Scalar``:
2070
+ Scalar type.
2071
+
2072
+ Template parameter ``UpLo``:
2073
+ Which part of the Hessian to compute (Lower or Lower | Upper).
2074
+ """
2075
+
2076
+ @overload
2077
+ def __init__(self, variable: Variable, wrt: Variable) -> None:
2078
+ """
2079
+ Constructs a Hessian object.
2080
+
2081
+ Parameter ``variable``:
2082
+ Variable of which to compute the Hessian.
2083
+
2084
+ Parameter ``wrt``:
2085
+ Variable with respect to which to compute the Hessian.
2086
+ """
2087
+
2088
+ @overload
2089
+ def __init__(self, variable: Variable, wrt: VariableMatrix) -> None: ...
2090
+
2091
+ def get(self) -> VariableMatrix:
2092
+ """
2093
+ Returns the Hessian as a VariableMatrix.
2094
+
2095
+ This is useful when constructing optimization problems with
2096
+ derivatives in them.
2097
+
2098
+ Returns:
2099
+ The Hessian as a VariableMatrix.
2100
+ """
2101
+
2102
+ def value(self) -> scipy.sparse.csc_matrix[float]:
2103
+ """
2104
+ Evaluates the Hessian at wrt's value.
2105
+
2106
+ Returns:
2107
+ The Hessian at wrt's value.
2108
+ """
2109
+
2110
+ class Jacobian:
2111
+ """
2112
+ This class calculates the Jacobian of a vector of variables with
2113
+ respect to a vector of variables.
2114
+
2115
+ The Jacobian is only recomputed if the variable expression is
2116
+ quadratic or higher order.
2117
+
2118
+ Template parameter ``Scalar``:
2119
+ Scalar type.
2120
+ """
2121
+
2122
+ @overload
2123
+ def __init__(self, variable: Variable, wrt: Variable) -> None:
2124
+ """
2125
+ Constructs a Jacobian object.
2126
+
2127
+ Parameter ``variable``:
2128
+ Variable of which to compute the Jacobian.
2129
+
2130
+ Parameter ``wrt``:
2131
+ Variable with respect to which to compute the Jacobian.
2132
+ """
2133
+
2134
+ @overload
2135
+ def __init__(self, variable: Variable, wrt: VariableMatrix) -> None: ...
2136
+
2137
+ @overload
2138
+ def __init__(self, variables: VariableMatrix, wrt: VariableMatrix) -> None: ...
2139
+
2140
+ def get(self) -> VariableMatrix:
2141
+ """
2142
+ Returns the Jacobian as a VariableMatrix.
2143
+
2144
+ This is useful when constructing optimization problems with
2145
+ derivatives in them.
2146
+
2147
+ Returns:
2148
+ The Jacobian as a VariableMatrix.
2149
+ """
2150
+
2151
+ def value(self) -> scipy.sparse.csc_matrix[float]:
2152
+ """
2153
+ Evaluates the Jacobian at wrt's value.
2154
+
2155
+ Returns:
2156
+ The Jacobian at wrt's value.
2157
+ """
2158
+
2159
+ @overload
2160
+ def abs(x: float) -> Variable:
2161
+ """
2162
+ abs() for Variables.
2163
+
2164
+ Template parameter ``Scalar``:
2165
+ Scalar type.
2166
+
2167
+ Parameter ``x``:
2168
+ The argument.
2169
+ """
2170
+
2171
+ @overload
2172
+ def abs(x: Variable) -> Variable: ...
2173
+
2174
+ @overload
2175
+ def acos(x: float) -> Variable:
2176
+ """
2177
+ acos() for Variables.
2178
+
2179
+ Template parameter ``Scalar``:
2180
+ Scalar type.
2181
+
2182
+ Parameter ``x``:
2183
+ The argument.
2184
+ """
2185
+
2186
+ @overload
2187
+ def acos(x: Variable) -> Variable: ...
2188
+
2189
+ @overload
2190
+ def asin(x: float) -> Variable:
2191
+ """
2192
+ asin() for Variables.
2193
+
2194
+ Template parameter ``Scalar``:
2195
+ Scalar type.
2196
+
2197
+ Parameter ``x``:
2198
+ The argument.
2199
+ """
2200
+
2201
+ @overload
2202
+ def asin(x: Variable) -> Variable: ...
2203
+
2204
+ @overload
2205
+ def atan(x: float) -> Variable:
2206
+ """
2207
+ atan() for Variables.
2208
+
2209
+ Template parameter ``Scalar``:
2210
+ Scalar type.
2211
+
2212
+ Parameter ``x``:
2213
+ The argument.
2214
+ """
2215
+
2216
+ @overload
2217
+ def atan(x: Variable) -> Variable: ...
2218
+
2219
+ @overload
2220
+ def atan2(y: float, x: Variable) -> Variable:
2221
+ """
2222
+ atan2() for Variables.
2223
+
2224
+ Template parameter ``Scalar``:
2225
+ Scalar type.
2226
+
2227
+ Parameter ``y``:
2228
+ The y argument.
2229
+
2230
+ Parameter ``x``:
2231
+ The x argument.
2232
+ """
2233
+
2234
+ @overload
2235
+ def atan2(y: Variable, x: float) -> Variable: ...
2236
+
2237
+ @overload
2238
+ def atan2(y: Variable, x: Variable) -> Variable: ...
2239
+
2240
+ @overload
2241
+ def cbrt(x: float) -> Variable:
2242
+ """
2243
+ cbrt() for Variables.
2244
+
2245
+ Template parameter ``Scalar``:
2246
+ Scalar type.
2247
+
2248
+ Parameter ``x``:
2249
+ The argument.
2250
+ """
2251
+
2252
+ @overload
2253
+ def cbrt(x: Variable) -> Variable: ...
2254
+
2255
+ @overload
2256
+ def cos(x: float) -> Variable:
2257
+ """
2258
+ cos() for Variables.
2259
+
2260
+ Template parameter ``Scalar``:
2261
+ Scalar type.
2262
+
2263
+ Parameter ``x``:
2264
+ The argument.
2265
+ """
2266
+
2267
+ @overload
2268
+ def cos(x: Variable) -> Variable: ...
2269
+
2270
+ @overload
2271
+ def cosh(x: float) -> Variable:
2272
+ """
2273
+ cosh() for Variables.
2274
+
2275
+ Template parameter ``Scalar``:
2276
+ Scalar type.
2277
+
2278
+ Parameter ``x``:
2279
+ The argument.
2280
+ """
2281
+
2282
+ @overload
2283
+ def cosh(x: Variable) -> Variable: ...
2284
+
2285
+ @overload
2286
+ def erf(x: float) -> Variable:
2287
+ """
2288
+ erf() for Variables.
2289
+
2290
+ Template parameter ``Scalar``:
2291
+ Scalar type.
2292
+
2293
+ Parameter ``x``:
2294
+ The argument.
2295
+ """
2296
+
2297
+ @overload
2298
+ def erf(x: Variable) -> Variable: ...
2299
+
2300
+ @overload
2301
+ def exp(x: float) -> Variable:
2302
+ """
2303
+ exp() for Variables.
2304
+
2305
+ Template parameter ``Scalar``:
2306
+ Scalar type.
2307
+
2308
+ Parameter ``x``:
2309
+ The argument.
2310
+ """
2311
+
2312
+ @overload
2313
+ def exp(x: Variable) -> Variable: ...
2314
+
2315
+ @overload
2316
+ def hypot(x: float, y: Variable) -> Variable:
2317
+ """
2318
+ hypot() for Variables.
2319
+
2320
+ Template parameter ``Scalar``:
2321
+ Scalar type.
2322
+
2323
+ Parameter ``x``:
2324
+ The x argument.
2325
+
2326
+ Parameter ``y``:
2327
+ The y argument.
2328
+ """
2329
+
2330
+ @overload
2331
+ def hypot(x: Variable, y: float) -> Variable: ...
2332
+
2333
+ @overload
2334
+ def hypot(x: Variable, y: Variable) -> Variable: ...
2335
+
2336
+ @overload
2337
+ def hypot(x: Variable, y: Variable, z: Variable) -> Variable: ...
2338
+
2339
+ @overload
2340
+ def log(x: float) -> Variable:
2341
+ """
2342
+ log() for Variables.
2343
+
2344
+ Template parameter ``Scalar``:
2345
+ Scalar type.
2346
+
2347
+ Parameter ``x``:
2348
+ The argument.
2349
+ """
2350
+
2351
+ @overload
2352
+ def log(x: Variable) -> Variable: ...
2353
+
2354
+ @overload
2355
+ def log10(x: float) -> Variable:
2356
+ """
2357
+ log10() for Variables.
2358
+
2359
+ Template parameter ``Scalar``:
2360
+ Scalar type.
2361
+
2362
+ Parameter ``x``:
2363
+ The argument.
2364
+ """
2365
+
2366
+ @overload
2367
+ def log10(x: Variable) -> Variable: ...
2368
+
2369
+ @overload
2370
+ def pow(base: float, power: Variable) -> Variable:
2371
+ """
2372
+ pow() for Variables.
2373
+
2374
+ Template parameter ``Scalar``:
2375
+ Scalar type.
2376
+
2377
+ Parameter ``base``:
2378
+ The base.
2379
+
2380
+ Parameter ``power``:
2381
+ The power.
2382
+ """
2383
+
2384
+ @overload
2385
+ def pow(base: Variable, power: float) -> Variable: ...
2386
+
2387
+ @overload
2388
+ def pow(base: Variable, power: Variable) -> Variable: ...
2389
+
2390
+ @overload
2391
+ def sign(x: float) -> Variable:
2392
+ """
2393
+ sign() for Variables.
2394
+
2395
+ Template parameter ``Scalar``:
2396
+ Scalar type.
2397
+
2398
+ Parameter ``x``:
2399
+ The argument.
2400
+ """
2401
+
2402
+ @overload
2403
+ def sign(x: Variable) -> Variable: ...
2404
+
2405
+ @overload
2406
+ def sin(x: float) -> Variable:
2407
+ """
2408
+ sin() for Variables.
2409
+
2410
+ Template parameter ``Scalar``:
2411
+ Scalar type.
2412
+
2413
+ Parameter ``x``:
2414
+ The argument.
2415
+ """
2416
+
2417
+ @overload
2418
+ def sin(x: Variable) -> Variable: ...
2419
+
2420
+ @overload
2421
+ def sinh(x: float) -> Variable:
2422
+ """
2423
+ sinh() for Variables.
2424
+
2425
+ Template parameter ``Scalar``:
2426
+ Scalar type.
2427
+
2428
+ Parameter ``x``:
2429
+ The argument.
2430
+ """
2431
+
2432
+ @overload
2433
+ def sinh(x: Variable) -> Variable: ...
2434
+
2435
+ @overload
2436
+ def sqrt(x: float) -> Variable:
2437
+ """
2438
+ sqrt() for Variables.
2439
+
2440
+ Template parameter ``Scalar``:
2441
+ Scalar type.
2442
+
2443
+ Parameter ``x``:
2444
+ The argument.
2445
+ """
2446
+
2447
+ @overload
2448
+ def sqrt(x: Variable) -> Variable: ...
2449
+
2450
+ @overload
2451
+ def tan(x: float) -> Variable:
2452
+ """
2453
+ tan() for Variables.
2454
+
2455
+ Template parameter ``Scalar``:
2456
+ Scalar type.
2457
+
2458
+ Parameter ``x``:
2459
+ The argument.
2460
+ """
2461
+
2462
+ @overload
2463
+ def tan(x: Variable) -> Variable: ...
2464
+
2465
+ @overload
2466
+ def tanh(x: float) -> Variable:
2467
+ """
2468
+ tanh() for Variables.
2469
+
2470
+ Template parameter ``Scalar``:
2471
+ Scalar type.
2472
+
2473
+ Parameter ``x``:
2474
+ The argument.
2475
+ """
2476
+
2477
+ @overload
2478
+ def tanh(x: Variable) -> Variable: ...
2479
+
2480
+ def cwise_reduce(lhs: VariableMatrix, rhs: VariableMatrix, func: Callable[[Variable, Variable], Variable]) -> VariableMatrix:
2481
+ """
2482
+ Applies a coefficient-wise reduce operation to two matrices.
2483
+
2484
+ Template parameter ``Scalar``:
2485
+ Scalar type.
2486
+
2487
+ Parameter ``lhs``:
2488
+ The left-hand side of the binary operator.
2489
+
2490
+ Parameter ``rhs``:
2491
+ The right-hand side of the binary operator.
2492
+
2493
+ Parameter ``binary_op``:
2494
+ The binary operator to use for the reduce operation.
2495
+ """
2496
+
2497
+ def block(list: Sequence[Sequence[VariableMatrix]]) -> VariableMatrix:
2498
+ """
2499
+ Assemble a VariableMatrix from a nested list of blocks.
2500
+
2501
+ Each row's blocks must have the same height, and the assembled block
2502
+ rows must have the same width. For example, for the block matrix [[A,
2503
+ B], [C]] to be constructible, the number of rows in A and B must
2504
+ match, and the number of columns in [A, B] and [C] must match.
2505
+
2506
+ Template parameter ``Scalar``:
2507
+ Scalar type.
2508
+
2509
+ Parameter ``list``:
2510
+ The nested list of blocks.
2511
+ """
2512
+
2513
+ def solve(A: VariableMatrix, B: VariableMatrix) -> VariableMatrix:
2514
+ """
2515
+ Solves the VariableMatrix equation AX = B for X.
2516
+
2517
+ Template parameter ``Scalar``:
2518
+ Scalar type.
2519
+
2520
+ Parameter ``A``:
2521
+ The left-hand side.
2522
+
2523
+ Parameter ``B``:
2524
+ The right-hand side.
2525
+
2526
+ Returns:
2527
+ The solution X.
2528
+ """