Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  subs.g   Sprache: unbekannt

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

#############################################################################
##
#F  Substitute( pol, indets, values )
##
Substitute := Value;
                               
MySubstitute := function( f, indets, values )
    local   n,  one,  null,
            g,
            i,  j,
            pos,
            monom,  vmonom;
    
    if Length( indets ) <> Length( values ) then
        Error( "number of indeterminates must be the number of values" );
    fi;
    
    n := Length( indets );
    
    # if there is nothing to do, do nothing.
    if n = 0 then
        return f;
    fi;
    
    if  f = f * 0 then return 0; fi;

    # prepare lists for easy access
    indets := List( indets, x -> ExtRepPolynomialRatFun( x )[1][1] );
    values := ShallowCopy( values );
    SortParallel( indets, values );
    
    one  := One( values[1] );
    null := 0 * one;
    
    # unwrap f
    f := ExtRepPolynomialRatFun(f);

    
    # run through the monomials
    g := 0 * one;
    for i in [1,3..Length(f)-1] do
        monom  := f[i];
        vmonom := one;
        for j in [1,3..Length(monom)-1 ] do
            pos := PositionSorted( indets, monom[j] );
            if pos > n then
                Error( "cannot substitute for indeterminate ", monom[j] );
            fi;
            if values[ pos ] = null then
                vmonom := null;
                break;
            fi;

            vmonom := vmonom * values[ pos ]^monom[ j+1 ];
        od;
        if vmonom <> null then
            g := g + f[i+1] * vmonom;
        fi;
    od;
    return g;
end;

[Dauer der Verarbeitung: 0.32 Sekunden, vorverarbeitet 2026-06-17]

                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik