Skip to content

Commit

Permalink
MatrixObj: add IsPlistMatrixRep methods for [,] and [,]:=
Browse files Browse the repository at this point in the history
  • Loading branch information
fingolfin committed Jul 13, 2018
1 parent ae37b13 commit c26305a
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions lib/matobjplist.gi
Original file line number Diff line number Diff line change
Expand Up @@ -811,6 +811,19 @@ InstallMethod( SetMatElm, "for a plist matrix, two positions, and an object",
m![ROWSPOS][row]![ELSPOS][col] := ob;
end );

InstallMethod( \[\], "for a plist matrix and two positions",
[ IsPlistMatrixRep, IsPosInt, IsPosInt ],
function( m, row, col )
return m![ROWSPOS][row]![ELSPOS][col];
end );

InstallMethod( \[\]\:\=, "for a plist matrix, two positions, and an object",
[ IsPlistMatrixRep and IsMutable, IsPosInt, IsPosInt, IsObject ],
function( m, row, col, ob )
m![ROWSPOS][row]![ELSPOS][col] := ob;
end );



############################################################################
# Printing and viewing methods:
Expand Down

0 comments on commit c26305a

Please sign in to comment.