Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/GAP/pkg/gauss/tst/   (Algebra von RWTH Aachen Version 4.15.1©)  Datei vom 3.11.2024 mit Größe 1 kB image not shown  

Quelle  gauss01.tst   Sprache: unbekannt

 
# Gauss, single 1
#
# DO NOT EDIT THIS FILE - EDIT EXAMPLES IN THE SOURCE INSTEAD!
#
# This file has been generated by AutoDoc. It contains examples extracted from
# the package documentation. Each example is preceded by a comment which gives
# the name of a GAPDoc XML file and a line range from which the example were
# taken. Note that the XML file in turn may have been generated by AutoDoc
# from some other input.
#
gap> START_TEST("gauss01.tst");

# doc/../gap/SparseMatrix.gi:44-65
gap> M := [ [ 0 , 1 ], [ 3, 0 ] ] * One( GF(2) );
[ [ 0*Z(2), Z(2)^0 ], [ Z(2)^0, 0*Z(2) ] ]
gap> SM := SparseMatrix( M );
<a 2 x 2 sparse matrix over GF(2)>
gap> IsSparseMatrix( SM );
true
gap> Display( SM );
 . 1
 1 .
gap> SN := SparseMatrix( 2, 2, [ [ 2 ], [ 1 ] ] );
<a 2 x 2 sparse matrix over GF(2)>
gap> SN = SM;
true
gap> SN := SparseMatrix( 2, 3,
>                   [ [ 2 ], [ 1, 3 ] ],
>                   [ [ 1 ], [ 3, 2 ] ] * One( GF(5) ) );
<a 2 x 3 sparse matrix over GF(5)>
gap> Display( SN );
 . 1 .
 3 . 2

#
gap> STOP_TEST("gauss01.tst", 1);

[ Dauer der Verarbeitung: 0.12 Sekunden  (vorverarbeitet)  ]