Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/GAP/pkg/modisom/gap/tables/   (GAP Algebra Version 4.15.1©)  Datei vom 23.8.2024 mit Größe 919 B image not shown  

Quelle  weight.gi   Sprache: Shell

 

DeclareGlobalFunction( "ProductWeight" );
InstallGlobalFunction( "ProductWeight", function( R, i, j )
    local l, a, d, b, c;

    # swap if commutative
    if IsBound(R.com) and R.com and i>j then 
        return ProductWeight(R,j,i); 
    fi;

    # class limit of the cover
    l := R.wgs[R.dim]+1;
 
    # the easy check
    a := R.wgs[i]+R.wgs[j];
    if a > l then return a; fi;
    
    # look up table if available
    if IsBound(R.tab[i]) and IsBound(R.tab[i][j]) then 
        d := PositionNonZero(R.tab[i][j]);
        if d > R.dim then 
            a := l; 
        else
            return R.wgs[d];
        fi;
    fi;

    # try defs
    if IsBound(R.wds[i]) then 
        b := ProductWeight(R, R.wds[i][1], R.wds[i][2]) + R.wgs[j];
        a := Maximum(a,b);
        #c := R.wgs[R.wds[i][1]] + ProductWeight(R, R.wds[i][2], j);
        #a := Maximum(a,c);
    fi;

    # that's it
    return a;
end );


Messung
CHZG
949810097

¤ Dauer der Verarbeitung: 0.2 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover


Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.