Namespace Math::Matrix::Banded
[email protected] (Lutz Gehlen) Sun, 23 Aug 2020 11:40:47 +0200
| Newsgroups | perl.module-authors |
|---|---|
| Message-ID | <7011554.XXk20anvnv@fresco> |
Hi all, I am working on a set of modules dealing with banded matrices (aka band matrices or band diagonal matrices). These are a certain kind of sparse matrices where all entries are known to be 0 except close to the main diagonal. Obviously, this condition can be exploited for efficient storage and algorithms. I am planning to use the Math::Matrix::Banded namespace. However, I require separate namespaces for rectangular (i.e. non-square) and symmetric systems because they are stored differently and allow a distinct set of algorithms. I have considered Math::Matrix::Banded Math::Matrix::BandedRectangular Math::Matrix::BandedSymmetric What I don't like about this option is that the package name would be Math-Matrix-Banded, but it would use namespaces outside the top level namespace. An obvious alternative would be Math::Matrix::Banded Math::Matrix::Banded::Rectangular Math::Matrix::Banded::Symmetric What I don't like here is that it suggests that the latter two classes are subclasses of the first, which is not the case. The third option I came up with is Math::Matrix::Banded::Square Math::Matrix::Banded::Rectangular Math::Matrix::Banded::Symmetric This is all within the Math::Matrix::Banded namespace and reflects the sibling relationship between the three classes. What I can see as a disadvantage - apart from long names - is that the package would still be called Math-Matrix-Banded, but there is no class occupying the top level namespace, which might be confusing for users. Do you have any thoughts on this matter? Thank you and best wishes, Lutz