Skip to content

gonum: add CARE solver #1651

@soypat

Description

@soypat

What are you trying to do?

Add a Continuous-time algebraic Riccati equation (CARE) solver.

If we are to follow in scipy's footsteps source there are some LAPACK functions that are used that may be missing. Below are the LAPACK routines uses (dgges and dtgsen) and their dependencies. I've taken the liberty to checkmark the routines which have a file in gonum/lapack/gonum (i presume that means they are implemented already):

markdown copy-pastable checklist

Here in case you want to copy it over to another issue in netlib, lapack repos or if you want to fax it to your dad.

- [ ] [dtgsen](https://github.com/scipy/scipy/blob/4ec4ab8d6ccc1cdb34b84fdcb66fde2cc0210dbf/scipy/linalg/_decomp_qz.py#L368)
- [ ] [dgges (numpylink)](https://github.com/scipy/scipy/blob/4ec4ab8d6ccc1cdb34b84fdcb66fde2cc0210dbf/scipy/linalg/_decomp_qz.py#L113) [lapack link](https://www.netlib.org/lapack/explore-html/d9/d8e/group__double_g_eeigen_ga8637d4b822e19d10327ddcb4235dc08e.html#ga8637d4b822e19d10327ddcb4235dc08e)
  - [ ] [daxpy](https://www.netlib.org/lapack/explore-html/de/da4/group__double__blas__level1_ga8f99d6a644d3396aa32db472e0cfc91c.html#ga8f99d6a644d3396aa32db472e0cfc91c)
  - [ ] [dggbal](https://www.netlib.org/lapack/explore-html/d9/d8e/group__double_g_eeigen_ga8637d4b822e19d10327ddcb4235dc08e.html#ga8637d4b822e19d10327ddcb4235dc08e)
  - [ ] [dswap](https://www.netlib.org/lapack/explore-html/de/da4/group__double__blas__level1_gaca2757ba2c3b2c6fc5d729b50345fac0.html#gaca2757ba2c3b2c6fc5d729b50345fac0)
  - [ ] [dgetc2](https://www.netlib.org/lapack/explore-html/de/d39/group__double_g_eauxiliary_ga2ecd51f7842c100d6b4ecc99119c012f.html#ga2ecd51f7842c100d6b4ecc99119c012f)
  - [ ] [dgesc2](https://www.netlib.org/lapack/explore-html/de/d39/group__double_g_eauxiliary_gac6998d2ed1a92cc28708602db64f3db6.html#gac6998d2ed1a92cc28708602db64f3db6)
  - [ ] [dlatdf](https://www.netlib.org/lapack/explore-html/d8/d9b/group__double_o_t_h_e_rauxiliary_ga2744c0a54e6012d58fb4eefb75f48c65.html#ga2744c0a54e6012d58fb4eefb75f48c65)
  - [ ] [dscal](https://www.netlib.org/lapack/explore-html/de/da4/group__double__blas__level1_ga793bdd0739bbd0e0ec8655a0df08981a.html#ga793bdd0739bbd0e0ec8655a0df08981a)
  - [ ] [dtgsy2](https://www.netlib.org/lapack/explore-html/d9/df5/group__double_s_yauxiliary_gaa6de4c854b216a9afb2f6d00eaaa3b45.html#gaa6de4c854b216a9afb2f6d00eaaa3b45)
  - [ ] [dcopy](https://www.netlib.org/lapack/explore-html/de/da4/group__double__blas__level1_ga21cdaae1732dea58194c279fca30126d.html#ga21cdaae1732dea58194c279fca30126d) (surely implemented but file not present)
  - [ ] [dorgr2](https://www.netlib.org/lapack/explore-html/da/dba/group__double_o_t_h_e_rcomputational_ga92162463311fe244666f898bedcfc08f.html#ga92162463311fe244666f898bedcfc08f)
  - [ ] [dger](https://www.netlib.org/lapack/explore-html/d7/d15/group__double__blas__level2_ga458222e01b4d348e9b52b9343d52f828.html#ga458222e01b4d348e9b52b9343d52f828) 
  - [ ] [dtgexc](https://www.netlib.org/lapack/explore-html/dd/d9a/group__double_g_ecomputational_ga2510d68d70194719d570cbcfe24b3e74.html#ga2510d68d70194719d570cbcfe24b3e74)
  - [ ] [dtgex2](https://www.netlib.org/lapack/explore-html/de/d39/group__double_g_eauxiliary_gaa3c93490c68259c80285d72cb61cbd99.html#gaa3c93490c68259c80285d72cb61cbd99)
  - [ ] [dgemm](https://www.netlib.org/lapack/explore-html/d1/d54/group__double__blas__level3_gaeda3cbd99c8fb834a60a6412878226e1.html#gaeda3cbd99c8fb834a60a6412878226e1)
  - [ ] [dgghrd](https://www.netlib.org/lapack/explore-html/da/dba/group__double_o_t_h_e_rcomputational_ga14eefc9383b013ffb81cf07834c05f06.html#ga14eefc9383b013ffb81cf07834c05f06)
  - [ ] [drot](https://www.netlib.org/lapack/explore-html/de/da4/group__double__blas__level1_ga54d516b6e0497df179c9831f2554b1f9.html#ga54d516b6e0497df179c9831f2554b1f9)
  - [ ] [dhgeqz](https://www.netlib.org/lapack/explore-html/dd/d9a/group__double_g_ecomputational_ga21c89aba210fbfb8cca635e47dccbdb3.html#ga21c89aba210fbfb8cca635e47dccbdb3)
  - [ ] [dlag2](https://www.netlib.org/lapack/explore-html/d8/d9b/group__double_o_t_h_e_rauxiliary_ga4c15bef45ba06e975cc60b7d30bdd2b4.html#ga4c15bef45ba06e975cc60b7d30bdd2b4)
  - [ ] [dlagv2](https://www.netlib.org/lapack/explore-html/d8/d9b/group__double_o_t_h_e_rauxiliary_gad9f2277feb511ff205c0caf084e29109.html#gad9f2277feb511ff205c0caf084e29109)
  - [ ] [dorg2r](https://www.netlib.org/lapack/explore-html/da/dba/group__double_o_t_h_e_rcomputational_ga0598b93548008b36c26ce99b314e77e5.html#ga0598b93548008b36c26ce99b314e77e5)
  - [ ] [dgemv](https://www.netlib.org/lapack/explore-html/d7/d15/group__double__blas__level2_gadd421a107a488d524859b4a64c1901a9.html#gadd421a107a488d524859b4a64c1901a9)
  - [ ] [dtrmm](https://www.netlib.org/lapack/explore-html/d1/d54/group__double__blas__level3_gaf07edfbb2d2077687522652c9e283e1e.html#gaf07edfbb2d2077687522652c9e283e1e)
  - [ ] [dtrmv](https://www.netlib.org/lapack/explore-html/d7/d15/group__double__blas__level2_ga596c2acd9f81df6608bd5ed97e193897.html#ga596c2acd9f81df6608bd5ed97e193897)

Already implemented routines

Details

Below are functions of QR decomposition so they should already be implemented

Is this feature absent from the current master?

Yes

Are you able to help contribute the feature?

I'd like to learn! I've read fortran code before but golly do I find it hard to follow. I am motivated to contribute. I guess I'll start looking at other ports in the lapack folder to get a sense of what we're doing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions