sleipnirgroup-jormungandr 0.6.7.dev169__tar.gz → 0.6.7.dev171__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.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/PKG-INFO +1 -1
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/include/sleipnir/autodiff/real_matrix.hpp +76 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/include/sleipnir/autodiff/submatrix.hpp +15 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/include/sleipnir/util/concepts.hpp +6 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/python/cpp/autodiff/bind_real_matrix.cpp +14 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/python/cpp/autodiff/bind_submatrix.cpp +15 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/python/cpp/docstrings.hpp +16 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/python/postprocess_stubs.py +30 -4
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/python/src/sleipnir/__init__.py +1 -1
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/python/test/autodiff/real_matrix_test.py +51 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/CMakeLists.txt +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/LICENSE.txt +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/README.md +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/SleipnirConfig.cmake.in +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/cmake/BuildTypes.cmake +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/cmake/CompilerFlags.cmake +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/cmake/Pybind11Mkdoc.cmake +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/cmake/Pybind11MkdocPostprocess.cmake +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/cmake/SubdirList.cmake +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/cmake/aarch64-linux-gnu.cmake +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/cmake/arm-none-eabi.cmake +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/include/sleipnir/autodiff/expression.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/include/sleipnir/autodiff/expression_functions.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/include/sleipnir/autodiff/expression_graph.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/include/sleipnir/autodiff/expression_type.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/include/sleipnir/autodiff/gradient.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/include/sleipnir/autodiff/hessian.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/include/sleipnir/autodiff/jacobian.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/include/sleipnir/autodiff/real.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/include/sleipnir/autodiff/sleipnir_base.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/include/sleipnir/autodiff/slice.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/include/sleipnir/optimization/multistart.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/include/sleipnir/optimization/ocp/dynamics_type.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/include/sleipnir/optimization/ocp/timestep_method.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/include/sleipnir/optimization/ocp/transcription_method.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/include/sleipnir/optimization/ocp.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/include/sleipnir/optimization/problem.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/include/sleipnir/optimization/solver/control_flow.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/include/sleipnir/optimization/solver/exit_status.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/include/sleipnir/optimization/solver/ipm.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/include/sleipnir/optimization/solver/ipm_matrix_callbacks.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/include/sleipnir/optimization/solver/iteration_info.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/include/sleipnir/optimization/solver/newton.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/include/sleipnir/optimization/solver/newton_matrix_callbacks.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/include/sleipnir/optimization/solver/options.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/include/sleipnir/optimization/solver/sqp.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/include/sleipnir/optimization/solver/sqp_matrix_callbacks.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/include/sleipnir/optimization/solver/util/all_finite.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/include/sleipnir/optimization/solver/util/append_as_triplets.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/include/sleipnir/optimization/solver/util/barrier_parameter.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/include/sleipnir/optimization/solver/util/bounds.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/include/sleipnir/optimization/solver/util/constraint_violation.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/include/sleipnir/optimization/solver/util/dense_kkt_solver.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/include/sleipnir/optimization/solver/util/feasibility_restoration.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/include/sleipnir/optimization/solver/util/feasibility_restoration_cycle_detector.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/include/sleipnir/optimization/solver/util/filter.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/include/sleipnir/optimization/solver/util/first_derivatives.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/include/sleipnir/optimization/solver/util/fraction_to_the_boundary_rule.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/include/sleipnir/optimization/solver/util/function_values.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/include/sleipnir/optimization/solver/util/iterates.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/include/sleipnir/optimization/solver/util/kkt_error.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/include/sleipnir/optimization/solver/util/kkt_solver.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/include/sleipnir/optimization/solver/util/kkt_system.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/include/sleipnir/optimization/solver/util/problem_scaling.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/include/sleipnir/optimization/solver/util/regularization_limits.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/include/sleipnir/optimization/solver/util/ruiz_equilibration.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/include/sleipnir/optimization/solver/util/sparse_inf_norms.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/include/sleipnir/optimization/solver/util/sparse_kkt_solver.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/include/sleipnir/optimization/solver/util/step.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/include/sleipnir/optimization/solver/util/time_trace.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/include/sleipnir/util/assert.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/include/sleipnir/util/empty.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/include/sleipnir/util/force_inline.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/include/sleipnir/util/function_ref.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/include/sleipnir/util/intrusive_shared_ptr.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/include/sleipnir/util/pool.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/include/sleipnir/util/print.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/include/sleipnir/util/print_diagnostics.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/include/sleipnir/util/scope_exit.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/include/sleipnir/util/spy.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/include/sleipnir/util/symbol_exports.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/include/sleipnir/util/time_tracer.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/pyproject.toml +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/python/.clang-tidy +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/python/cpp/arity.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/python/cpp/autodiff/bind_expression_type.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/python/cpp/autodiff/bind_gradient.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/python/cpp/autodiff/bind_hessian.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/python/cpp/autodiff/bind_jacobian.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/python/cpp/autodiff/bind_real.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/python/cpp/binders.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/python/cpp/for_each_type.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/python/cpp/main.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/python/cpp/optimization/bind_equality_constraints.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/python/cpp/optimization/bind_inequality_constraints.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/python/cpp/optimization/bind_ocp.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/python/cpp/optimization/bind_problem.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/python/cpp/optimization/ocp/bind_dynamics_type.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/python/cpp/optimization/ocp/bind_timestep_method.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/python/cpp/optimization/ocp/bind_transcription_method.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/python/cpp/optimization/solver/bind_exit_status.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/python/cpp/optimization/solver/bind_iteration_info.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/python/cpp/slice_tuple.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/python/cpp/text_wrap.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/python/cpp/try_cast.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/python/src/sleipnir/autodiff/__init__.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/python/src/sleipnir/optimization/__init__.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/python/test/autodiff/gradient_test.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/python/test/autodiff/hessian_test.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/python/test/autodiff/jacobian_test.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/python/test/autodiff/real_test.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/python/test/optimization/arm_on_elevator_problem_test.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/python/test/optimization/cart_pole_ocp_test.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/python/test/optimization/cart_pole_problem_test.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/python/test/optimization/cart_pole_util.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/python/test/optimization/constraints_test.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/python/test/optimization/differential_drive_ocp_test.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/python/test/optimization/differential_drive_problem_test.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/python/test/optimization/differential_drive_util.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/python/test/optimization/double_integrator_problem_test.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/python/test/optimization/flywheel_ocp_test.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/python/test/optimization/flywheel_problem_test.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/python/test/optimization/flywheel_util.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/python/test/optimization/linear_problem_test.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/python/test/optimization/multistart_test.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/python/test/optimization/nonlinear_problem_test.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/python/test/optimization/problem_spy_test.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/python/test/optimization/problem_variable_test.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/python/test/optimization/quadratic_problem_test.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/python/test/optimization/rk4.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/python/test/optimization/solver/exit_status_test.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/python/test/optimization/tolerance.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/python/test/optimization/trivial_problem_test.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/src/autodiff/gradient.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/src/autodiff/hessian.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/src/autodiff/jacobian.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/src/autodiff/real_matrix.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/src/optimization/ocp.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/src/optimization/problem.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/src/optimization/solver/ipm.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/src/optimization/solver/newton.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/src/optimization/solver/sqp.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/src/util/pool.cpp +0 -0
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
#include <Eigen/Core>
|
|
17
17
|
#include <Eigen/LU> // IWYU pragma: keep
|
|
18
18
|
#include <Eigen/QR> // IWYU pragma: keep
|
|
19
|
+
#include <Eigen/SparseCore>
|
|
19
20
|
#include <gch/small_vector.hpp>
|
|
20
21
|
|
|
21
22
|
#include "sleipnir/autodiff/expression_graph.hpp"
|
|
@@ -562,6 +563,66 @@ class RealMatrix : public SleipnirBase {
|
|
|
562
563
|
return result;
|
|
563
564
|
}
|
|
564
565
|
|
|
566
|
+
/// Sparse matrix multiplication operator.
|
|
567
|
+
///
|
|
568
|
+
/// @param lhs Operator left-hand side.
|
|
569
|
+
/// @param rhs Operator right-hand side.
|
|
570
|
+
template <EigenSparseMatrixLike LHS, SleipnirMatrixLike<Scalar> RHS>
|
|
571
|
+
requires std::same_as<typename std::decay_t<LHS>::Scalar, Scalar>
|
|
572
|
+
friend RealMatrix<Scalar> operator*(const LHS& lhs, const RHS& rhs) {
|
|
573
|
+
slp_assert(lhs.cols() == rhs.rows());
|
|
574
|
+
|
|
575
|
+
RealMatrix<Scalar> result(detail::empty, lhs.rows(), rhs.cols());
|
|
576
|
+
for (auto& elem : result) {
|
|
577
|
+
elem = Real{Scalar(0)};
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
// Binds without a copy if lhs is already a column-major SparseMatrix
|
|
581
|
+
const Eigen::SparseMatrix<Scalar>& A = lhs;
|
|
582
|
+
for (int outer = 0; outer < A.outerSize(); ++outer) {
|
|
583
|
+
for (typename Eigen::SparseMatrix<Scalar>::InnerIterator it{A, outer}; it;
|
|
584
|
+
++it) {
|
|
585
|
+
int i = static_cast<int>(it.row());
|
|
586
|
+
int k = static_cast<int>(it.col());
|
|
587
|
+
for (int j = 0; j < rhs.cols(); ++j) {
|
|
588
|
+
result[i, j] += it.value() * rhs[k, j];
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
return result;
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
/// Sparse matrix multiplication operator.
|
|
597
|
+
///
|
|
598
|
+
/// @param lhs Operator left-hand side.
|
|
599
|
+
/// @param rhs Operator right-hand side.
|
|
600
|
+
template <SleipnirMatrixLike<Scalar> LHS, EigenSparseMatrixLike RHS>
|
|
601
|
+
requires std::same_as<typename std::decay_t<RHS>::Scalar, Scalar>
|
|
602
|
+
friend RealMatrix<Scalar> operator*(const LHS& lhs, const RHS& rhs) {
|
|
603
|
+
slp_assert(lhs.cols() == rhs.rows());
|
|
604
|
+
|
|
605
|
+
RealMatrix<Scalar> result(detail::empty, lhs.rows(), rhs.cols());
|
|
606
|
+
for (auto& elem : result) {
|
|
607
|
+
elem = Real{Scalar(0)};
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
// Binds without a copy if rhs is already a column-major SparseMatrix
|
|
611
|
+
const Eigen::SparseMatrix<Scalar>& B = rhs;
|
|
612
|
+
for (int outer = 0; outer < B.outerSize(); ++outer) {
|
|
613
|
+
for (typename Eigen::SparseMatrix<Scalar>::InnerIterator it{B, outer}; it;
|
|
614
|
+
++it) {
|
|
615
|
+
int k = static_cast<int>(it.row());
|
|
616
|
+
int j = static_cast<int>(it.col());
|
|
617
|
+
for (int i = 0; i < lhs.rows(); ++i) {
|
|
618
|
+
result[i, j] += lhs[i, k] * it.value();
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
return result;
|
|
624
|
+
}
|
|
625
|
+
|
|
565
626
|
/// Matrix-scalar multiplication operator.
|
|
566
627
|
///
|
|
567
628
|
/// @param lhs Operator left-hand side.
|
|
@@ -904,6 +965,21 @@ class RealMatrix : public SleipnirBase {
|
|
|
904
965
|
return result;
|
|
905
966
|
}
|
|
906
967
|
|
|
968
|
+
/// Returns the trace of the variable matrix, the sum of its diagonal.
|
|
969
|
+
///
|
|
970
|
+
/// @return The trace of the variable matrix.
|
|
971
|
+
Real<Scalar> trace() const {
|
|
972
|
+
slp_assert(rows() == cols());
|
|
973
|
+
|
|
974
|
+
Real<Scalar> result{Scalar(0)};
|
|
975
|
+
|
|
976
|
+
for (int row = 0; row < rows(); ++row) {
|
|
977
|
+
result += (*this)[row, row];
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
return result;
|
|
981
|
+
}
|
|
982
|
+
|
|
907
983
|
/// Returns the number of rows in the matrix.
|
|
908
984
|
///
|
|
909
985
|
/// @return The number of rows in the matrix.
|
|
@@ -561,6 +561,21 @@ class Submatrix : public SleipnirBase {
|
|
|
561
561
|
return result;
|
|
562
562
|
}
|
|
563
563
|
|
|
564
|
+
/// Returns the trace of the variable matrix, the sum of its diagonal.
|
|
565
|
+
///
|
|
566
|
+
/// @return The trace of the variable matrix.
|
|
567
|
+
Real<Scalar> trace() const {
|
|
568
|
+
slp_assert(rows() == cols());
|
|
569
|
+
|
|
570
|
+
Real<Scalar> result{Scalar(0)};
|
|
571
|
+
|
|
572
|
+
for (int row = 0; row < rows(); ++row) {
|
|
573
|
+
result += (*this)[row, row];
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
return result;
|
|
577
|
+
}
|
|
578
|
+
|
|
564
579
|
/// Returns the number of rows in the matrix.
|
|
565
580
|
///
|
|
566
581
|
/// @return The number of rows in the matrix.
|
|
@@ -29,6 +29,12 @@ concept EigenMatrixLike =
|
|
|
29
29
|
std::derived_from<std::decay_t<T>, Eigen::MatrixBase<std::decay_t<T>>> &&
|
|
30
30
|
MatrixLike<T>;
|
|
31
31
|
|
|
32
|
+
template <typename T>
|
|
33
|
+
concept EigenSparseMatrixLike =
|
|
34
|
+
std::derived_from<std::decay_t<T>,
|
|
35
|
+
Eigen::SparseMatrixBase<std::decay_t<T>>> &&
|
|
36
|
+
MatrixLike<T>;
|
|
37
|
+
|
|
32
38
|
template <typename T, typename Scalar>
|
|
33
39
|
concept SleipnirMatrixLike =
|
|
34
40
|
SleipnirType<T> && MatrixLike<T> &&
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Sleipnir contributors
|
|
2
2
|
|
|
3
3
|
#include <nanobind/eigen/dense.h>
|
|
4
|
+
#include <nanobind/eigen/sparse.h>
|
|
4
5
|
#include <nanobind/make_iterator.h>
|
|
5
6
|
#include <nanobind/nanobind.h>
|
|
6
7
|
#include <nanobind/operators.h>
|
|
@@ -20,6 +21,7 @@
|
|
|
20
21
|
#include <vector>
|
|
21
22
|
|
|
22
23
|
#include <Eigen/Core>
|
|
24
|
+
#include <Eigen/SparseCore>
|
|
23
25
|
#include <sleipnir/autodiff/real.hpp>
|
|
24
26
|
#include <sleipnir/autodiff/real_matrix.hpp>
|
|
25
27
|
#include <sleipnir/autodiff/slice.hpp>
|
|
@@ -423,6 +425,7 @@ void bind_real_matrix(nb::module_& autodiff,
|
|
|
423
425
|
},
|
|
424
426
|
nb::is_operator(), "power"_a);
|
|
425
427
|
cls.def_prop_ro("T", &RealMatrix<double>::T, DOC(slp, RealMatrix, T));
|
|
428
|
+
cls.def("trace", &RealMatrix<double>::trace, DOC(slp, RealMatrix, trace));
|
|
426
429
|
cls.def("rows", &RealMatrix<double>::rows, DOC(slp, RealMatrix, rows));
|
|
427
430
|
cls.def("cols", &RealMatrix<double>::cols, DOC(slp, RealMatrix, cols));
|
|
428
431
|
cls.def_prop_ro("shape", [](const RealMatrix<double>& self) {
|
|
@@ -532,6 +535,17 @@ void bind_real_matrix(nb::module_& autodiff,
|
|
|
532
535
|
return solve(RealMatrix<double>(A), B);
|
|
533
536
|
},
|
|
534
537
|
"A"_a, "B"_a, DOC(slp, solve));
|
|
538
|
+
// RealMatrix multiplication with SciPy sparse matrices on the right. These
|
|
539
|
+
// come after every other overload because the sparse caster converts scalars
|
|
540
|
+
// to 1x1 matrices. SciPy sparse matrices on the left don't defer to reflected
|
|
541
|
+
// operators.
|
|
542
|
+
for (const char* name : {"__mul__", "__matmul__"}) {
|
|
543
|
+
cls.def(
|
|
544
|
+
name,
|
|
545
|
+
[](const RealMatrix<double>& lhs,
|
|
546
|
+
const Eigen::SparseMatrix<double>& rhs) { return lhs * rhs; },
|
|
547
|
+
nb::is_operator(), "rhs"_a);
|
|
548
|
+
}
|
|
535
549
|
}
|
|
536
550
|
|
|
537
551
|
} // namespace slp
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Sleipnir contributors
|
|
2
2
|
|
|
3
3
|
#include <nanobind/eigen/dense.h>
|
|
4
|
+
#include <nanobind/eigen/sparse.h>
|
|
4
5
|
#include <nanobind/make_iterator.h>
|
|
5
6
|
#include <nanobind/nanobind.h>
|
|
6
7
|
#include <nanobind/operators.h>
|
|
@@ -19,6 +20,7 @@
|
|
|
19
20
|
#include <tuple>
|
|
20
21
|
|
|
21
22
|
#include <Eigen/Core>
|
|
23
|
+
#include <Eigen/SparseCore>
|
|
22
24
|
#include <sleipnir/autodiff/real.hpp>
|
|
23
25
|
#include <sleipnir/autodiff/real_matrix.hpp>
|
|
24
26
|
#include <sleipnir/autodiff/slice.hpp>
|
|
@@ -389,6 +391,8 @@ void bind_submatrix(nb::class_<Submatrix<RealMatrix<double>>>& cls) {
|
|
|
389
391
|
nb::is_operator(), "power"_a);
|
|
390
392
|
cls.def_prop_ro("T", &Submatrix<RealMatrix<double>>::T,
|
|
391
393
|
DOC(slp, Submatrix, T));
|
|
394
|
+
cls.def("trace", &Submatrix<RealMatrix<double>>::trace,
|
|
395
|
+
DOC(slp, Submatrix, trace));
|
|
392
396
|
cls.def("rows", &Submatrix<RealMatrix<double>>::rows,
|
|
393
397
|
DOC(slp, Submatrix, rows));
|
|
394
398
|
cls.def("cols", &Submatrix<RealMatrix<double>>::cols,
|
|
@@ -472,6 +476,17 @@ void bind_submatrix(nb::class_<Submatrix<RealMatrix<double>>>& cls) {
|
|
|
472
476
|
"value_iterator", self.begin(), self.end());
|
|
473
477
|
},
|
|
474
478
|
nb::keep_alive<0, 1>());
|
|
479
|
+
// RealMatrix multiplication with SciPy sparse matrices on the right. These
|
|
480
|
+
// come after every other overload because the sparse caster converts scalars
|
|
481
|
+
// to 1x1 matrices. SciPy sparse matrices on the left don't defer to reflected
|
|
482
|
+
// operators.
|
|
483
|
+
for (const char* name : {"__mul__", "__matmul__"}) {
|
|
484
|
+
cls.def(
|
|
485
|
+
name,
|
|
486
|
+
[](const Submatrix<RealMatrix<double>>& lhs,
|
|
487
|
+
const Eigen::SparseMatrix<double>& rhs) { return lhs * rhs; },
|
|
488
|
+
nb::is_operator(), "rhs"_a);
|
|
489
|
+
}
|
|
475
490
|
}
|
|
476
491
|
|
|
477
492
|
} // namespace slp
|
|
@@ -1742,6 +1742,14 @@ Returns:
|
|
|
1742
1742
|
|
|
1743
1743
|
)doc";
|
|
1744
1744
|
|
|
1745
|
+
constexpr char mkd_doc_slp_RealMatrix_trace[] =
|
|
1746
|
+
R"doc(Returns the trace of the variable matrix, the sum of its diagonal.
|
|
1747
|
+
|
|
1748
|
+
Returns:
|
|
1749
|
+
The trace of the variable matrix.
|
|
1750
|
+
|
|
1751
|
+
)doc";
|
|
1752
|
+
|
|
1745
1753
|
constexpr char mkd_doc_slp_RealMatrix_value[] =
|
|
1746
1754
|
R"doc(Returns an element of the variable matrix.
|
|
1747
1755
|
|
|
@@ -2535,6 +2543,14 @@ Returns:
|
|
|
2535
2543
|
|
|
2536
2544
|
)doc";
|
|
2537
2545
|
|
|
2546
|
+
constexpr char mkd_doc_slp_Submatrix_trace[] =
|
|
2547
|
+
R"doc(Returns the trace of the variable matrix, the sum of its diagonal.
|
|
2548
|
+
|
|
2549
|
+
Returns:
|
|
2550
|
+
The trace of the variable matrix.
|
|
2551
|
+
|
|
2552
|
+
)doc";
|
|
2553
|
+
|
|
2538
2554
|
constexpr char mkd_doc_slp_Submatrix_value[] =
|
|
2539
2555
|
R"doc(Returns an element of the variable matrix.
|
|
2540
2556
|
|
|
@@ -9,6 +9,8 @@ stubgen can't express some things the bindings support at runtime:
|
|
|
9
9
|
RealMatrix, and float converts to Real. Every RealMatrix parameter also accepts a
|
|
10
10
|
Submatrix, and every Real parameter also accepts a float. Return types and
|
|
11
11
|
callback arguments are left alone since those are always RealMatrix or Real.
|
|
12
|
+
Sparse matrix parameters annotated as scipy.sparse.csc_matrix also accept
|
|
13
|
+
scipy.sparse.csr_matrix.
|
|
12
14
|
2. Sparse matrices are annotated as scipy.sparse.csc_matrix[float], but
|
|
13
15
|
scipy-stubs expects a NumPy numeric scalar type argument.
|
|
14
16
|
"""
|
|
@@ -52,6 +54,22 @@ REAL = re.compile(
|
|
|
52
54
|
)
|
|
53
55
|
|
|
54
56
|
|
|
57
|
+
# A CSC sparse matrix parameter. The bindings also accept CSR sparse matrices,
|
|
58
|
+
# which nanobind converts. The lookahead prevents already-widened annotations
|
|
59
|
+
# from matching again.
|
|
60
|
+
#
|
|
61
|
+
# x: scipy.sparse.csc_matrix[float]
|
|
62
|
+
# -> x: scipy.sparse.csc_matrix[float] | scipy.sparse.csr_matrix[float]
|
|
63
|
+
SPARSE = re.compile(
|
|
64
|
+
r"""
|
|
65
|
+
(?<![\w.]) # Not part of another name
|
|
66
|
+
scipy\.sparse\.csc_matrix\[(\w+)\] # Type name and scalar type
|
|
67
|
+
(?!\ \|\ scipy\.sparse\.csr_matrix\b) # Not already widened
|
|
68
|
+
""",
|
|
69
|
+
re.VERBOSE,
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
|
|
55
73
|
@dataclass(frozen=True)
|
|
56
74
|
class Widening:
|
|
57
75
|
"""A type that also accepts another type via implicit conversion."""
|
|
@@ -68,6 +86,11 @@ class Widening:
|
|
|
68
86
|
|
|
69
87
|
# \1 is "sleipnir._sleipnir.autodiff." prefix or empty
|
|
70
88
|
WIDENINGS = [
|
|
89
|
+
Widening(
|
|
90
|
+
SPARSE,
|
|
91
|
+
r"scipy.sparse.csr_matrix[\1]",
|
|
92
|
+
r"scipy.sparse.csc_matrix[\1] | scipy.sparse.csr_matrix[\1]",
|
|
93
|
+
),
|
|
71
94
|
Widening(MATRIX, r"\1Submatrix", r"\1RealMatrix | \1Submatrix"),
|
|
72
95
|
Widening(REAL, "float", r"\1Real | float"),
|
|
73
96
|
]
|
|
@@ -195,12 +218,15 @@ def widen_signatures(stub: str) -> str:
|
|
|
195
218
|
|
|
196
219
|
def fix_sparse_matrices(stub: str) -> str:
|
|
197
220
|
"""
|
|
198
|
-
Replaces scipy.sparse.csc_matrix[float]
|
|
199
|
-
scipy.sparse.csc_matrix[numpy.float64]
|
|
221
|
+
Replaces scipy.sparse.csc_matrix[float] and scipy.sparse.csr_matrix[float]
|
|
222
|
+
with scipy.sparse.csc_matrix[numpy.float64] and
|
|
223
|
+
scipy.sparse.csr_matrix[numpy.float64], since scipy-stubs requires a NumPy
|
|
200
224
|
numeric scalar type argument.
|
|
201
225
|
"""
|
|
202
|
-
return
|
|
203
|
-
"scipy
|
|
226
|
+
return re.sub(
|
|
227
|
+
r"scipy\.sparse\.(cs[cr]_matrix)\[float\]",
|
|
228
|
+
r"scipy.sparse.\1[numpy.float64]",
|
|
229
|
+
stub,
|
|
204
230
|
)
|
|
205
231
|
|
|
206
232
|
|
|
@@ -2,6 +2,7 @@ import math
|
|
|
2
2
|
import sys
|
|
3
3
|
|
|
4
4
|
import numpy as np
|
|
5
|
+
import scipy.sparse
|
|
5
6
|
from sleipnir import autodiff
|
|
6
7
|
from sleipnir.autodiff import ExpressionType, Real, RealMatrix
|
|
7
8
|
|
|
@@ -231,6 +232,46 @@ def test_subslicing() -> None:
|
|
|
231
232
|
).all()
|
|
232
233
|
|
|
233
234
|
|
|
235
|
+
def test_dense_matrix_multiplication() -> None:
|
|
236
|
+
A_dense = np.array([[1.0, 0.0, 2.0], [0.0, 3.0, 0.0], [-1.0, 0.0, 4.0]])
|
|
237
|
+
A = RealMatrix(A_dense)
|
|
238
|
+
B_dense = np.array([[1.0, 2.0], [3.0, 4.0], [5.0, 6.0]])
|
|
239
|
+
B = RealMatrix(B_dense)
|
|
240
|
+
|
|
241
|
+
# RealMatrix-RealMatrix
|
|
242
|
+
assert np.array_equal((A @ B).value(), A_dense @ B_dense)
|
|
243
|
+
assert np.array_equal((B.T @ A).value(), B_dense.T @ A_dense)
|
|
244
|
+
assert np.array_equal((A @ B[:, :1]).value(), A_dense @ B_dense[:, :1])
|
|
245
|
+
|
|
246
|
+
# NumPy-RealMatrix
|
|
247
|
+
assert np.array_equal((A_dense @ B).value(), A_dense @ B_dense)
|
|
248
|
+
assert np.array_equal((A_dense @ B[:, :1]).value(), A_dense @ B_dense[:, :1])
|
|
249
|
+
|
|
250
|
+
# RealMatrix-NumPy
|
|
251
|
+
assert np.array_equal((A @ B_dense).value(), A_dense @ B_dense)
|
|
252
|
+
assert np.array_equal((B.T @ A_dense).value(), B_dense.T @ A_dense)
|
|
253
|
+
assert np.array_equal((A @ B_dense[:, :1]).value(), A_dense @ B_dense[:, :1])
|
|
254
|
+
|
|
255
|
+
# RealMatrix-scalar
|
|
256
|
+
assert np.array_equal((B * 2.0).value(), B_dense * 2.0)
|
|
257
|
+
assert np.array_equal((2.0 * B).value(), 2.0 * B_dense)
|
|
258
|
+
assert np.array_equal((B[:, :1] * 2.0).value(), B_dense[:, :1] * 2.0)
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
def test_sparse_matrix_multiplication() -> None:
|
|
262
|
+
A_dense = np.array([[1.0, 0.0, 2.0], [0.0, 3.0, 0.0], [-1.0, 0.0, 4.0]])
|
|
263
|
+
B_dense = np.array([[1.0, 2.0], [3.0, 4.0], [5.0, 6.0]])
|
|
264
|
+
B = RealMatrix(B_dense)
|
|
265
|
+
|
|
266
|
+
sparse: list[scipy.sparse.csc_matrix | scipy.sparse.csr_matrix] = [
|
|
267
|
+
scipy.sparse.csc_matrix(A_dense),
|
|
268
|
+
scipy.sparse.csr_matrix(A_dense),
|
|
269
|
+
]
|
|
270
|
+
for A in sparse:
|
|
271
|
+
assert np.array_equal((B.T @ A).value(), B_dense.T @ A_dense)
|
|
272
|
+
assert np.array_equal((B[:, :1].T @ A).value(), B_dense[:, :1].T @ A_dense)
|
|
273
|
+
|
|
274
|
+
|
|
234
275
|
def test_compound_assignment_operators() -> None:
|
|
235
276
|
A1 = RealMatrix([[1]])
|
|
236
277
|
A2 = RealMatrix([[1, 2], [3, 4]])
|
|
@@ -276,6 +317,16 @@ def test_compound_assignment_operators() -> None:
|
|
|
276
317
|
assert (A2.value() == np.array([[1, 2], [3, 4]])).all()
|
|
277
318
|
|
|
278
319
|
|
|
320
|
+
def test_trace() -> None:
|
|
321
|
+
A = RealMatrix([[1.0, 2.0, 3.0], [4.0, 5.0, 6.0], [7.0, 8.0, 9.0]])
|
|
322
|
+
|
|
323
|
+
assert A.trace().value() == 15.0
|
|
324
|
+
|
|
325
|
+
# Block
|
|
326
|
+
assert A[1:3, 1:3].trace().value() == 14.0
|
|
327
|
+
assert A[0:2, 1:3].trace().value() == 8.0
|
|
328
|
+
|
|
329
|
+
|
|
279
330
|
def test_value() -> None:
|
|
280
331
|
A = RealMatrix([[1.0, 2.0, 3.0], [4.0, 5.0, 6.0], [7.0, 8.0, 9.0]])
|
|
281
332
|
expected = np.array([[1.0, 2.0, 3.0], [4.0, 5.0, 6.0], [7.0, 8.0, 9.0]])
|
{sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/CMakeLists.txt
RENAMED
|
File without changes
|
{sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/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
|
|
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.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/pyproject.toml
RENAMED
|
File without changes
|
{sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/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
|
{sleipnirgroup_jormungandr-0.6.7.dev169 → sleipnirgroup_jormungandr-0.6.7.dev171}/src/util/pool.cpp
RENAMED
|
File without changes
|