stdlib icon indicating copy to clipboard operation
stdlib copied to clipboard

[feature] Add more base routines for `stdlib_linalg`

Open zoziha opened this issue 4 years ago • 1 comments

Description

Fortran has its unique grammatical characteristics. I think it is impossible to learn from some routines of Matlab and Python completely. We should be based on the characteristics of Fortran. Seeing the implementation of linspace/logspace in stdlib_math, I want to implement some routines in stdlib, mainly for stdlib_linalg.

Tasks

  • [x] zeros (see #478)
  • [x] ones (see #478)
  • [x] seq/arange (see #480)
  • [x] eye, for matrix is not square. (see #481)
  • [ ] det (need BLAS #450 )
  • [x] diff (see #605 )

  • [x] is_square
  • [x] is_symmetric

Prior Art

Some routines has been implemented in keurfonluu/Forlab (MIT license). I will rethink how to adapt to Fortran to write code.

zoziha avatar Jul 30 '21 10:07 zoziha

I was thinking about proposing and implementing some matrix property checks like

  • is_square (not sure if it's the same is is_squared?)
  • is_symmetric
  • is_triangular (upper, lower, and diagonal can fit in here somewhere)
  • is_hermitian
  • is_hessenberg (upper, lower, etc.) etc.

I think there is at least a little bit about API to discuss here, since for example I have found it very useful for is_square to also set the dimension n. Also, there should be a very clean way to set the API for checks that can result in upper/lower/diagonal/none, but we could discuss what is best for everyone.

I can open an issue to discuss this if that works for you.

ghbrown avatar Jul 30 '21 17:07 ghbrown