Changeset 73ad0c in git


Ignore:
Timestamp:
Jul 29, 2011, 10:40:39 AM (13 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
71955d1046512d6a8fedecbd18e77a75a4bd5fa0
Parents:
bf6a4d5920ef44ffb48d0fc83b4d53589111d60c
git-author:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2011-07-29 10:40:39+02:00
git-committer:
Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 13:01:15+01:00
Message:
p_Var, p_LOwVar -> p_polys.h, p_polys.cc
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • kernel/ideals.cc

    rbf6a4d r73ad0c  
    4242#include <kernel/longrat.h>
    4343
    44 
    45 omBin sip_sideal_bin = omGetSpecBin(sizeof(sip_sideal));
    4644
    4745/* #define WITH_OLD_MINOR */
     
    136134}
    137135
    138 /*2
    139 *the minimal index of used variables - 1
    140 */
    141 int pLowVar (poly p)
    142 {
    143   int k,l,lex;
    144 
    145   if (p == NULL) return -1;
    146 
    147   k = 32000;/*a very large dummy value*/
    148   while (p != NULL)
    149   {
    150     l = 1;
    151     lex = pGetExp(p,l);
    152     while ((l < (currRing->N)) && (lex == 0))
    153     {
    154       l++;
    155       lex = pGetExp(p,l);
    156     }
    157     l--;
    158     if (l < k) k = l;
    159     pIter(p);
    160   }
    161   return k;
    162 }
    163136
    164137/*3
  • kernel/ideals.h

    rbf6a4d r73ad0c  
    1919
    2020
    21 extern omBin sip_sideal_bin;
    22 
    23 /*- creates an ideal -*/
    24 // ideal idInit (int size, int rank=1); // in simple...
    2521ideal idCopyFirstK (const ideal ide, const int k);
    2622
     
    114110ideal idMinBase (ideal h1);
    115111  /*returns a minimized set of generators of h1*/
    116 int pLowVar (poly p);
    117   /*-the minimal index of used variables - 1-*/
    118112void    idInitChoise (int r,int beg,int end,BOOLEAN *endch,int * choise);
    119113void    idGetNextChoise (int r,int end,BOOLEAN *endch,int * choise);
  • libpolys/polys/matpol.cc

    rbf6a4d r73ad0c  
    3737
    3838#include "sparsmat.h"
    39    
    40 //omBin ip_smatrix_bin = omGetSpecBin(sizeof(ip_smatrix));
    41 #define ip_smatrix_bin sip_sideal_bin
     39
     40//omBin sip_sideal_bin = omGetSpecBin(sizeof(ip_smatrix));
    4241/*0 implementation*/
    4342
     
    5453    return NULL;
    5554  }
    56   matrix rc = (matrix)omAllocBin(ip_smatrix_bin);
     55  matrix rc = (matrix)omAllocBin(sip_sideal_bin);
    5756  rc->nrows = r;
    5857  rc->ncols = c;
     
    429428  l = pLength(sel);
    430429  co = mpNew(2, l);
    431  
     430
    432431  if (rHasLocalOrMixedOrdering(R))
    433432  {
     
    732731{
    733732  omFreeSize((ADDRESS)a->m,a->nrows*a->ncols*sizeof(poly));
    734   omFreeBin((ADDRESS)a, ip_smatrix_bin);
     733  omFreeBin((ADDRESS)a, sip_sideal_bin);
    735734}
    736735
     
    15001499{
    15011500  omFreeSize((ADDRESS)a->m,a->nrows*a->ncols*sizeof(poly));
    1502   omFreeBin((ADDRESS)a, ip_smatrix_bin);
     1501  omFreeBin((ADDRESS)a, sip_sideal_bin);
    15031502}
    15041503
  • libpolys/polys/monomials/p_polys.cc

    rbf6a4d r73ad0c  
    37983798}
    37993799
     3800int p_Var(poly m,const ring r)
     3801{
     3802  if (m==NULL) return 0;
     3803  if (pNext(m)!=NULL) return 0;
     3804  int i,e=0;
     3805  for (i=rVar(r); i>0; i--)
     3806  {
     3807    int exp=p_GetExp(m,i,r);
     3808    if (exp==1)
     3809    {
     3810      if (e==0) e=i;
     3811      else return 0;
     3812    }
     3813    else if (exp!=0)
     3814    {
     3815      return 0;
     3816    }
     3817  }
     3818  return e;
     3819}
     3820
     3821/*2
     3822*the minimal index of used variables - 1
     3823*/
     3824int p_LowVar (poly p, const ring r)
     3825{
     3826  int k,l,lex;
     3827
     3828  if (p == NULL) return -1;
     3829
     3830  k = 32000;/*a very large dummy value*/
     3831  while (p != NULL)
     3832  {
     3833    l = 1;
     3834    lex = p_GetExp(p,l,r);
     3835    while ((l < (rVar(r))) && (lex == 0))
     3836    {
     3837      l++;
     3838      lex = p_GetExp(p,l,r);
     3839    }
     3840    l--;
     3841    if (l < k) k = l;
     3842    pIter(p);
     3843  }
     3844  return k;
     3845}
     3846
    38003847/*2
    38013848* verschiebt die Indizees der Modulerzeugenden um i
  • libpolys/polys/monomials/p_polys.h

    rbf6a4d r73ad0c  
    19201920/*----------------------------------------------------*/
    19211921int   p_Var(poly mi,const ring r);
     1922/// the minimal index of used variables - 1
     1923int   p_LowVar (poly p);
    19221924
    19231925/*----------------------------------------------------*/
Note: See TracChangeset for help on using the changeset viewer.