gonum / matrix

Matrix packages for the Go language [DEPRECATED]

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

type Transpose is hard to use in some case ?

brucexiaok opened this issue · comments

i know the type Transpose is designed for no extra memory when transpose the matrix , But I think is very hard to use ! if I wan to transpose the dense and i got the type Transpose , i can not use it as Dense or Vector, type Transpose has less method , so in some case ,there anyone ever think the Transpose type is hard to use ?

There is normally no need for you to have a *Dense. However, if you must, you can achieve what you had in your T method with the following code, inline in your code return mat.DenseCopyOf(m.T()). This does not seem particularly difficult to use to me. It's probably not what you want, but it seems to be what you are asking for.

Note that code in gonum/matrix is essentially frozen, so there is little point in filing issues against it for feature requests.

thanks , i think return mat.DenseCopyOf(m.T()) would be better , well design ! and the type Transpose is design for better memory cost only ? is there other benefit ?

thanks , i think return mat.DenseCopyOf(m.T()) would be better , well design ! and the type Transpose is design for better memory cost only ? is there other benefit ?

Better than what? Why? So far we have no code from you that shows why you have a problem with the current design.

Allocation cost is a significant burden on numerical code. If it can be avoided memory pressure decreases and performance increases.

Please can you take this discussion to gonum-dev, issues are not a place for this kind of thing. Before you do though, please take a look at our client code in stat and be prepared to show code that you are writing that you feel is made more difficult with the current design. Without evidence we can make no judgement.

thanks , i am sorry to discuss my opinion in this place ,i will be move to gonum-dev , sorry for that , I'm freshman , thank you for your kind apply.