Changeset 4820e6 in git


Ignore:
Timestamp:
Jan 15, 2009, 2:51:18 PM (15 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'b52fc4b2495505785981d640dcf7eb3e456778ef')
Children:
5563ba8508b091b9f3b551d8c751bde89b4e7186
Parents:
684be2d3473879698c86436570f937e39ddb3c70
Message:
*hannes: optim


git-svn-id: file:///usr/local/Singular/svn/trunk@11316 2c84dea3-7e68-4137-9b89-c4e89433aadc
Location:
Singular/LIB
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/elim.lib

    r684be2d r4820e6  
    1 // $Id: elim.lib,v 1.27 2009-01-15 10:57:51 Singular Exp $
     1// $Id: elim.lib,v 1.28 2009-01-15 13:51:18 Singular Exp $
    22// (GMG, modified 22.06.96)
    33// GMG, last modified 30.10.08: new procedure elimRing;
     
    1010// and can now choose as method slimgb or std.
    1111///////////////////////////////////////////////////////////////////////////////
    12 version="$Id: elim.lib,v 1.27 2009-01-15 10:57:51 Singular Exp $";
     12version="$Id: elim.lib,v 1.28 2009-01-15 13:51:18 Singular Exp $";
    1313category="Commutative Algebra";
    1414info="
     
    9999//--------------- create tr = K[x(1),...,x(n),t] ---------------------------
    100100   int s = size(l[3]);
    101    for ( i=1; i<=n; i++)
     101   for ( i=n; i>=1; i--)
    102102   {
    103103      l[2][i]="x("+string(i)+")";
     
    110110   l[2]=delete(l[2],n+1);
    111111   l[3]=delete(l[3],s);
    112    for ( i=1; i<=k; i++)
     112   for ( i=k; i>=1; i--)
    113113   {
    114114      l[2][n+i]="y("+string(i)+")";
     
    121121   if( homog(C) )
    122122   {
    123       for( i=1; i<=k; i++)
     123      for( i=k; i>=1; i--)
    124124      {
    125125         v[i]=deg(C[i]);
     
    136136   else
    137137   {
    138       for( i=1; i<=k; i++)
    139       {
    140          v[i]=1;
    141       }
     138      v=1:k;
    142139      l[3][s]=list("dp",v);
    143140   }
     
    280277        w2 = w2,@w[ii];
    281278        v2 = v2+list(string(var(ii)));
    282         if ( defined(local) == 0 )
     279        if ( ! defined(local) )
    283280        {
    284281           int local = (var(ii) < 1);
     
    329326    if( w2==1 )              //weights for vars not to be eliminated are all 1
    330327    {
    331        if ( local==1 )
     328       if ( local )
    332329       {
    333330          B3[2] = list("ds", w2);
     
    340337    else
    341338    {
    342        if ( local==1 )
     339       if ( local )
    343340       {
    344341          B3[2] = list("ws", w2);
     
    357354    if( @w==1 )              //weights for all vars are 1
    358355    {
    359        if ( local==1 )
     356       if ( local )
    360357       {
    361358          B3[2] = list("ls", @w);
     
    368365    else
    369366    {
    370        if ( local==1 )
     367       if ( local )
    371368       {
    372369          B3[2] = list("ws", @w);
  • Singular/LIB/standard.lib

    r684be2d r4820e6  
    55//### Todo: im lokalen Fall die Hilbert-Samuel Funktion verwenden
    66//////////////////////////////////////////////////////////////////////////////
    7 version="$Id: standard.lib,v 1.105 2009-01-15 10:57:30 Singular Exp $";
     7version="$Id: standard.lib,v 1.106 2009-01-15 13:51:18 Singular Exp $";
    88category="Miscellaneous";
    99info="
     
    2929//////////////////////////////////////////////////////////////////////////////
    3030
    31 proc stdfglm (i, list #)
     31proc stdfglm (ideal i, list #)
    3232"SYNTAX: @code{stdfglm (} ideal_expression @code{)} @*
    3333         @code{stdfglm (} ideal_expression@code{,} string_expression @code{)}
     
    4444EXAMPLE: example stdfglm; shows an example"
    4545{
    46   if (typeof(i)!="ideal")
    47   {
    48     ERROR("first argument of 'stdfglm' must be an ideal");
    49   }
    5046  string os;
    5147  int s = size(#);
     
    6763  }
    6864
    69   if( s > 0 && (typeof(#[1]) == "string") )
     65  if((s > 0) && (typeof(#[1]) == "string"))
    7066  {
    7167    os = #[1];
     
    229225  {
    230226    intvec w;
    231     for(k=1;  k<=nvarP; k++)
     227    for(k=nvarP;  k>=1; k--)
    232228    {
    233229       w[k] = deg(var(k));     //compute ring weights
     
    247243//Note that quotient ideal of qring must be homogeneous too
    248244
    249   int neg;
    250   for ( k=1; k<=nvarP; k++)
    251   {
    252      if( var(k) < 1)
    253      { neg = 1; }
    254   }
    255 
    256   if( find(ordstr_P,"s") || find(ordstr_P,"M") || (neg > 0) )
     245  int neg=1-attrib (P,"global");
     246
     247  if( //find(ordstr_P,"s") ||// covered by neg
     248     find(ordstr_P,"M") || neg )
    257249  {
    258250    // if( defined(hi) && is_homog )
     
    10351027
    10361028  if(  //( find(ordstr_P,"s") > 0 ) || // covered by neg
    1037        ( find(ordstr_P,"M") > 0 )  || ( find(ordstr_P,"a") > 0 )  || ( neg>0 ) )
     1029       ( find(ordstr_P,"M") > 0 )  || ( find(ordstr_P,"a") > 0 )  || neg )
    10381030  {
    10391031    if (p_opt) { "std in basering"; }
Note: See TracChangeset for help on using the changeset viewer.