fortran-lang / stdlib

Fortran Standard Library
https://stdlib.fortran-lang.org
MIT License
1.05k stars 164 forks source link

[feature] Add more base routines for `stdlib_linalg` #476

Open zoziha opened 3 years ago

zoziha commented 3 years ago

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

Prior Art

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

ghbrown commented 3 years ago

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

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.