On 03/26/2014 05:13 PM, Waldek Hebisch wrote: > I wrote: >> >> One more thing releated to this: outputTran has special case >> for handling Lisp representationof matrices in 'outputTranMatrix'. >> But this code can not work, because we use different representation >> of matrices (true 2D arrays instead of vectors of vectors). > > Actually, I was wrong: ATM conversion to OutputForm produces > just this. But there is no reason to keep this form, we > should chage it.
TwoDimensionalArrayCategory has a default implementation. https://github.com/hemmecke/fricas-svn/blob/master/src/algebra/array2.spad.pamphlet#L690 if R has CoercibleTo(OutputForm) then coerce(m : %) == l : List List OutputForm l := [[qelt(m, i, j) :: OutputForm _ for j in minColIndex(m)..maxColIndex(m)] _ for i in minRowIndex(m)..maxRowIndex(m)] matrix l and then in OutputForm we have matrix ll == lv : List % := [LIST2VEC$Lisp l for l in ll] CONS(eform 'MATRIX, LIST2VEC$Lisp lv)$Lisp I don't quite get why it must be converted to a vector when in the end the formatters expect list of lists. Shouldn't we get rid of this LIST2VEC in OutputForm? Ralf -- You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/fricas-devel. For more options, visit https://groups.google.com/d/optout.
