ITADN

Add more `CompatibleVector` variants

#6302Openfingolfin 创建于 2026-04-08
kind: enhancementtopic: library
F
fingolfincommented
Right now we have `CompatibleVector(M)` which takes a matrixobj and returns a "compatible" zero vector. Here compatible in particular means that the vector has length `NrRows(M)`. But what if I need a vector for multiplying "from the other side" ? And what if I have an existing vector that I just want to "make ready" for multiplication by `M`? So perhaps we should have also at least a function `CompatibleVector(v, M)` which takes a MatrixObj `M` and an existing "vector" `v` (in whatever formats) and which produces a new VectorObj `w` "compatible" with `M` such that `w * M` can be computed. Then we could also add `CompatibleVector(M, v)` for which `M * w` can be computed.
2 条评论