Complex support for more linear algebra functions
Open
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 839
- Forks
- 220
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 14
Description
This is based on https://github.com/stan-dev/stanc3/issues/1162
The following functions do not fully compile in expression tests when added to stanc. I've attached gists which show the compiler errors.
-
operator\(complex_matrix, complex_vector),operator\(complex_matrix, complex_matrix)(akamdivide_left)
https://gist.github.com/WardBrian/6babcd2fd0b4e1bb5b311fa9fc5c8baa -
determinant(complex_matrix)
https://gist.github.com/WardBrian/5bbe128aa159d9268a6acaea08f23187 -
inverse(complex_matrix)
https://gist.github.com/WardBrian/2552a803a0b7a1575317b4f3b3f55893 -
generalized_inverse(complex_matrix)(Bob: don't even know if this one's possible)
https://gist.github.com/WardBrian/be2edbb34a9fcbccd4bf4927e7a723e1 -
cholesky_decompose(complex_matrix)
https://gist.github.com/WardBrian/af8be400f4de3a4ca6646d0eaf4a862c (this one passes expression tests, fails the included test model) -
svd_U(complex_matrix)
https://gist.github.com/WardBrian/f22051278084bf499ba77d7c165de422 -
svd_V(complex_matrix)
https://gist.github.com/WardBrian/d9f416cfabaae205b7b0a77a8dd1a8bd -
operator./(CM, complex),operator./(complex, CM),operator./=(T, T)forT in CM(akaelt_divide)
https://gist.github.com/WardBrian/8911027041550763eda66d6162b2b7a5 -
singular_values(complex_matrix)
https://gist.github.com/WardBrian/fa245b129b93a02d8a3e5f288dc32cd8 -
eigenvalues_sym(complex_matrix)
https://gist.github.com/WardBrian/98965f46b023c5afbdf4ae33fb8d1662 -
eigenvectors_sym(complex_matrix)
https://gist.github.com/WardBrian/0341519bfaa0c215c1f9c00f7d852f0e -
subtract(complex, complex_matrix) => complex_matrix
https://gist.github.com/WardBrian/0a9cf4651a844165e325fbb208fde7dd -
add(complex, complex_matrix) => complex_matrix
https://gist.github.com/WardBrian/67f3f279d19c386998caaafac36c0cf9 -
abs(CV) => CV
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the compiler errors from the linked gists in the expression tests, then inspect the existing complex linear algebra implementations corresponding to the unchecked functions. Done means the remaining listed functions compile in expression tests and the included cholesky test model passes, with the generalized inverse question resolved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100