Ralf Hemmecke wrote:
>
> On 04/28/2014 09:57 PM, Waldek Hebisch wrote:
> > someone wrote:
> >>
> >>> Assuming it works OK I am going to
> >>> include it in the release.
> >>
> >> I updated the code to work on top of current Fricas.
> >>
> >> https://github.com/raoulb/fricas/commits/twodimarraydoc
> >>
> >
> > I have some doubts about handling empty segments.
>
> Why?
With the patch:
(1) -> m := matrix([[1, 2, 3], [4, 5, 6]])
+1 2 3+
(1) | |
+4 5 6+
Type: Matrix(Integer)
(2) -> subMatrix(m, 2, 1, 1, 2)
(2)
Type: Matrix(Integer)
(3) -> subMatrix(m, 3, 1, 1, 2)
>> Error detected within library code:
subMatrix: bad row indices
(3) -> m(2..1, 1..2)
(3)
Type: Matrix(Integer)
(4) -> m(3..1, 1..2)
(4)
Type: Matrix(Integer)
In current trunk line 4 signals error. For consistency it
would be good to get the same result from (2) and (4).
BTW: Empty matrices are useful to avoid special cases. For
example, from computation you may get empty system of equations.
It is convenient to blindly pass it to 'solve' and get right
answer. Of course, 'solve' need to special case empty system.
But we avoid special cases in callers.
--
Waldek Hebisch
[email protected]
--
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.