Martin Baker wrote:
>
> On 30/06/16 02:28, Waldek Hebisch wrote:
> > 1) Printing [] for matrix with zero rows is better than current
> > state. However for matrices with zero columns your code
> > looses information about number of rows.
> >
> > 2) You may pass list to 'matrix' in OutputForm and the results
> > should be as close as possible. Since you are loosing
> > info about number of columns you can change 'matrix' in
> > OutputForm so that empty l gives '[]'.
>
> Perhaps it should work like this:
>
> (1) -> b : Matrix(Integer) := new(3,0,0)
>
> +_+
> | |
> (1) |_|
> | |
> +_+
> Type:
> Matrix(Integer)
>
> (2) -> c: Matrix(Integer) := new(0,3,0)
>
> (2) [_ _ _]
> Type:
> Matrix(Integer)
>
> That is: choose some character like '_' or '.' or '#' to stand for
> nothing as opposed to zero.
We use the same code for arrays and matrices. Consider:
33) -> m := new(3, 1, '-)$TwoDimensionalArray(Symbol)
+-+
| |
(33) |-|
| |
+-+
Type: TwoDimensionalArray(Symbol)
(34) -> m := new(1, 3, '__)$TwoDimensionalArray(Symbol)
(34) [_ _ _]
Type: TwoDimensionalArray(Symbol)
There will be some information loss, but current version seem
to be less lossy in case of positive number of rows. For
zero rows using placeholder is probably the only alternative
which allows showing number of columns.
--
Waldek Hebisch
--
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 https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.