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

Quelle  Coefficients.g   Sprache: unbekannt

 
Spracherkennung für: .g vermutete Sprache: Unknown {[0] [0] [0]} [Methode: Schwerpunktbildung, einfache Gewichte, sechs Dimensionen]

LoadPackage( "RingsForHomalg" );

test_coefficients := function( QQ )
  local R, poly, monomials, coeffs;
    
    R := QQ * "x,y";
    
    poly := "2*x^2+3*x*y+5" / R;
    
    monomials := [ "1" / R, "x*y" / R, "x^2" / R, "y^2" / R ];
    
    coeffs := CoefficientsWithGivenMonomials( poly, monomials );
    
    Assert( 0, coeffs = HomalgMatrix( "[ 5, 3, 2, 0 ]", 1, 4, R ) );
    
end;

test_coefficients( HomalgFieldOfRationalsInSingular( ) );

[ Dauer der Verarbeitung: 0.28 Sekunden  ]