|
| Real | abs (float x) |
| |
| Real | abs (Real x) |
| |
| Matrix | abs (Matrix x) |
| |
| Matrix | abs (Submatrix x) |
| |
| Real | acos (float x) |
| |
| Real | acos (Real x) |
| |
| Matrix | acos (Matrix x) |
| |
| Matrix | acos (Submatrix x) |
| |
| Real | asin (float x) |
| |
| Real | asin (Real x) |
| |
| Matrix | asin (Matrix x) |
| |
| Matrix | asin (Submatrix x) |
| |
| Real | atan (float x) |
| |
| Real | atan (Real x) |
| |
| Matrix | atan (Matrix x) |
| |
| Matrix | atan (Submatrix x) |
| |
| Real | atan2 (float y, float x) |
| |
| Real | atan2 (float y, Real x) |
| |
| Real | atan2 (Real y, float x) |
| |
| Real | atan2 (Real y, Real x) |
| |
| Real | cbrt (float x) |
| |
| Real | cbrt (Real x) |
| |
| Matrix | cbrt (Matrix x) |
| |
| Matrix | cbrt (Submatrix x) |
| |
| Real | cos (float x) |
| |
| Real | cos (Real x) |
| |
| Matrix | cos (Matrix x) |
| |
| Matrix | cos (Submatrix x) |
| |
| Real | cosh (float x) |
| |
| Real | cosh (Real x) |
| |
| Matrix | cosh (Matrix x) |
| |
| Matrix | cosh (Submatrix x) |
| |
| Real | erf (float x) |
| |
| Real | erf (Real x) |
| |
| Matrix | erf (Matrix x) |
| |
| Matrix | erf (Submatrix x) |
| |
| Real | exp (float x) |
| |
| Real | exp (Real x) |
| |
| Matrix | exp (Matrix x) |
| |
| Matrix | exp (Submatrix x) |
| |
| Real | hypot (float x, float y) |
| |
| Real | hypot (float x, Real y) |
| |
| Real | hypot (Real x, float y) |
| |
| Real | hypot (Real x, Real y) |
| |
| Real | hypot (float x, float y, float z) |
| |
| Real | hypot (float x, float y, Real z) |
| |
| Real | hypot (float x, Real y, float z) |
| |
| Real | hypot (float x, Real y, Real z) |
| |
| Real | hypot (Real x, float y, float z) |
| |
| Real | hypot (Real x, float y, Real z) |
| |
| Real | hypot (Real x, Real y, float z) |
| |
| Real | hypot (Real x, Real y, Real z) |
| |
| Real | if_else (EqualityConstraints cond, Real|float t, Real|float f) |
| |
| Real | if_else (InequalityConstraints cond, Real|float t, Real|float f) |
| |
| Real | log (float x) |
| |
| Real | log (Real x) |
| |
| Matrix | log (Matrix x) |
| |
| Matrix | log (Submatrix x) |
| |
| Real | log10 (float x) |
| |
| Real | log10 (Real x) |
| |
| Matrix | log10 (Matrix x) |
| |
| Matrix | log10 (Submatrix x) |
| |
| Real | max (float a, float b) |
| |
| Real | max (float a, Real b) |
| |
| Real | max (Real a, float b) |
| |
| Real | max (Real a, Real b) |
| |
| Real | min (float a, float b) |
| |
| Real | min (float a, Real b) |
| |
| Real | min (Real a, float b) |
| |
| Real | min (Real a, Real b) |
| |
| Real | pow (float base, float power) |
| |
| Real | pow (float base, Real power) |
| |
| Real | pow (Real base, float power) |
| |
| Real | pow (Real base, Real power) |
| |
| Real | sign (float x) |
| |
| Real | sign (Real x) |
| |
| Matrix | sign (Matrix x) |
| |
| Matrix | sign (Submatrix x) |
| |
| Real | sin (float x) |
| |
| Real | sin (Real x) |
| |
| Matrix | sin (Matrix x) |
| |
| Matrix | sin (Submatrix x) |
| |
| Real | sinh (float x) |
| |
| Real | sinh (Real x) |
| |
| Matrix | sinh (Matrix x) |
| |
| Matrix | sinh (Submatrix x) |
| |
| Real | sqrt (float x) |
| |
| Real | sqrt (Real x) |
| |
| Matrix | sqrt (Matrix x) |
| |
| Matrix | sqrt (Submatrix x) |
| |
| Real | tan (float x) |
| |
| Real | tan (Real x) |
| |
| Matrix | tan (Matrix x) |
| |
| Matrix | tan (Submatrix x) |
| |
| Real | tanh (float x) |
| |
| Real | tanh (Real x) |
| |
| Matrix | tanh (Matrix x) |
| |
| Matrix | tanh (Submatrix x) |
| |
| Matrix | cwise_reduce (Matrix|Submatrix lhs, Matrix|Submatrix rhs, Callable[[Real, Real], Real] func) |
| |
| Matrix | block (Sequence[Sequence[Matrix|Submatrix]] list) |
| |
| Matrix | solve (Matrix|Submatrix A, Matrix|Submatrix B) |
| |
| Matrix | solve (Matrix|Submatrix A, Annotated[NDArray[numpy.float64], dict(shape=(None, None))] B) |
| |
| Matrix | solve (Annotated[NDArray[numpy.float64], dict(shape=(None, None))] A, Matrix|Submatrix B) |
| |
| None | spy (scipy.sparse.csc_matrix mat) |
| |
Assembles a Matrix from a nested list of blocks.
Each row's blocks must have the same height, and the assembled block
rows must have the same width. For example, for the block matrix [[A,
B], [C]] to be constructible, the number of rows in A and B must
match, and the number of columns in [A, B] and [C] must match.
Args:
list: The nested list of blocks.
Template Args:
Scalar: Scalar type.
| Real sleipnir.autodiff.if_else |
( |
EqualityConstraints |
cond, |
|
|
Real | float |
t, |
|
|
Real | float |
f |
|
) |
| |
Returns t if the equality constraint cond is satisfied, otherwise f.
For example, if_else(x == y, t, f) returns t if x = y, otherwise f.
The condition is evaluated on the current values of its operands each
time the result is evaluated, and the gradient only flows through the
selected branch. Both branches are evaluated regardless of which one
is selected.
Args:
cond: A scalar equality constraint.
t: Value selected when cond is satisfied.
f: Value selected when cond is violated.
Template Args:
Scalar: Scalar type.
| Real sleipnir.autodiff.if_else |
( |
InequalityConstraints |
cond, |
|
|
Real | float |
t, |
|
|
Real | float |
f |
|
) |
| |
Returns t if the inequality constraint cond is satisfied, otherwise f.
For example, if_else(x < y, t, f) returns t if x < y, otherwise f.
Strict comparisons (< and >) exclude equality and non-strict
comparisons (≤ and ≥) include it.
The condition is evaluated on the current values of its operands each
time the result is evaluated, and the gradient only flows through the
selected branch. Both branches are evaluated regardless of which one
is selected.
Args:
cond: A scalar inequality constraint.
t: Value selected when cond is satisfied.
f: Value selected when cond is violated.
Template Args:
Scalar: Scalar type.