Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/GAP/pkg/ringsforhomalg/examples/   (GAP Algebra 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: Lisp {Lisp[50] Masm[50] ABAP[16]} [Methode: maximale Elemente, drei 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.2 Sekunden, vorverarbeitet 2026-10-20]