sleipnirgroup-jormungandr 0.6.7.dev191__tar.gz → 0.6.7.dev192__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.
Files changed (147) hide show
  1. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/PKG-INFO +1 -1
  2. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/include/sleipnir/autodiff/real.hpp +65 -45
  3. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/include/sleipnir/autodiff/real_matrix.hpp +11 -7
  4. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/include/sleipnir/autodiff/real_submatrix.hpp +11 -7
  5. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/include/sleipnir/util/concepts.hpp +29 -9
  6. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/python/cpp/autodiff/bind_real_matrix.cpp +9 -5
  7. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/python/cpp/autodiff/bind_real_submatrix.cpp +3 -3
  8. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/python/cpp/docstrings.hpp +10 -0
  9. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/python/src/sleipnir/__init__.py +1 -1
  10. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/CMakeLists.txt +0 -0
  11. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/LICENSE.txt +0 -0
  12. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/README.md +0 -0
  13. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/SleipnirConfig.cmake.in +0 -0
  14. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/cmake/BuildTypes.cmake +0 -0
  15. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/cmake/CompilerFlags.cmake +0 -0
  16. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/cmake/Pybind11Mkdoc.cmake +0 -0
  17. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/cmake/Pybind11MkdocPostprocess.cmake +0 -0
  18. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/cmake/SubdirList.cmake +0 -0
  19. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/cmake/aarch64-linux-gnu.cmake +0 -0
  20. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/cmake/arm-none-eabi.cmake +0 -0
  21. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/include/sleipnir/autodiff/expression.hpp +0 -0
  22. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/include/sleipnir/autodiff/expression_functions.hpp +0 -0
  23. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/include/sleipnir/autodiff/expression_graph.hpp +0 -0
  24. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/include/sleipnir/autodiff/expression_type.hpp +0 -0
  25. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/include/sleipnir/autodiff/gradient.hpp +0 -0
  26. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/include/sleipnir/autodiff/hessian.hpp +0 -0
  27. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/include/sleipnir/autodiff/jacobian.hpp +0 -0
  28. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/include/sleipnir/autodiff/sleipnir_base.hpp +0 -0
  29. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/include/sleipnir/autodiff/slice.hpp +0 -0
  30. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/include/sleipnir/optimization/multistart.hpp +0 -0
  31. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/include/sleipnir/optimization/ocp/dynamics_type.hpp +0 -0
  32. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/include/sleipnir/optimization/ocp/timestep_method.hpp +0 -0
  33. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/include/sleipnir/optimization/ocp/transcription_method.hpp +0 -0
  34. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/include/sleipnir/optimization/ocp.hpp +0 -0
  35. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/include/sleipnir/optimization/problem.hpp +0 -0
  36. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/include/sleipnir/optimization/solver/control_flow.hpp +0 -0
  37. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/include/sleipnir/optimization/solver/exit_status.hpp +0 -0
  38. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/include/sleipnir/optimization/solver/ipm.hpp +0 -0
  39. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/include/sleipnir/optimization/solver/ipm_matrix_callbacks.hpp +0 -0
  40. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/include/sleipnir/optimization/solver/iteration_info.hpp +0 -0
  41. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/include/sleipnir/optimization/solver/newton.hpp +0 -0
  42. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/include/sleipnir/optimization/solver/newton_matrix_callbacks.hpp +0 -0
  43. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/include/sleipnir/optimization/solver/options.hpp +0 -0
  44. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/include/sleipnir/optimization/solver/sqp.hpp +0 -0
  45. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/include/sleipnir/optimization/solver/sqp_matrix_callbacks.hpp +0 -0
  46. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/include/sleipnir/optimization/solver/util/all_finite.hpp +0 -0
  47. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/include/sleipnir/optimization/solver/util/append_as_triplets.hpp +0 -0
  48. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/include/sleipnir/optimization/solver/util/barrier_parameter.hpp +0 -0
  49. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/include/sleipnir/optimization/solver/util/bounds.hpp +0 -0
  50. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/include/sleipnir/optimization/solver/util/constraint_violation.hpp +0 -0
  51. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/include/sleipnir/optimization/solver/util/dense_kkt_solver.hpp +0 -0
  52. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/include/sleipnir/optimization/solver/util/feasibility_restoration.hpp +0 -0
  53. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/include/sleipnir/optimization/solver/util/feasibility_restoration_cycle_detector.hpp +0 -0
  54. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/include/sleipnir/optimization/solver/util/filter.hpp +0 -0
  55. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/include/sleipnir/optimization/solver/util/first_derivatives.hpp +0 -0
  56. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/include/sleipnir/optimization/solver/util/fraction_to_the_boundary_rule.hpp +0 -0
  57. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/include/sleipnir/optimization/solver/util/function_values.hpp +0 -0
  58. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/include/sleipnir/optimization/solver/util/iterates.hpp +0 -0
  59. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/include/sleipnir/optimization/solver/util/kkt_error.hpp +0 -0
  60. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/include/sleipnir/optimization/solver/util/kkt_solver.hpp +0 -0
  61. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/include/sleipnir/optimization/solver/util/kkt_system.hpp +0 -0
  62. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/include/sleipnir/optimization/solver/util/problem_scaling.hpp +0 -0
  63. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/include/sleipnir/optimization/solver/util/regularization_limits.hpp +0 -0
  64. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/include/sleipnir/optimization/solver/util/ruiz_equilibration.hpp +0 -0
  65. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/include/sleipnir/optimization/solver/util/sparse_inf_norms.hpp +0 -0
  66. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/include/sleipnir/optimization/solver/util/sparse_kkt_solver.hpp +0 -0
  67. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/include/sleipnir/optimization/solver/util/step.hpp +0 -0
  68. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/include/sleipnir/optimization/solver/util/time_trace.hpp +0 -0
  69. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/include/sleipnir/util/assert.hpp +0 -0
  70. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/include/sleipnir/util/empty.hpp +0 -0
  71. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/include/sleipnir/util/force_inline.hpp +0 -0
  72. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/include/sleipnir/util/function_ref.hpp +0 -0
  73. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/include/sleipnir/util/intrusive_shared_ptr.hpp +0 -0
  74. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/include/sleipnir/util/pool.hpp +0 -0
  75. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/include/sleipnir/util/print.hpp +0 -0
  76. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/include/sleipnir/util/print_diagnostics.hpp +0 -0
  77. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/include/sleipnir/util/scope_exit.hpp +0 -0
  78. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/include/sleipnir/util/spy.hpp +0 -0
  79. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/include/sleipnir/util/symbol_exports.hpp +0 -0
  80. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/include/sleipnir/util/time_tracer.hpp +0 -0
  81. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/pyproject.toml +0 -0
  82. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/python/.clang-tidy +0 -0
  83. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/python/cpp/arity.hpp +0 -0
  84. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/python/cpp/array_ufunc.hpp +0 -0
  85. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/python/cpp/autodiff/bind_expression_type.cpp +0 -0
  86. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/python/cpp/autodiff/bind_gradient.cpp +0 -0
  87. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/python/cpp/autodiff/bind_hessian.cpp +0 -0
  88. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/python/cpp/autodiff/bind_jacobian.cpp +0 -0
  89. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/python/cpp/autodiff/bind_real.cpp +0 -0
  90. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/python/cpp/binders.hpp +0 -0
  91. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/python/cpp/element_index.hpp +0 -0
  92. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/python/cpp/for_each_type.hpp +0 -0
  93. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/python/cpp/main.cpp +0 -0
  94. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/python/cpp/optimization/bind_equality_constraints.cpp +0 -0
  95. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/python/cpp/optimization/bind_inequality_constraints.cpp +0 -0
  96. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/python/cpp/optimization/bind_ocp.cpp +0 -0
  97. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/python/cpp/optimization/bind_problem.cpp +0 -0
  98. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/python/cpp/optimization/ocp/bind_dynamics_type.cpp +0 -0
  99. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/python/cpp/optimization/ocp/bind_timestep_method.cpp +0 -0
  100. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/python/cpp/optimization/ocp/bind_transcription_method.cpp +0 -0
  101. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/python/cpp/optimization/solver/bind_exit_status.cpp +0 -0
  102. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/python/cpp/optimization/solver/bind_iteration_info.cpp +0 -0
  103. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/python/cpp/real_scalar.hpp +0 -0
  104. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/python/cpp/real_scalar_comparisons.hpp +0 -0
  105. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/python/cpp/slice_tuple.hpp +0 -0
  106. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/python/cpp/text_wrap.hpp +0 -0
  107. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/python/cpp/try_cast.hpp +0 -0
  108. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/python/postprocess_stubs.py +0 -0
  109. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/python/src/sleipnir/autodiff/__init__.py +0 -0
  110. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/python/src/sleipnir/optimization/__init__.py +0 -0
  111. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/python/test/autodiff/gradient_test.py +0 -0
  112. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/python/test/autodiff/hessian_test.py +0 -0
  113. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/python/test/autodiff/jacobian_test.py +0 -0
  114. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/python/test/autodiff/real_matrix_test.py +0 -0
  115. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/python/test/autodiff/real_test.py +0 -0
  116. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/python/test/optimization/arm_on_elevator_problem_test.py +0 -0
  117. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/python/test/optimization/cart_pole_ocp_test.py +0 -0
  118. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/python/test/optimization/cart_pole_problem_test.py +0 -0
  119. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/python/test/optimization/cart_pole_util.py +0 -0
  120. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/python/test/optimization/constraints_test.py +0 -0
  121. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/python/test/optimization/differential_drive_ocp_test.py +0 -0
  122. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/python/test/optimization/differential_drive_problem_test.py +0 -0
  123. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/python/test/optimization/differential_drive_util.py +0 -0
  124. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/python/test/optimization/double_integrator_problem_test.py +0 -0
  125. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/python/test/optimization/flywheel_ocp_test.py +0 -0
  126. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/python/test/optimization/flywheel_problem_test.py +0 -0
  127. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/python/test/optimization/flywheel_util.py +0 -0
  128. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/python/test/optimization/linear_problem_test.py +0 -0
  129. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/python/test/optimization/multistart_test.py +0 -0
  130. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/python/test/optimization/nonlinear_problem_test.py +0 -0
  131. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/python/test/optimization/problem_spy_test.py +0 -0
  132. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/python/test/optimization/problem_variable_test.py +0 -0
  133. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/python/test/optimization/quadratic_problem_test.py +0 -0
  134. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/python/test/optimization/rk4.py +0 -0
  135. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/python/test/optimization/solver/exit_status_test.py +0 -0
  136. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/python/test/optimization/tolerance.py +0 -0
  137. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/python/test/optimization/trivial_problem_test.py +0 -0
  138. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/src/autodiff/gradient.cpp +0 -0
  139. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/src/autodiff/hessian.cpp +0 -0
  140. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/src/autodiff/jacobian.cpp +0 -0
  141. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/src/autodiff/real_matrix.cpp +0 -0
  142. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/src/optimization/ocp.cpp +0 -0
  143. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/src/optimization/problem.cpp +0 -0
  144. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/src/optimization/solver/ipm.cpp +0 -0
  145. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/src/optimization/solver/newton.cpp +0 -0
  146. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/src/optimization/solver/sqp.cpp +0 -0
  147. {sleipnirgroup_jormungandr-0.6.7.dev191 → sleipnirgroup_jormungandr-0.6.7.dev192}/src/util/pool.cpp +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sleipnirgroup-jormungandr
3
- Version: 0.6.7.dev191
3
+ Version: 0.6.7.dev192
4
4
  Summary: Reverse mode autodiff library and NLP solver DSL
5
5
  License-Expression: BSD-3-Clause
6
6
  License-File: LICENSE.txt
@@ -874,9 +874,9 @@ struct EqualityConstraints {
874
874
  /// @param lhs Left-hand side.
875
875
  /// @param rhs Right-hand side.
876
876
  template <typename LHS, typename RHS>
877
- requires(ScalarLike<LHS> || MatrixLike<LHS>) &&
878
- (ScalarLike<RHS> || MatrixLike<RHS>) &&
879
- (SleipnirType<LHS> || SleipnirType<RHS>)
877
+ requires detail::RealComparisonOperand<LHS, Scalar> &&
878
+ detail::RealComparisonOperand<RHS, Scalar> &&
879
+ (SleipnirType<LHS> || SleipnirType<RHS>)
880
880
  EqualityConstraints(LHS&& lhs, RHS&& rhs)
881
881
  : constraints{make_constraints<Scalar>(lhs, rhs)} {}
882
882
 
@@ -944,9 +944,9 @@ struct InequalityConstraints {
944
944
  /// @param rhs Right-hand side.
945
945
  /// @param strict Whether the comparison is strict (lhs > rhs).
946
946
  template <typename LHS, typename RHS>
947
- requires(ScalarLike<LHS> || MatrixLike<LHS>) &&
948
- (ScalarLike<RHS> || MatrixLike<RHS>) &&
949
- (SleipnirType<LHS> || SleipnirType<RHS>)
947
+ requires detail::RealComparisonOperand<LHS, Scalar> &&
948
+ detail::RealComparisonOperand<RHS, Scalar> &&
949
+ (SleipnirType<LHS> || SleipnirType<RHS>)
950
950
  InequalityConstraints(LHS&& lhs, RHS&& rhs, bool strict = false)
951
951
  : constraints{make_constraints<Scalar>(lhs, rhs)},
952
952
  strict(constraints.size(), strict) {}
@@ -967,39 +967,45 @@ struct InequalityConstraints {
967
967
  ///
968
968
  /// @tparam LHS Left-hand side type.
969
969
  /// @tparam RHS Right-hand side type.
970
+ /// @tparam Scalar Scalar type.
970
971
  /// @param lhs Left-hand side.
971
972
  /// @param rhs Right-hand side.
972
- template <typename LHS, typename RHS>
973
- requires(ScalarLike<LHS> || MatrixLike<LHS>) && SleipnirType<LHS> &&
974
- (ScalarLike<RHS> || MatrixLike<RHS>) && (!SleipnirType<RHS>)
973
+ template <typename LHS, typename RHS,
974
+ typename Scalar = detail::operand_scalar_t<LHS, RHS>>
975
+ requires detail::RealComparisonOperand<LHS, Scalar> && SleipnirType<LHS> &&
976
+ detail::RealComparisonOperand<RHS, Scalar> && (!SleipnirType<RHS>)
975
977
  auto operator==(LHS&& lhs, RHS&& rhs) {
976
- return EqualityConstraints<typename std::decay_t<LHS>::Scalar>{lhs, rhs};
978
+ return EqualityConstraints<Scalar>{lhs, rhs};
977
979
  }
978
980
 
979
981
  /// Equality operator that returns an equality constraint for two Reals.
980
982
  ///
981
983
  /// @tparam LHS Left-hand side type.
982
984
  /// @tparam RHS Right-hand side type.
985
+ /// @tparam Scalar Scalar type.
983
986
  /// @param lhs Left-hand side.
984
987
  /// @param rhs Right-hand side.
985
- template <typename LHS, typename RHS>
986
- requires(ScalarLike<LHS> || MatrixLike<LHS>) && (!SleipnirType<LHS>) &&
987
- (ScalarLike<RHS> || MatrixLike<RHS>) && SleipnirType<RHS>
988
+ template <typename LHS, typename RHS,
989
+ typename Scalar = detail::operand_scalar_t<LHS, RHS>>
990
+ requires detail::RealComparisonOperand<LHS, Scalar> && (!SleipnirType<LHS>) &&
991
+ detail::RealComparisonOperand<RHS, Scalar> && SleipnirType<RHS>
988
992
  auto operator==(LHS&& lhs, RHS&& rhs) {
989
- return EqualityConstraints<typename std::decay_t<RHS>::Scalar>{lhs, rhs};
993
+ return EqualityConstraints<Scalar>{lhs, rhs};
990
994
  }
991
995
 
992
996
  /// Equality operator that returns an equality constraint for two Reals.
993
997
  ///
994
998
  /// @tparam LHS Left-hand side type.
995
999
  /// @tparam RHS Right-hand side type.
1000
+ /// @tparam Scalar Scalar type.
996
1001
  /// @param lhs Left-hand side.
997
1002
  /// @param rhs Right-hand side.
998
- template <typename LHS, typename RHS>
999
- requires(ScalarLike<LHS> || MatrixLike<LHS>) && SleipnirType<LHS> &&
1000
- (ScalarLike<RHS> || MatrixLike<RHS>) && SleipnirType<RHS>
1003
+ template <typename LHS, typename RHS,
1004
+ typename Scalar = detail::operand_scalar_t<LHS, RHS>>
1005
+ requires detail::RealComparisonOperand<LHS, Scalar> && SleipnirType<LHS> &&
1006
+ detail::RealComparisonOperand<RHS, Scalar> && SleipnirType<RHS>
1001
1007
  auto operator==(LHS&& lhs, RHS&& rhs) {
1002
- return EqualityConstraints<typename std::decay_t<LHS>::Scalar>{lhs, rhs};
1008
+ return EqualityConstraints<Scalar>{lhs, rhs};
1003
1009
  }
1004
1010
 
1005
1011
  /// Less-than comparison operator that returns an inequality constraint for two
@@ -1007,12 +1013,14 @@ auto operator==(LHS&& lhs, RHS&& rhs) {
1007
1013
  ///
1008
1014
  /// @tparam LHS Left-hand side type.
1009
1015
  /// @tparam RHS Right-hand side type.
1016
+ /// @tparam Scalar Scalar type.
1010
1017
  /// @param lhs Left-hand side.
1011
1018
  /// @param rhs Right-hand side.
1012
- template <typename LHS, typename RHS>
1013
- requires(ScalarLike<LHS> || MatrixLike<LHS>) &&
1014
- (ScalarLike<RHS> || MatrixLike<RHS>) &&
1015
- (SleipnirType<LHS> || SleipnirType<RHS>)
1019
+ template <typename LHS, typename RHS,
1020
+ typename Scalar = detail::operand_scalar_t<LHS, RHS>>
1021
+ requires detail::RealComparisonOperand<LHS, Scalar> &&
1022
+ detail::RealComparisonOperand<RHS, Scalar> &&
1023
+ (SleipnirType<LHS> || SleipnirType<RHS>)
1016
1024
  auto operator<(LHS&& lhs, RHS&& rhs) {
1017
1025
  return decltype(rhs >= lhs){rhs, lhs, true};
1018
1026
  }
@@ -1022,12 +1030,14 @@ auto operator<(LHS&& lhs, RHS&& rhs) {
1022
1030
  ///
1023
1031
  /// @tparam LHS Left-hand side type.
1024
1032
  /// @tparam RHS Right-hand side type.
1033
+ /// @tparam Scalar Scalar type.
1025
1034
  /// @param lhs Left-hand side.
1026
1035
  /// @param rhs Right-hand side.
1027
- template <typename LHS, typename RHS>
1028
- requires(ScalarLike<LHS> || MatrixLike<LHS>) &&
1029
- (ScalarLike<RHS> || MatrixLike<RHS>) &&
1030
- (SleipnirType<LHS> || SleipnirType<RHS>)
1036
+ template <typename LHS, typename RHS,
1037
+ typename Scalar = detail::operand_scalar_t<LHS, RHS>>
1038
+ requires detail::RealComparisonOperand<LHS, Scalar> &&
1039
+ detail::RealComparisonOperand<RHS, Scalar> &&
1040
+ (SleipnirType<LHS> || SleipnirType<RHS>)
1031
1041
  auto operator<=(LHS&& lhs, RHS&& rhs) {
1032
1042
  return rhs >= lhs;
1033
1043
  }
@@ -1037,12 +1047,14 @@ auto operator<=(LHS&& lhs, RHS&& rhs) {
1037
1047
  ///
1038
1048
  /// @tparam LHS Left-hand side type.
1039
1049
  /// @tparam RHS Right-hand side type.
1050
+ /// @tparam Scalar Scalar type.
1040
1051
  /// @param lhs Left-hand side.
1041
1052
  /// @param rhs Right-hand side.
1042
- template <typename LHS, typename RHS>
1043
- requires(ScalarLike<LHS> || MatrixLike<LHS>) &&
1044
- (ScalarLike<RHS> || MatrixLike<RHS>) &&
1045
- (SleipnirType<LHS> || SleipnirType<RHS>)
1053
+ template <typename LHS, typename RHS,
1054
+ typename Scalar = detail::operand_scalar_t<LHS, RHS>>
1055
+ requires detail::RealComparisonOperand<LHS, Scalar> &&
1056
+ detail::RealComparisonOperand<RHS, Scalar> &&
1057
+ (SleipnirType<LHS> || SleipnirType<RHS>)
1046
1058
  auto operator>(LHS&& lhs, RHS&& rhs) {
1047
1059
  return decltype(lhs >= rhs){lhs, rhs, true};
1048
1060
  }
@@ -1052,13 +1064,15 @@ auto operator>(LHS&& lhs, RHS&& rhs) {
1052
1064
  ///
1053
1065
  /// @tparam LHS Left-hand side type.
1054
1066
  /// @tparam RHS Right-hand side type.
1067
+ /// @tparam Scalar Scalar type.
1055
1068
  /// @param lhs Left-hand side.
1056
1069
  /// @param rhs Right-hand side.
1057
- template <typename LHS, typename RHS>
1058
- requires(ScalarLike<LHS> || MatrixLike<LHS>) && SleipnirType<LHS> &&
1059
- (ScalarLike<RHS> || MatrixLike<RHS>) && (!SleipnirType<RHS>)
1070
+ template <typename LHS, typename RHS,
1071
+ typename Scalar = detail::operand_scalar_t<LHS, RHS>>
1072
+ requires detail::RealComparisonOperand<LHS, Scalar> && SleipnirType<LHS> &&
1073
+ detail::RealComparisonOperand<RHS, Scalar> && (!SleipnirType<RHS>)
1060
1074
  auto operator>=(LHS&& lhs, RHS&& rhs) {
1061
- return InequalityConstraints<typename std::decay_t<LHS>::Scalar>{lhs, rhs};
1075
+ return InequalityConstraints<Scalar>{lhs, rhs};
1062
1076
  }
1063
1077
 
1064
1078
  /// Greater-than-or-equal-to comparison operator that returns an inequality
@@ -1066,13 +1080,15 @@ auto operator>=(LHS&& lhs, RHS&& rhs) {
1066
1080
  ///
1067
1081
  /// @tparam LHS Left-hand side type.
1068
1082
  /// @tparam RHS Right-hand side type.
1083
+ /// @tparam Scalar Scalar type.
1069
1084
  /// @param lhs Left-hand side.
1070
1085
  /// @param rhs Right-hand side.
1071
- template <typename LHS, typename RHS>
1072
- requires(ScalarLike<LHS> || MatrixLike<LHS>) && (!SleipnirType<LHS>) &&
1073
- (ScalarLike<RHS> || MatrixLike<RHS>) && SleipnirType<RHS>
1086
+ template <typename LHS, typename RHS,
1087
+ typename Scalar = detail::operand_scalar_t<LHS, RHS>>
1088
+ requires detail::RealComparisonOperand<LHS, Scalar> && (!SleipnirType<LHS>) &&
1089
+ detail::RealComparisonOperand<RHS, Scalar> && SleipnirType<RHS>
1074
1090
  auto operator>=(LHS&& lhs, RHS&& rhs) {
1075
- return InequalityConstraints<typename std::decay_t<RHS>::Scalar>{lhs, rhs};
1091
+ return InequalityConstraints<Scalar>{lhs, rhs};
1076
1092
  }
1077
1093
 
1078
1094
  /// Greater-than-or-equal-to comparison operator that returns an inequality
@@ -1080,13 +1096,15 @@ auto operator>=(LHS&& lhs, RHS&& rhs) {
1080
1096
  ///
1081
1097
  /// @tparam LHS Left-hand side type.
1082
1098
  /// @tparam RHS Right-hand side type.
1099
+ /// @tparam Scalar Scalar type.
1083
1100
  /// @param lhs Left-hand side.
1084
1101
  /// @param rhs Right-hand side.
1085
- template <typename LHS, typename RHS>
1086
- requires(ScalarLike<LHS> || MatrixLike<LHS>) && SleipnirType<LHS> &&
1087
- (ScalarLike<RHS> || MatrixLike<RHS>) && SleipnirType<RHS>
1102
+ template <typename LHS, typename RHS,
1103
+ typename Scalar = detail::operand_scalar_t<LHS, RHS>>
1104
+ requires detail::RealComparisonOperand<LHS, Scalar> && SleipnirType<LHS> &&
1105
+ detail::RealComparisonOperand<RHS, Scalar> && SleipnirType<RHS>
1088
1106
  auto operator>=(LHS&& lhs, RHS&& rhs) {
1089
- return InequalityConstraints<typename std::decay_t<LHS>::Scalar>{lhs, rhs};
1107
+ return InequalityConstraints<Scalar>{lhs, rhs};
1090
1108
  }
1091
1109
 
1092
1110
  /// Returns t if the equality constraint cond is satisfied, otherwise f.
@@ -1142,12 +1160,14 @@ Real<Scalar> if_else(const InequalityConstraints<Scalar>& cond,
1142
1160
  /// @tparam L Lower bound type.
1143
1161
  /// @tparam X Type of the Real to bound.
1144
1162
  /// @tparam U Upper bound type.
1163
+ /// @tparam Scalar Scalar type.
1145
1164
  /// @param l Lower bound.
1146
1165
  /// @param x Real to bound.
1147
1166
  /// @param u Upper bound.
1148
- template <typename L, typename X, typename U>
1149
- requires(ScalarLike<L> || MatrixLike<L>) && SleipnirType<X> &&
1150
- (ScalarLike<U> || MatrixLike<U>)
1167
+ template <typename L, typename X, typename U,
1168
+ typename Scalar = typename std::decay_t<X>::Scalar>
1169
+ requires detail::RealComparisonOperand<L, Scalar> && SleipnirType<X> &&
1170
+ detail::RealComparisonOperand<U, Scalar>
1151
1171
  auto bounds(L&& l, X&& x, U&& u) {
1152
1172
  return InequalityConstraints{l <= x, x <= u};
1153
1173
  }
@@ -244,6 +244,7 @@ class RealMatrix : public SleipnirBase {
244
244
  /// @tparam Derived Eigen matrix type.
245
245
  /// @param values Eigen matrix of values.
246
246
  template <typename Derived>
247
+ requires detail::RealMatrixOperand<Derived, Scalar>
247
248
  // NOLINTNEXTLINE (google-explicit-constructor)
248
249
  RealMatrix(const Eigen::MatrixBase<Derived>& values)
249
250
  : m_rows{static_cast<int>(values.rows())},
@@ -261,6 +262,8 @@ class RealMatrix : public SleipnirBase {
261
262
  /// @tparam Derived Eigen diagonal matrix type.
262
263
  /// @param values Diagonal matrix of values.
263
264
  template <typename Derived>
265
+ requires std::same_as<typename Derived::Scalar, Scalar> ||
266
+ std::same_as<typename Derived::Scalar, Real<Scalar>>
264
267
  // NOLINTNEXTLINE (google-explicit-constructor)
265
268
  RealMatrix(const Eigen::DiagonalBase<Derived>& values)
266
269
  : m_rows{static_cast<int>(values.rows())},
@@ -356,6 +359,7 @@ class RealMatrix : public SleipnirBase {
356
359
  /// @param values Eigen matrix of values.
357
360
  /// @return This matrix.
358
361
  template <typename Derived>
362
+ requires detail::RealMatrixOperand<Derived, Scalar>
359
363
  RealMatrix& operator=(const Eigen::MatrixBase<Derived>& values) {
360
364
  slp_assert(rows() == values.rows() && cols() == values.cols());
361
365
 
@@ -594,7 +598,7 @@ class RealMatrix : public SleipnirBase {
594
598
  ///
595
599
  /// @param rhs Real to multiply.
596
600
  /// @return Result of multiplication.
597
- RealMatrix& operator*=(const MatrixLike auto& rhs) {
601
+ RealMatrix& operator*=(const detail::RealMatrixOperand<Scalar> auto& rhs) {
598
602
  slp_assert(cols() == rhs.rows() && cols() == rhs.cols());
599
603
 
600
604
  for (int i = 0; i < rows(); ++i) {
@@ -615,7 +619,7 @@ class RealMatrix : public SleipnirBase {
615
619
  ///
616
620
  /// @param rhs Real to multiply.
617
621
  /// @return Result of multiplication.
618
- RealMatrix& operator*=(const ScalarLike auto& rhs) {
622
+ RealMatrix& operator*=(const detail::RealOperand<Scalar> auto& rhs) {
619
623
  for (int row = 0; row < rows(); ++row) {
620
624
  for (int col = 0; col < cols(); ++col) {
621
625
  (*this)[row, col] *= rhs;
@@ -629,7 +633,7 @@ class RealMatrix : public SleipnirBase {
629
633
  ///
630
634
  /// @param rhs Real to divide.
631
635
  /// @return Result of division.
632
- RealMatrix& operator/=(const ScalarLike auto& rhs) {
636
+ RealMatrix& operator/=(const detail::RealOperand<Scalar> auto& rhs) {
633
637
  for (int row = 0; row < rows(); ++row) {
634
638
  for (int col = 0; col < cols(); ++col) {
635
639
  (*this)[row, col] /= rhs;
@@ -643,7 +647,7 @@ class RealMatrix : public SleipnirBase {
643
647
  ///
644
648
  /// @param rhs Real to add.
645
649
  /// @return Result of addition.
646
- RealMatrix& operator+=(const MatrixLike auto& rhs) {
650
+ RealMatrix& operator+=(const detail::RealMatrixOperand<Scalar> auto& rhs) {
647
651
  slp_assert(rows() == rhs.rows() && cols() == rhs.cols());
648
652
 
649
653
  for (int row = 0; row < rows(); ++row) {
@@ -659,7 +663,7 @@ class RealMatrix : public SleipnirBase {
659
663
  ///
660
664
  /// @param rhs Real to add.
661
665
  /// @return Result of addition.
662
- RealMatrix& operator+=(const ScalarLike auto& rhs) {
666
+ RealMatrix& operator+=(const detail::RealOperand<Scalar> auto& rhs) {
663
667
  slp_assert(rows() == 1 && cols() == 1);
664
668
 
665
669
  for (int row = 0; row < rows(); ++row) {
@@ -675,7 +679,7 @@ class RealMatrix : public SleipnirBase {
675
679
  ///
676
680
  /// @param rhs Real to subtract.
677
681
  /// @return Result of subtraction.
678
- RealMatrix& operator-=(const MatrixLike auto& rhs) {
682
+ RealMatrix& operator-=(const detail::RealMatrixOperand<Scalar> auto& rhs) {
679
683
  slp_assert(rows() == rhs.rows() && cols() == rhs.cols());
680
684
 
681
685
  for (int row = 0; row < rows(); ++row) {
@@ -691,7 +695,7 @@ class RealMatrix : public SleipnirBase {
691
695
  ///
692
696
  /// @param rhs Real to subtract.
693
697
  /// @return Result of subtraction.
694
- RealMatrix& operator-=(const ScalarLike auto& rhs) {
698
+ RealMatrix& operator-=(const detail::RealOperand<Scalar> auto& rhs) {
695
699
  slp_assert(rows() == 1 && cols() == 1);
696
700
 
697
701
  for (int row = 0; row < rows(); ++row) {
@@ -160,6 +160,7 @@ class RealSubmatrix : public SleipnirBase {
160
160
  /// @param values Eigen matrix of values to assign.
161
161
  /// @return This submatrix.
162
162
  template <typename Derived>
163
+ requires detail::RealMatrixOperand<Derived, Scalar>
163
164
  RealSubmatrix<Mat>& operator=(const Eigen::MatrixBase<Derived>& values) {
164
165
  slp_assert(rows() == values.rows() && cols() == values.cols());
165
166
 
@@ -421,7 +422,8 @@ class RealSubmatrix : public SleipnirBase {
421
422
  ///
422
423
  /// @param rhs Real to multiply.
423
424
  /// @return Result of multiplication.
424
- RealSubmatrix<Mat>& operator*=(const MatrixLike auto& rhs) {
425
+ RealSubmatrix<Mat>& operator*=(
426
+ const detail::RealMatrixOperand<Scalar> auto& rhs) {
425
427
  slp_assert(cols() == rhs.rows() && cols() == rhs.cols());
426
428
 
427
429
  for (int i = 0; i < rows(); ++i) {
@@ -442,7 +444,7 @@ class RealSubmatrix : public SleipnirBase {
442
444
  ///
443
445
  /// @param rhs Real to multiply.
444
446
  /// @return Result of multiplication.
445
- RealSubmatrix<Mat>& operator*=(const ScalarLike auto& rhs) {
447
+ RealSubmatrix<Mat>& operator*=(const detail::RealOperand<Scalar> auto& rhs) {
446
448
  for (int row = 0; row < rows(); ++row) {
447
449
  for (int col = 0; col < cols(); ++col) {
448
450
  (*this)[row, col] *= rhs;
@@ -456,7 +458,7 @@ class RealSubmatrix : public SleipnirBase {
456
458
  ///
457
459
  /// @param rhs Real to divide.
458
460
  /// @return Result of division.
459
- RealSubmatrix<Mat>& operator/=(const ScalarLike auto& rhs) {
461
+ RealSubmatrix<Mat>& operator/=(const detail::RealOperand<Scalar> auto& rhs) {
460
462
  for (int row = 0; row < rows(); ++row) {
461
463
  for (int col = 0; col < cols(); ++col) {
462
464
  (*this)[row, col] /= rhs;
@@ -470,7 +472,8 @@ class RealSubmatrix : public SleipnirBase {
470
472
  ///
471
473
  /// @param rhs Real to add.
472
474
  /// @return Result of addition.
473
- RealSubmatrix<Mat>& operator+=(const MatrixLike auto& rhs) {
475
+ RealSubmatrix<Mat>& operator+=(
476
+ const detail::RealMatrixOperand<Scalar> auto& rhs) {
474
477
  slp_assert(rows() == rhs.rows() && cols() == rhs.cols());
475
478
 
476
479
  for (int row = 0; row < rows(); ++row) {
@@ -486,7 +489,7 @@ class RealSubmatrix : public SleipnirBase {
486
489
  ///
487
490
  /// @param rhs Real to add.
488
491
  /// @return Result of addition.
489
- RealSubmatrix<Mat>& operator+=(const ScalarLike auto& rhs) {
492
+ RealSubmatrix<Mat>& operator+=(const detail::RealOperand<Scalar> auto& rhs) {
490
493
  slp_assert(rows() == 1 && cols() == 1);
491
494
 
492
495
  for (int row = 0; row < rows(); ++row) {
@@ -502,7 +505,8 @@ class RealSubmatrix : public SleipnirBase {
502
505
  ///
503
506
  /// @param rhs Real to subtract.
504
507
  /// @return Result of subtraction.
505
- RealSubmatrix<Mat>& operator-=(const MatrixLike auto& rhs) {
508
+ RealSubmatrix<Mat>& operator-=(
509
+ const detail::RealMatrixOperand<Scalar> auto& rhs) {
506
510
  slp_assert(rows() == rhs.rows() && cols() == rhs.cols());
507
511
 
508
512
  for (int row = 0; row < rows(); ++row) {
@@ -518,7 +522,7 @@ class RealSubmatrix : public SleipnirBase {
518
522
  ///
519
523
  /// @param rhs Real to subtract.
520
524
  /// @return Result of subtraction.
521
- RealSubmatrix<Mat>& operator-=(const ScalarLike auto& rhs) {
525
+ RealSubmatrix<Mat>& operator-=(const detail::RealOperand<Scalar> auto& rhs) {
522
526
  slp_assert(rows() == 1 && cols() == 1);
523
527
 
524
528
  for (int row = 0; row < rows(); ++row) {
@@ -105,18 +105,38 @@ template <typename T, typename Scalar>
105
105
  concept RealOperand =
106
106
  ScalarLike<T> && (!SleipnirType<T> || SleipnirScalarLike<T, Scalar>);
107
107
 
108
- /// Whether two dense matrix operands combine into a RealMatrix. Each is a
109
- /// matrix of autodiff expressions or an Eigen matrix, and at least one is a
110
- /// matrix of autodiff expressions.
108
+ /// Whether T is a dense matrix operand of real matrix arithmetic with the given
109
+ /// scalar type: a matrix of autodiff expressions, or an Eigen matrix of
110
+ /// constants or Reals.
111
+ ///
112
+ /// @tparam T The operand type.
113
+ /// @tparam Scalar Scalar type.
114
+ template <typename T, typename Scalar>
115
+ concept RealMatrixOperand =
116
+ SleipnirMatrixLike<T, Scalar> ||
117
+ (EigenMatrixLike<T> &&
118
+ (std::same_as<typename std::decay_t<T>::Scalar, Scalar> ||
119
+ std::same_as<typename std::decay_t<T>::Scalar, Real<Scalar>>));
120
+
121
+ /// Whether T is an operand of a real comparison with the given scalar type: a
122
+ /// scalar operand or a dense matrix operand.
123
+ ///
124
+ /// @tparam T The operand type.
125
+ /// @tparam Scalar Scalar type.
126
+ template <typename T, typename Scalar>
127
+ concept RealComparisonOperand =
128
+ RealOperand<T, Scalar> || RealMatrixOperand<T, Scalar>;
129
+
130
+ /// Whether two dense matrix operands combine into a RealMatrix with the given
131
+ /// scalar type. At least one is a matrix of autodiff expressions.
111
132
  ///
112
133
  /// @tparam LHS Left-hand side operand type.
113
134
  /// @tparam RHS Right-hand side operand type.
114
135
  /// @tparam Scalar Scalar type.
115
136
  template <typename LHS, typename RHS, typename Scalar>
116
137
  concept RealMatrixOperands =
117
- (SleipnirMatrixLike<LHS, Scalar> &&
118
- (SleipnirMatrixLike<RHS, Scalar> || EigenMatrixLike<RHS>)) ||
119
- (EigenMatrixLike<LHS> && SleipnirMatrixLike<RHS, Scalar>);
138
+ RealMatrixOperand<LHS, Scalar> && RealMatrixOperand<RHS, Scalar> &&
139
+ (SleipnirType<LHS> || SleipnirType<RHS>);
120
140
 
121
141
  /// Whether two matrix operands multiply into a RealMatrix. They're either
122
142
  /// dense matrix operands, or a matrix of autodiff expressions and an Eigen
@@ -132,15 +152,15 @@ concept RealMatrixProductOperands =
132
152
  (SleipnirMatrixLike<LHS, Scalar> && EigenSparseMatrixOf<RHS, Scalar>);
133
153
 
134
154
  /// Whether a matrix operand and a scalar operand combine into a RealMatrix.
135
- /// They're either a matrix of autodiff expressions and a scalar, or an Eigen
136
- /// matrix and a Real.
155
+ /// They're either a matrix of autodiff expressions and a scalar operand, or an
156
+ /// Eigen matrix of constants and a Real.
137
157
  ///
138
158
  /// @tparam M Matrix operand type.
139
159
  /// @tparam S Scalar operand type.
140
160
  /// @tparam Scalar Scalar type.
141
161
  template <typename M, typename S, typename Scalar>
142
162
  concept RealMatrixScalarOperands =
143
- (SleipnirMatrixLike<M, Scalar> && ScalarLike<S>) ||
163
+ (SleipnirMatrixLike<M, Scalar> && RealOperand<S, Scalar>) ||
144
164
  (EigenMatrixLike<M> &&
145
165
  std::same_as<typename std::decay_t<M>::Scalar, Scalar> &&
146
166
  std::same_as<std::decay_t<S>, Real<Scalar>>);
@@ -70,8 +70,12 @@ void bind_real_matrix(nb::module_& autodiff,
70
70
  "list"_a, DOC(slp, RealMatrix, RealMatrix, 6));
71
71
  cls.def(nb::init<nb::DRef<Eigen::MatrixXd>>(), "values"_a,
72
72
  DOC(slp, RealMatrix, RealMatrix, 8));
73
- cls.def(nb::init<nb::DRef<Eigen::MatrixXf>>(), "values"_a,
74
- DOC(slp, RealMatrix, RealMatrix, 8));
73
+ cls.def(
74
+ "__init__",
75
+ [](RealMatrix<double>* self, nb::DRef<Eigen::MatrixXf> values) {
76
+ new (self) RealMatrix<double>(values.cast<double>());
77
+ },
78
+ "values"_a, DOC(slp, RealMatrix, RealMatrix, 8));
75
79
  cls.def(nb::init<const Real<double>&>(), "variable"_a,
76
80
  DOC(slp, RealMatrix, RealMatrix, 10));
77
81
  cls.def(nb::init<const RealSubmatrix<RealMatrix<double>>&>(), "values"_a,
@@ -128,11 +132,11 @@ void bind_real_matrix(nb::module_& autodiff,
128
132
  } else if (auto rhs = try_cast_to_eigen<double>(value)) {
129
133
  lhs = rhs.value();
130
134
  } else if (auto rhs = try_cast_to_eigen<float>(value)) {
131
- lhs = rhs.value();
135
+ lhs = rhs.value().cast<double>();
132
136
  } else if (auto rhs = try_cast_to_eigen<int64_t>(value)) {
133
- lhs = rhs.value();
137
+ lhs = rhs.value().cast<double>();
134
138
  } else if (auto rhs = try_cast_to_eigen<int32_t>(value)) {
135
- lhs = rhs.value();
139
+ lhs = rhs.value().cast<double>();
136
140
  } else if (auto rhs = try_cast<Real<double>>(value)) {
137
141
  lhs = rhs.value();
138
142
  } else if (auto rhs = try_cast<double>(value)) {
@@ -93,11 +93,11 @@ void bind_real_submatrix(nb::module_& autodiff,
93
93
  } else if (auto rhs = try_cast_to_eigen<double>(value)) {
94
94
  lhs = rhs.value();
95
95
  } else if (auto rhs = try_cast_to_eigen<float>(value)) {
96
- lhs = rhs.value();
96
+ lhs = rhs.value().cast<double>();
97
97
  } else if (auto rhs = try_cast_to_eigen<int64_t>(value)) {
98
- lhs = rhs.value();
98
+ lhs = rhs.value().cast<double>();
99
99
  } else if (auto rhs = try_cast_to_eigen<int32_t>(value)) {
100
- lhs = rhs.value();
100
+ lhs = rhs.value().cast<double>();
101
101
  } else if (auto rhs = try_cast<Real<double>>(value)) {
102
102
  lhs = rhs.value();
103
103
  } else if (auto rhs = try_cast<double>(value)) {
@@ -2776,6 +2776,7 @@ Template Args:
2776
2776
  L: Lower bound type.
2777
2777
  X: Type of the Real to bound.
2778
2778
  U: Upper bound type.
2779
+ Scalar: Scalar type.
2779
2780
 
2780
2781
  )doc";
2781
2782
 
@@ -3190,6 +3191,7 @@ Args:
3190
3191
  Template Args:
3191
3192
  LHS: Left-hand side type.
3192
3193
  RHS: Right-hand side type.
3194
+ Scalar: Scalar type.
3193
3195
 
3194
3196
  )doc";
3195
3197
 
@@ -3203,6 +3205,7 @@ Args:
3203
3205
  Template Args:
3204
3206
  LHS: Left-hand side type.
3205
3207
  RHS: Right-hand side type.
3208
+ Scalar: Scalar type.
3206
3209
 
3207
3210
  )doc";
3208
3211
 
@@ -3216,6 +3219,7 @@ Args:
3216
3219
  Template Args:
3217
3220
  LHS: Left-hand side type.
3218
3221
  RHS: Right-hand side type.
3222
+ Scalar: Scalar type.
3219
3223
 
3220
3224
  )doc";
3221
3225
 
@@ -3230,6 +3234,7 @@ Args:
3230
3234
  Template Args:
3231
3235
  LHS: Left-hand side type.
3232
3236
  RHS: Right-hand side type.
3237
+ Scalar: Scalar type.
3233
3238
 
3234
3239
  )doc";
3235
3240
 
@@ -3244,6 +3249,7 @@ Args:
3244
3249
  Template Args:
3245
3250
  LHS: Left-hand side type.
3246
3251
  RHS: Right-hand side type.
3252
+ Scalar: Scalar type.
3247
3253
 
3248
3254
  )doc";
3249
3255
 
@@ -3258,6 +3264,7 @@ Args:
3258
3264
  Template Args:
3259
3265
  LHS: Left-hand side type.
3260
3266
  RHS: Right-hand side type.
3267
+ Scalar: Scalar type.
3261
3268
 
3262
3269
  )doc";
3263
3270
 
@@ -3272,6 +3279,7 @@ Args:
3272
3279
  Template Args:
3273
3280
  LHS: Left-hand side type.
3274
3281
  RHS: Right-hand side type.
3282
+ Scalar: Scalar type.
3275
3283
 
3276
3284
  )doc";
3277
3285
 
@@ -3286,6 +3294,7 @@ Args:
3286
3294
  Template Args:
3287
3295
  LHS: Left-hand side type.
3288
3296
  RHS: Right-hand side type.
3297
+ Scalar: Scalar type.
3289
3298
 
3290
3299
  )doc";
3291
3300
 
@@ -3300,6 +3309,7 @@ Args:
3300
3309
  Template Args:
3301
3310
  LHS: Left-hand side type.
3302
3311
  RHS: Right-hand side type.
3312
+ Scalar: Scalar type.
3303
3313
 
3304
3314
  )doc";
3305
3315
 
@@ -2,4 +2,4 @@
2
2
 
3
3
  from ._sleipnir import *
4
4
 
5
- __version__ = "0.6.7.dev191"
5
+ __version__ = "0.6.7.dev192"