Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/GAP/pkg/matricesforhomalg/examples/   (Algebra von RWTH Aachen Version 4.15.1©)  Datei vom 7.8.2025 mit Größe 405 B image not shown  

Quelle  CoercedMatrix.g   Sprache: unbekannt

 
LoadPackage( "MatricesForHomalg" );
LoadPackage( "GaussForHomalg" );

zz := HomalgRingOfIntegers( );
QQ := HomalgFieldOfRationals( );

M := HomalgMatrix( [ 1, 2, 3, 4 ], 2, 2, zz );
N := CoercedMatrix( QQ, M );
P := CoercedMatrix( zz, QQ, M );
Assert( 0, N = P );
Assert( 0, NumberRows( N ) = NumberRows( M ) and NrCols( N ) = NrCols( M ) );
Assert( 0, IsIdenticalObj( HomalgRing( N ), QQ ) );
Eval( N );

[ Dauer der Verarbeitung: 0.3 Sekunden  (vorverarbeitet)  ]