sleipnirgroup-jormungandr 0.6.7.dev194__tar.gz → 0.6.7.dev200__tar.gz
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.
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/PKG-INFO +1 -1
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/include/sleipnir/autodiff/matrix.hpp +65 -36
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/include/sleipnir/autodiff/submatrix.hpp +23 -7
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/python/cpp/array_ufunc.hpp +1 -1
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/python/cpp/autodiff/bind_real.cpp +31 -4
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/python/cpp/autodiff/bind_real_matrix.cpp +7 -6
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/python/cpp/autodiff/bind_real_submatrix.cpp +4 -2
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/python/cpp/docstrings.hpp +51 -8
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/python/src/sleipnir/__init__.py +1 -1
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/python/test/autodiff/real_matrix_test.py +2 -2
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/CMakeLists.txt +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/LICENSE.txt +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/README.md +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/SleipnirConfig.cmake.in +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/cmake/BuildTypes.cmake +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/cmake/CompilerFlags.cmake +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/cmake/Pybind11Mkdoc.cmake +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/cmake/Pybind11MkdocPostprocess.cmake +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/cmake/SubdirList.cmake +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/cmake/aarch64-linux-gnu.cmake +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/cmake/arm-none-eabi.cmake +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/include/sleipnir/autodiff/expression.hpp +7 -7
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/include/sleipnir/autodiff/expression_functions.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/include/sleipnir/autodiff/expression_graph.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/include/sleipnir/autodiff/expression_type.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/include/sleipnir/autodiff/gradient.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/include/sleipnir/autodiff/hessian.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/include/sleipnir/autodiff/jacobian.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/include/sleipnir/autodiff/matrix_fwd.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/include/sleipnir/autodiff/real.hpp +5 -5
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/include/sleipnir/autodiff/sleipnir_base.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/include/sleipnir/autodiff/slice.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/include/sleipnir/optimization/multistart.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/include/sleipnir/optimization/ocp/dynamics_type.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/include/sleipnir/optimization/ocp/timestep_method.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/include/sleipnir/optimization/ocp/transcription_method.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/include/sleipnir/optimization/ocp.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/include/sleipnir/optimization/problem.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/include/sleipnir/optimization/solver/control_flow.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/include/sleipnir/optimization/solver/exit_status.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/include/sleipnir/optimization/solver/ipm.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/include/sleipnir/optimization/solver/ipm_matrix_callbacks.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/include/sleipnir/optimization/solver/iteration_info.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/include/sleipnir/optimization/solver/newton.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/include/sleipnir/optimization/solver/newton_matrix_callbacks.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/include/sleipnir/optimization/solver/options.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/include/sleipnir/optimization/solver/sqp.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/include/sleipnir/optimization/solver/sqp_matrix_callbacks.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/include/sleipnir/optimization/solver/util/all_finite.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/include/sleipnir/optimization/solver/util/append_as_triplets.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/include/sleipnir/optimization/solver/util/barrier_parameter.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/include/sleipnir/optimization/solver/util/bounds.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/include/sleipnir/optimization/solver/util/constraint_violation.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/include/sleipnir/optimization/solver/util/dense_kkt_solver.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/include/sleipnir/optimization/solver/util/feasibility_restoration.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/include/sleipnir/optimization/solver/util/feasibility_restoration_cycle_detector.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/include/sleipnir/optimization/solver/util/filter.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/include/sleipnir/optimization/solver/util/first_derivatives.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/include/sleipnir/optimization/solver/util/fraction_to_the_boundary_rule.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/include/sleipnir/optimization/solver/util/function_values.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/include/sleipnir/optimization/solver/util/iterates.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/include/sleipnir/optimization/solver/util/kkt_error.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/include/sleipnir/optimization/solver/util/kkt_solver.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/include/sleipnir/optimization/solver/util/kkt_system.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/include/sleipnir/optimization/solver/util/problem_scaling.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/include/sleipnir/optimization/solver/util/regularization_limits.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/include/sleipnir/optimization/solver/util/ruiz_equilibration.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/include/sleipnir/optimization/solver/util/sparse_inf_norms.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/include/sleipnir/optimization/solver/util/sparse_kkt_solver.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/include/sleipnir/optimization/solver/util/step.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/include/sleipnir/optimization/solver/util/time_trace.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/include/sleipnir/util/assert.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/include/sleipnir/util/concepts.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/include/sleipnir/util/empty.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/include/sleipnir/util/force_inline.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/include/sleipnir/util/function_ref.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/include/sleipnir/util/intrusive_shared_ptr.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/include/sleipnir/util/pool.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/include/sleipnir/util/print.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/include/sleipnir/util/print_diagnostics.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/include/sleipnir/util/scope_exit.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/include/sleipnir/util/spy.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/include/sleipnir/util/symbol_exports.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/include/sleipnir/util/time_tracer.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/pyproject.toml +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/python/.clang-tidy +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/python/cpp/arity.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/python/cpp/autodiff/bind_expression_type.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/python/cpp/autodiff/bind_gradient.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/python/cpp/autodiff/bind_hessian.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/python/cpp/autodiff/bind_jacobian.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/python/cpp/binders.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/python/cpp/element_index.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/python/cpp/for_each_type.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/python/cpp/main.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/python/cpp/optimization/bind_equality_constraints.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/python/cpp/optimization/bind_inequality_constraints.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/python/cpp/optimization/bind_ocp.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/python/cpp/optimization/bind_problem.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/python/cpp/optimization/ocp/bind_dynamics_type.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/python/cpp/optimization/ocp/bind_timestep_method.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/python/cpp/optimization/ocp/bind_transcription_method.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/python/cpp/optimization/solver/bind_exit_status.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/python/cpp/optimization/solver/bind_iteration_info.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/python/cpp/real_scalar.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/python/cpp/real_scalar_comparisons.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/python/cpp/real_vector_caster.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/python/cpp/slice_tuple.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/python/cpp/text_wrap.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/python/cpp/try_cast.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/python/postprocess_stubs.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/python/src/sleipnir/autodiff/__init__.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/python/src/sleipnir/optimization/__init__.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/python/test/autodiff/gradient_test.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/python/test/autodiff/hessian_test.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/python/test/autodiff/jacobian_test.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/python/test/autodiff/real_test.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/python/test/optimization/arm_on_elevator_problem_test.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/python/test/optimization/cart_pole_ocp_test.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/python/test/optimization/cart_pole_problem_test.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/python/test/optimization/cart_pole_util.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/python/test/optimization/constraints_test.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/python/test/optimization/differential_drive_ocp_test.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/python/test/optimization/differential_drive_problem_test.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/python/test/optimization/differential_drive_util.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/python/test/optimization/double_integrator_problem_test.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/python/test/optimization/flywheel_ocp_test.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/python/test/optimization/flywheel_problem_test.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/python/test/optimization/flywheel_util.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/python/test/optimization/linear_problem_test.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/python/test/optimization/multistart_test.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/python/test/optimization/nonlinear_problem_test.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/python/test/optimization/problem_spy_test.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/python/test/optimization/problem_variable_test.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/python/test/optimization/quadratic_problem_test.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/python/test/optimization/rk4.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/python/test/optimization/solver/exit_status_test.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/python/test/optimization/tolerance.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/python/test/optimization/trivial_problem_test.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/src/autodiff/gradient.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/src/autodiff/hessian.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/src/autodiff/jacobian.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/src/autodiff/matrix.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/src/optimization/ocp.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/src/optimization/problem.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/src/optimization/solver/ipm.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/src/optimization/solver/newton.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/src/optimization/solver/sqp.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/src/util/pool.cpp +0 -0
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
#include <array>
|
|
7
7
|
#include <concepts>
|
|
8
8
|
#include <cstddef>
|
|
9
|
+
#include <functional>
|
|
9
10
|
#include <initializer_list>
|
|
10
11
|
#include <iterator>
|
|
11
12
|
#include <span>
|
|
@@ -27,7 +28,6 @@
|
|
|
27
28
|
#include "sleipnir/util/assert.hpp"
|
|
28
29
|
#include "sleipnir/util/concepts.hpp"
|
|
29
30
|
#include "sleipnir/util/empty.hpp"
|
|
30
|
-
#include "sleipnir/util/function_ref.hpp"
|
|
31
31
|
#include "sleipnir/util/symbol_exports.hpp"
|
|
32
32
|
|
|
33
33
|
namespace slp {
|
|
@@ -911,18 +911,20 @@ class Matrix : public SleipnirBase {
|
|
|
911
911
|
return result;
|
|
912
912
|
}
|
|
913
913
|
|
|
914
|
-
/// Transforms the matrix coefficient-wise with
|
|
914
|
+
/// Transforms the matrix coefficient-wise with a unary operator.
|
|
915
915
|
///
|
|
916
|
+
/// @tparam F Unary operator type.
|
|
916
917
|
/// @param unary_op The unary operator to use for the transform operation.
|
|
917
|
-
/// @return Result of the unary operator.
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
918
|
+
/// @return Result of the unary operator. Its element type is the operator's
|
|
919
|
+
/// return type.
|
|
920
|
+
template <std::invocable<const Element&> F>
|
|
921
|
+
Matrix<detail::transform_result_t<F, const Element&>, Rows, Cols>
|
|
922
|
+
cwise_transform(F&& unary_op) const {
|
|
923
|
+
Matrix<detail::transform_result_t<F, const Element&>, Rows, Cols> result{
|
|
924
|
+
detail::empty, rows(), cols()};
|
|
925
|
+
|
|
926
|
+
for (int index = 0; index < rows() * cols(); ++index) {
|
|
927
|
+
result[index] = std::invoke(unary_op, m_storage[index]);
|
|
926
928
|
}
|
|
927
929
|
|
|
928
930
|
return result;
|
|
@@ -1346,6 +1348,18 @@ Matrix<Real<Scalar>, detail::rows_v<LHS>, detail::cols_v<LHS>> operator/(
|
|
|
1346
1348
|
return lhs / static_cast<Real<Scalar>>(rhs);
|
|
1347
1349
|
}
|
|
1348
1350
|
|
|
1351
|
+
/// Unary plus operator.
|
|
1352
|
+
///
|
|
1353
|
+
/// @tparam Mat Operand type.
|
|
1354
|
+
/// @param lhs Operand for unary plus.
|
|
1355
|
+
/// @return A copy of the operand.
|
|
1356
|
+
template <typename Mat>
|
|
1357
|
+
requires SleipnirType<Mat> && MatrixLike<Mat>
|
|
1358
|
+
Matrix<typename Mat::Element, detail::rows_v<Mat>, detail::cols_v<Mat>>
|
|
1359
|
+
operator+(const Mat& lhs) {
|
|
1360
|
+
return lhs;
|
|
1361
|
+
}
|
|
1362
|
+
|
|
1349
1363
|
/// Unary minus operator.
|
|
1350
1364
|
///
|
|
1351
1365
|
/// @tparam Mat Operand type.
|
|
@@ -1427,29 +1441,31 @@ auto operator-(const LHS& lhs, const RHS& rhs) {
|
|
|
1427
1441
|
return result;
|
|
1428
1442
|
}
|
|
1429
1443
|
|
|
1430
|
-
///
|
|
1444
|
+
/// Transforms two matrices coefficient-wise with a binary operator.
|
|
1431
1445
|
///
|
|
1432
|
-
/// @tparam
|
|
1446
|
+
/// @tparam Element Matrix element type.
|
|
1433
1447
|
/// @tparam Rows Number of rows at compile time.
|
|
1434
1448
|
/// @tparam Cols Number of columns at compile time.
|
|
1449
|
+
/// @tparam F Binary operator type.
|
|
1435
1450
|
/// @param lhs The left-hand side of the binary operator.
|
|
1436
1451
|
/// @param rhs The right-hand side of the binary operator.
|
|
1437
|
-
/// @param binary_op The binary operator to use for the
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1452
|
+
/// @param binary_op The binary operator to use for the transform operation.
|
|
1453
|
+
/// @return Result of the binary operator. Its element type is the operator's
|
|
1454
|
+
/// return type.
|
|
1455
|
+
template <typename Element, int Rows, int Cols,
|
|
1456
|
+
std::invocable<const Element&, const Element&> F>
|
|
1457
|
+
Matrix<detail::transform_result_t<F, const Element&, const Element&>, Rows,
|
|
1458
|
+
Cols>
|
|
1459
|
+
cwise_transform(const Matrix<Element, Rows, Cols>& lhs,
|
|
1460
|
+
const Matrix<Element, Rows, Cols>& rhs, F&& binary_op) {
|
|
1444
1461
|
slp_assert(lhs.rows() == rhs.rows() && lhs.cols() == rhs.cols());
|
|
1445
1462
|
|
|
1446
|
-
Matrix<
|
|
1447
|
-
|
|
1463
|
+
Matrix<detail::transform_result_t<F, const Element&, const Element&>, Rows,
|
|
1464
|
+
Cols>
|
|
1465
|
+
result{detail::empty, lhs.rows(), lhs.cols()};
|
|
1448
1466
|
|
|
1449
|
-
for (int
|
|
1450
|
-
|
|
1451
|
-
result[row, col] = binary_op(lhs[row, col], rhs[row, col]);
|
|
1452
|
-
}
|
|
1467
|
+
for (int index = 0; index < lhs.rows() * lhs.cols(); ++index) {
|
|
1468
|
+
result[index] = std::invoke(binary_op, lhs[index], rhs[index]);
|
|
1453
1469
|
}
|
|
1454
1470
|
|
|
1455
1471
|
return result;
|
|
@@ -1772,27 +1788,24 @@ MatB solve_closed_form(const MatA& A, const MatB& B) {
|
|
|
1772
1788
|
}
|
|
1773
1789
|
}
|
|
1774
1790
|
|
|
1775
|
-
} // namespace detail
|
|
1776
|
-
|
|
1777
1791
|
/// Solves the matrix equation AX = B for X.
|
|
1778
1792
|
///
|
|
1779
|
-
/// @tparam
|
|
1793
|
+
/// @tparam Element Element type.
|
|
1780
1794
|
/// @tparam RHS Type of B.
|
|
1781
1795
|
/// @param A The left-hand side.
|
|
1782
1796
|
/// @param B The right-hand side.
|
|
1783
1797
|
/// @return The solution X.
|
|
1784
|
-
template <typename
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
using Result = Matrix<Real<Scalar>, Dynamic, detail::cols_v<RHS>>;
|
|
1798
|
+
template <typename Element, typename RHS>
|
|
1799
|
+
Matrix<Element, Dynamic, cols_v<RHS>> solve(const Matrix<Element>& A,
|
|
1800
|
+
const RHS& B) {
|
|
1801
|
+
using Result = Matrix<Element, Dynamic, cols_v<RHS>>;
|
|
1789
1802
|
|
|
1790
1803
|
// m x n * n x p = m x p
|
|
1791
1804
|
slp_assert(A.rows() == B.rows());
|
|
1792
1805
|
|
|
1793
|
-
const Result b
|
|
1806
|
+
const Result b{B};
|
|
1794
1807
|
if (A.rows() == A.cols() && A.rows() >= 1 && A.rows() <= 4) {
|
|
1795
|
-
return
|
|
1808
|
+
return solve_closed_form(A, b);
|
|
1796
1809
|
} else if (A.rows() == A.cols()) {
|
|
1797
1810
|
return Result{A.to_eigen().lu().solve(b.to_eigen())};
|
|
1798
1811
|
} else {
|
|
@@ -1800,6 +1813,22 @@ Matrix<Real<Scalar>, Dynamic, detail::cols_v<RHS>> solve(
|
|
|
1800
1813
|
}
|
|
1801
1814
|
}
|
|
1802
1815
|
|
|
1816
|
+
} // namespace detail
|
|
1817
|
+
|
|
1818
|
+
/// Solves the matrix equation AX = B for X.
|
|
1819
|
+
///
|
|
1820
|
+
/// @tparam Scalar Scalar type.
|
|
1821
|
+
/// @tparam RHS Type of B.
|
|
1822
|
+
/// @param A The left-hand side.
|
|
1823
|
+
/// @param B The right-hand side.
|
|
1824
|
+
/// @return The solution X.
|
|
1825
|
+
template <typename Scalar, typename RHS>
|
|
1826
|
+
requires detail::RealMatrixOperand<RHS, Scalar>
|
|
1827
|
+
Matrix<Real<Scalar>, Dynamic, detail::cols_v<RHS>> solve(
|
|
1828
|
+
const RealMatrix<Scalar>& A, const RHS& B) {
|
|
1829
|
+
return detail::solve(A, B);
|
|
1830
|
+
}
|
|
1831
|
+
|
|
1803
1832
|
namespace detail {
|
|
1804
1833
|
|
|
1805
1834
|
/// Returns the variable's gradient tree.
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
#include <concepts>
|
|
6
6
|
#include <cstddef>
|
|
7
|
+
#include <functional>
|
|
7
8
|
#include <iterator>
|
|
8
9
|
#include <type_traits>
|
|
9
10
|
#include <utility>
|
|
@@ -16,10 +17,21 @@
|
|
|
16
17
|
#include "sleipnir/util/assert.hpp"
|
|
17
18
|
#include "sleipnir/util/concepts.hpp"
|
|
18
19
|
#include "sleipnir/util/empty.hpp"
|
|
19
|
-
#include "sleipnir/util/function_ref.hpp"
|
|
20
20
|
|
|
21
21
|
namespace slp {
|
|
22
22
|
|
|
23
|
+
namespace detail {
|
|
24
|
+
|
|
25
|
+
/// The matrix element type cwise_transform() produces.
|
|
26
|
+
///
|
|
27
|
+
/// @tparam F Operator type.
|
|
28
|
+
/// @tparam Args Operator argument types.
|
|
29
|
+
template <typename F, typename... Args>
|
|
30
|
+
using transform_result_t =
|
|
31
|
+
std::remove_cvref_t<std::invoke_result_t<F&, Args...>>;
|
|
32
|
+
|
|
33
|
+
} // namespace detail
|
|
34
|
+
|
|
23
35
|
/// A submatrix of autodiff expressions with reference semantics.
|
|
24
36
|
///
|
|
25
37
|
/// @tparam Mat The type of the matrix whose storage this class points to.
|
|
@@ -623,17 +635,21 @@ class Submatrix : public SleipnirBase {
|
|
|
623
635
|
return result;
|
|
624
636
|
}
|
|
625
637
|
|
|
626
|
-
/// Transforms the matrix coefficient-wise with
|
|
638
|
+
/// Transforms the matrix coefficient-wise with a unary operator.
|
|
627
639
|
///
|
|
640
|
+
/// @tparam F Unary operator type.
|
|
628
641
|
/// @param unary_op The unary operator to use for the transform operation.
|
|
629
|
-
/// @return Result of the unary operator.
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
642
|
+
/// @return Result of the unary operator. Its element type is the operator's
|
|
643
|
+
/// return type.
|
|
644
|
+
template <std::invocable<const Element&> F>
|
|
645
|
+
Matrix<detail::transform_result_t<F, const Element&>, Rows, Cols>
|
|
646
|
+
cwise_transform(F&& unary_op) const {
|
|
647
|
+
Matrix<detail::transform_result_t<F, const Element&>, Rows, Cols> result{
|
|
648
|
+
detail::empty, rows(), cols()};
|
|
633
649
|
|
|
634
650
|
for (int row = 0; row < rows(); ++row) {
|
|
635
651
|
for (int col = 0; col < cols(); ++col) {
|
|
636
|
-
result[row, col] = unary_op(
|
|
652
|
+
result[row, col] = std::invoke(unary_op, (*this)[row, col]);
|
|
637
653
|
}
|
|
638
654
|
}
|
|
639
655
|
|
|
@@ -34,7 +34,7 @@ inline constexpr std::array<
|
|
|
34
34
|
|
|
35
35
|
/// Unary ufuncs and the operators that compute them.
|
|
36
36
|
inline constexpr std::array<std::pair<std::string_view, const char*>, 2>
|
|
37
|
-
unary_operator_ufuncs{{{"
|
|
37
|
+
unary_operator_ufuncs{{{"positive", "__pos__"}, {"negative", "__neg__"}}};
|
|
38
38
|
|
|
39
39
|
/// Returns the name of the autodiff function that computes a NumPy ufunc.
|
|
40
40
|
///
|
|
@@ -166,7 +166,7 @@ void bind_real(nb::module_& autodiff, nb::class_<Real<double>>& cls) {
|
|
|
166
166
|
[](Real<double>* self, RealScalar value) {
|
|
167
167
|
new (self) Real<double>{value.value};
|
|
168
168
|
},
|
|
169
|
-
"value"_a, DOC(slp, Real, Real,
|
|
169
|
+
"value"_a, DOC(slp, Real, Real, 3));
|
|
170
170
|
nb::implicitly_convertible<RealScalar, Real<double>>();
|
|
171
171
|
cls.def(
|
|
172
172
|
"set_value",
|
|
@@ -193,6 +193,33 @@ void bind_real(nb::module_& autodiff, nb::class_<Real<double>>& cls) {
|
|
|
193
193
|
}
|
|
194
194
|
});
|
|
195
195
|
|
|
196
|
+
cls.def(
|
|
197
|
+
"__add__",
|
|
198
|
+
[](const Real<double>& lhs, const RealMatrix<double>& rhs) {
|
|
199
|
+
return lhs + Real<double>{rhs};
|
|
200
|
+
},
|
|
201
|
+
nb::is_operator(), "rhs"_a);
|
|
202
|
+
cls.def(
|
|
203
|
+
"__sub__",
|
|
204
|
+
[](const Real<double>& lhs, const RealMatrix<double>& rhs) {
|
|
205
|
+
return lhs - Real<double>{rhs};
|
|
206
|
+
},
|
|
207
|
+
nb::is_operator(), "rhs"_a);
|
|
208
|
+
cls.def(
|
|
209
|
+
"__iadd__",
|
|
210
|
+
[](Real<double>& lhs, const RealMatrix<double>& rhs) -> Real<double>& {
|
|
211
|
+
return lhs += Real<double>{rhs};
|
|
212
|
+
},
|
|
213
|
+
nb::is_operator(), nb::rv_policy::move, "rhs"_a,
|
|
214
|
+
DOC(slp, Real, operator, iadd));
|
|
215
|
+
cls.def(
|
|
216
|
+
"__isub__",
|
|
217
|
+
[](Real<double>& lhs, const RealMatrix<double>& rhs) -> Real<double>& {
|
|
218
|
+
return lhs -= Real<double>{rhs};
|
|
219
|
+
},
|
|
220
|
+
nb::is_operator(), nb::rv_policy::move, "rhs"_a,
|
|
221
|
+
DOC(slp, Real, operator, isub));
|
|
222
|
+
|
|
196
223
|
// Scalar-matrix multiplication and division with NumPy arrays. These are also
|
|
197
224
|
// handled by __array_ufunc__ below, but type checkers only see these
|
|
198
225
|
// overloads.
|
|
@@ -219,9 +246,9 @@ void bind_real(nb::module_& autodiff, nb::class_<Real<double>>& cls) {
|
|
|
219
246
|
cls.def(
|
|
220
247
|
"__pow__",
|
|
221
248
|
[](const Real<double>& self, int power) { return pow(self, power); },
|
|
222
|
-
nb::is_operator(), "power"_a);
|
|
223
|
-
cls.def(-nb::self);
|
|
249
|
+
nb::is_operator(), "power"_a, DOC(slp, pow, 2));
|
|
224
250
|
cls.def(+nb::self);
|
|
251
|
+
cls.def(-nb::self);
|
|
225
252
|
|
|
226
253
|
// Comparison operators
|
|
227
254
|
def_real_scalar_comparisons(cls);
|
|
@@ -281,7 +308,7 @@ void bind_real(nb::module_& autodiff, nb::class_<Real<double>>& cls) {
|
|
|
281
308
|
nb::overload_cast<const V&, const V&>(&min<double>), "a"_a,
|
|
282
309
|
"b"_a, DOC(slp, min));
|
|
283
310
|
def_binary_math(autodiff, "pow", &pow<double>, "base"_a, "power"_a,
|
|
284
|
-
DOC(slp, pow));
|
|
311
|
+
DOC(slp, pow, 3));
|
|
285
312
|
def_unary_math(autodiff, "sign", &sign<double>, "x"_a, DOC(slp, sign));
|
|
286
313
|
def_unary_math(autodiff, "sin", &sin<double>, "x"_a, DOC(slp, sin));
|
|
287
314
|
def_unary_math(autodiff, "sinh", &sinh<double>, "x"_a, DOC(slp, sinh));
|
|
@@ -49,7 +49,7 @@ void bind_real_matrix(nb::module_& autodiff,
|
|
|
49
49
|
cls.def(nb::init<int, int>(), "rows"_a, "cols"_a,
|
|
50
50
|
DOC(slp, Matrix, Matrix, 3));
|
|
51
51
|
cls.def(nb::init<const std::vector<std::vector<Real<double>>>&>(), "list"_a,
|
|
52
|
-
DOC(slp, Matrix, Matrix,
|
|
52
|
+
DOC(slp, Matrix, Matrix, 7));
|
|
53
53
|
// RealScalar rejects complex NumPy scalars, which double's caster converts by
|
|
54
54
|
// dropping the imaginary part
|
|
55
55
|
cls.def(
|
|
@@ -178,7 +178,7 @@ void bind_real_matrix(nb::module_& autodiff,
|
|
|
178
178
|
|
|
179
179
|
return self[row_slice, row_slice_length, col_slice, col_slice_length];
|
|
180
180
|
},
|
|
181
|
-
nb::keep_alive<0, 1>(), "slices"_a, DOC(slp, Matrix, operator, array));
|
|
181
|
+
nb::keep_alive<0, 1>(), "slices"_a, DOC(slp, Matrix, operator, array, 7));
|
|
182
182
|
// Python has no row and column vector types, so these return dynamic blocks
|
|
183
183
|
cls.def(
|
|
184
184
|
"row",
|
|
@@ -237,7 +237,8 @@ void bind_real_matrix(nb::module_& autodiff,
|
|
|
237
237
|
|
|
238
238
|
cls.def(nb::self + nb::self, "rhs"_a);
|
|
239
239
|
cls.def(nb::self - nb::self, "rhs"_a);
|
|
240
|
-
cls.def(
|
|
240
|
+
cls.def(+nb::self, DOC(slp, operator, add));
|
|
241
|
+
cls.def(-nb::self, DOC(slp, operator, sub));
|
|
241
242
|
|
|
242
243
|
// RealMatrix-scalar/scalar-matrix operations
|
|
243
244
|
cls.def(nb::self * Real<double>(), "rhs"_a);
|
|
@@ -378,13 +379,13 @@ void bind_real_matrix(nb::module_& autodiff,
|
|
|
378
379
|
nb::keep_alive<0, 1>());
|
|
379
380
|
|
|
380
381
|
autodiff.def(
|
|
381
|
-
"
|
|
382
|
+
"cwise_map",
|
|
382
383
|
[](const RealMatrix<double>& lhs, const RealMatrix<double>& rhs,
|
|
383
384
|
const std::function<Real<double>(const Real<double>& x,
|
|
384
385
|
const Real<double>& y)>& binary_op) {
|
|
385
|
-
return
|
|
386
|
+
return cwise_transform(lhs, rhs, binary_op);
|
|
386
387
|
},
|
|
387
|
-
"lhs"_a, "rhs"_a, "binary_op"_a, DOC(slp,
|
|
388
|
+
"lhs"_a, "rhs"_a, "binary_op"_a, DOC(slp, cwise_transform));
|
|
388
389
|
|
|
389
390
|
autodiff.def(
|
|
390
391
|
"block",
|
|
@@ -139,7 +139,8 @@ void bind_real_submatrix(nb::module_& autodiff,
|
|
|
139
139
|
|
|
140
140
|
return self[row_slice, row_slice_length, col_slice, col_slice_length];
|
|
141
141
|
},
|
|
142
|
-
nb::keep_alive<0, 1>(),
|
|
142
|
+
nb::keep_alive<0, 1>(), "slices"_a,
|
|
143
|
+
DOC(slp, Submatrix, operator, array, 7));
|
|
143
144
|
// Python has no row and column vector types, so these return dynamic blocks
|
|
144
145
|
cls.def(
|
|
145
146
|
"row",
|
|
@@ -185,7 +186,8 @@ void bind_real_submatrix(nb::module_& autodiff,
|
|
|
185
186
|
|
|
186
187
|
cls.def(nb::self + nb::self, "rhs"_a);
|
|
187
188
|
cls.def(nb::self - nb::self, "rhs"_a);
|
|
188
|
-
cls.def(
|
|
189
|
+
cls.def(+nb::self, DOC(slp, operator, add));
|
|
190
|
+
cls.def(-nb::self, DOC(slp, operator, sub));
|
|
189
191
|
|
|
190
192
|
// RealMatrix-scalar/scalar-matrix operations
|
|
191
193
|
cls.def(nb::self * Real<double>(), "rhs"_a);
|
|
@@ -813,13 +813,17 @@ Returns:
|
|
|
813
813
|
)doc";
|
|
814
814
|
|
|
815
815
|
constexpr char mkd_doc_slp_Matrix_cwise_transform[] =
|
|
816
|
-
R"doc(Transforms the matrix coefficient-wise with
|
|
816
|
+
R"doc(Transforms the matrix coefficient-wise with a unary operator.
|
|
817
817
|
|
|
818
818
|
Args:
|
|
819
819
|
unary_op: The unary operator to use for the transform operation.
|
|
820
820
|
|
|
821
|
+
Template Args:
|
|
822
|
+
F: Unary operator type.
|
|
823
|
+
|
|
821
824
|
Returns:
|
|
822
|
-
Result of the unary operator.
|
|
825
|
+
Result of the unary operator. Its element type is the operator's
|
|
826
|
+
return type.
|
|
823
827
|
|
|
824
828
|
)doc";
|
|
825
829
|
|
|
@@ -2206,13 +2210,17 @@ Returns:
|
|
|
2206
2210
|
)doc";
|
|
2207
2211
|
|
|
2208
2212
|
constexpr char mkd_doc_slp_Submatrix_cwise_transform[] =
|
|
2209
|
-
R"doc(Transforms the matrix coefficient-wise with
|
|
2213
|
+
R"doc(Transforms the matrix coefficient-wise with a unary operator.
|
|
2210
2214
|
|
|
2211
2215
|
Args:
|
|
2212
2216
|
unary_op: The unary operator to use for the transform operation.
|
|
2213
2217
|
|
|
2218
|
+
Template Args:
|
|
2219
|
+
F: Unary operator type.
|
|
2220
|
+
|
|
2214
2221
|
Returns:
|
|
2215
|
-
Result of the unary operator.
|
|
2222
|
+
Result of the unary operator. Its element type is the operator's
|
|
2223
|
+
return type.
|
|
2216
2224
|
|
|
2217
2225
|
)doc";
|
|
2218
2226
|
|
|
@@ -2909,18 +2917,23 @@ Template Args:
|
|
|
2909
2917
|
|
|
2910
2918
|
)doc";
|
|
2911
2919
|
|
|
2912
|
-
constexpr char
|
|
2913
|
-
R"doc(
|
|
2920
|
+
constexpr char mkd_doc_slp_cwise_transform[] =
|
|
2921
|
+
R"doc(Transforms two matrices coefficient-wise with a binary operator.
|
|
2914
2922
|
|
|
2915
2923
|
Args:
|
|
2916
2924
|
lhs: The left-hand side of the binary operator.
|
|
2917
2925
|
rhs: The right-hand side of the binary operator.
|
|
2918
|
-
binary_op: The binary operator to use for the
|
|
2926
|
+
binary_op: The binary operator to use for the transform operation.
|
|
2919
2927
|
|
|
2920
2928
|
Template Args:
|
|
2921
|
-
|
|
2929
|
+
Element: Matrix element type.
|
|
2922
2930
|
Rows: Number of rows at compile time.
|
|
2923
2931
|
Cols: Number of columns at compile time.
|
|
2932
|
+
F: Binary operator type.
|
|
2933
|
+
|
|
2934
|
+
Returns:
|
|
2935
|
+
Result of the binary operator. Its element type is the operator's
|
|
2936
|
+
return type.
|
|
2924
2937
|
|
|
2925
2938
|
)doc";
|
|
2926
2939
|
|
|
@@ -2977,6 +2990,22 @@ Returns:
|
|
|
2977
2990
|
|
|
2978
2991
|
constexpr char mkd_doc_slp_detail_gradient_tree_2[] = R"doc()doc";
|
|
2979
2992
|
|
|
2993
|
+
constexpr char mkd_doc_slp_detail_solve[] =
|
|
2994
|
+
R"doc(Solves the matrix equation AX = B for X.
|
|
2995
|
+
|
|
2996
|
+
Args:
|
|
2997
|
+
A: The left-hand side.
|
|
2998
|
+
B: The right-hand side.
|
|
2999
|
+
|
|
3000
|
+
Template Args:
|
|
3001
|
+
Element: Element type.
|
|
3002
|
+
RHS: Type of B.
|
|
3003
|
+
|
|
3004
|
+
Returns:
|
|
3005
|
+
The solution X.
|
|
3006
|
+
|
|
3007
|
+
)doc";
|
|
3008
|
+
|
|
2980
3009
|
constexpr char mkd_doc_slp_detail_solve_closed_form[] =
|
|
2981
3010
|
R"doc(Solves the matrix equation AX = B for X with a closed-form inverse of
|
|
2982
3011
|
A.
|
|
@@ -3230,6 +3259,20 @@ Template Args:
|
|
|
3230
3259
|
)doc";
|
|
3231
3260
|
|
|
3232
3261
|
constexpr char mkd_doc_slp_operator_add[] =
|
|
3262
|
+
R"doc(Unary plus operator.
|
|
3263
|
+
|
|
3264
|
+
Args:
|
|
3265
|
+
lhs: Operand for unary plus.
|
|
3266
|
+
|
|
3267
|
+
Template Args:
|
|
3268
|
+
Mat: Operand type.
|
|
3269
|
+
|
|
3270
|
+
Returns:
|
|
3271
|
+
A copy of the operand.
|
|
3272
|
+
|
|
3273
|
+
)doc";
|
|
3274
|
+
|
|
3275
|
+
constexpr char mkd_doc_slp_operator_add_2[] =
|
|
3233
3276
|
R"doc(Binary addition operator.
|
|
3234
3277
|
|
|
3235
3278
|
Args:
|
|
@@ -770,10 +770,10 @@ def test_constant_static_function() -> None:
|
|
|
770
770
|
assert A[row, col].value() == 2.0
|
|
771
771
|
|
|
772
772
|
|
|
773
|
-
def
|
|
773
|
+
def test_cwise_map_free_function() -> None:
|
|
774
774
|
A = RealMatrix([[2.0, 3.0, 4.0], [5.0, 6.0, 7.0]])
|
|
775
775
|
B = RealMatrix([[8.0, 9.0, 10.0], [11.0, 12.0, 13.0]])
|
|
776
|
-
result = autodiff.
|
|
776
|
+
result = autodiff.cwise_map(A, B, lambda a, b: a * b)
|
|
777
777
|
|
|
778
778
|
assert (result.value() == np.array([[16.0, 27.0, 40.0], [55.0, 72.0, 91.0]])).all()
|
|
779
779
|
|
{sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/CMakeLists.txt
RENAMED
|
File without changes
|
{sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/LICENSE.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -314,6 +314,13 @@ struct Expression {
|
|
|
314
314
|
rhs);
|
|
315
315
|
}
|
|
316
316
|
|
|
317
|
+
/// Unary plus operator.
|
|
318
|
+
///
|
|
319
|
+
/// @param lhs Operand of unary plus.
|
|
320
|
+
friend ExpressionPtr<Scalar> operator+(const ExpressionPtr<Scalar>& lhs) {
|
|
321
|
+
return lhs;
|
|
322
|
+
}
|
|
323
|
+
|
|
317
324
|
/// Unary minus operator.
|
|
318
325
|
///
|
|
319
326
|
/// @param lhs Operand of unary minus.
|
|
@@ -335,13 +342,6 @@ struct Expression {
|
|
|
335
342
|
lhs);
|
|
336
343
|
}
|
|
337
344
|
|
|
338
|
-
/// Unary plus operator.
|
|
339
|
-
///
|
|
340
|
-
/// @param lhs Operand of unary plus.
|
|
341
|
-
friend ExpressionPtr<Scalar> operator+(const ExpressionPtr<Scalar>& lhs) {
|
|
342
|
-
return lhs;
|
|
343
|
-
}
|
|
344
|
-
|
|
345
345
|
/// Runs a function on each argument.
|
|
346
346
|
///
|
|
347
347
|
/// @param func The function to run.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -311,16 +311,16 @@ class Real : public SleipnirBase {
|
|
|
311
311
|
return *this;
|
|
312
312
|
}
|
|
313
313
|
|
|
314
|
-
/// Unary minus operator.
|
|
315
|
-
///
|
|
316
|
-
/// @param lhs Operand for unary minus.
|
|
317
|
-
friend Real operator-(const Real& lhs) { return Real{-lhs.expr}; }
|
|
318
|
-
|
|
319
314
|
/// Unary plus operator.
|
|
320
315
|
///
|
|
321
316
|
/// @param lhs Operand for unary plus.
|
|
322
317
|
friend Real operator+(const Real& lhs) { return lhs; }
|
|
323
318
|
|
|
319
|
+
/// Unary minus operator.
|
|
320
|
+
///
|
|
321
|
+
/// @param lhs Operand for unary minus.
|
|
322
|
+
friend Real operator-(const Real& lhs) { return Real{-lhs.expr}; }
|
|
323
|
+
|
|
324
324
|
private:
|
|
325
325
|
/// The expression node
|
|
326
326
|
detail::ExpressionPtr<Scalar> expr =
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/pyproject.toml
RENAMED
|
File without changes
|
{sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/python/.clang-tidy
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sleipnirgroup_jormungandr-0.6.7.dev194 → sleipnirgroup_jormungandr-0.6.7.dev200}/src/util/pool.cpp
RENAMED
|
File without changes
|