Changeset f13c85 in git


Ignore:
Timestamp:
May 28, 2015, 2:12:00 PM (8 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
Children:
75fdcae64006ce0ba10e3d881e761f661f4fc9ea
Parents:
9750e3ed7db2557ee2bc1ca59771e04ecff78d78
Message:
format, cleanup, def. of map/sip_map at one place, ....
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • Singular/ipshell.cc

    r9750e3 rf13c85  
    6868#include <math.h>
    6969#include <ctype.h>
    70 #include <algorithm>
    7170
    7271// define this if you want to use the fast_map routine for mapping ideals
     
    782781        {
    783782          v->rtyp=IDEAL_CMD;
    784          
    785           char *tmp = (char*)1;
    786           std::swap(tmp, theMap->preimage); // map gets 1 as its rank (as an ideal)
    787           v->data=fast_map(IDIDEAL(w), src_ring, (ideal)theMap, currRing); // FIXME: this dirty hack from original Singular!
    788           std::swap(tmp, theMap->preimage); // map gets its preimage back
    789           assume( tmp == (char*)1 );
    790          
     783          char *tmp = theMap->preimage;
     784          theMap->preimage=(char*)1L;
     785          // map gets 1 as its rank (as an ideal)
     786          v->data=fast_map(IDIDEAL(w), src_ring, (ideal)theMap, currRing);
     787          theMap->preimage=tmp; // map gets its preimage back
    791788        }
    792789        else
  • Singular/maps_ip.cc

    r9750e3 rf13c85  
    4343#include <polys/monomials/maps.h>
    4444#endif
    45 
    46 #include <algorithm>
    4745
    4846/*2
     
    392390    ideal src_id=idInit(1,1);
    393391    src_id->m[0]=p;
    394    
    395     char *tmp = (char*)1;
    396     std::swap(tmp, theMap->preimage); // map gets 1 as its rank (as an ideal)
    397     ideal res_id=fast_map(src_id,currRing,(ideal)theMap,currRing); // FIXME: this dirty hack from original Singular!
    398     std::swap(tmp, theMap->preimage); // map gets its preimage back
    399     assume( tmp == (char*)1 );
    400    
     392
     393    char *tmp = theMap->preimage;
     394    theMap->preimagei=(char*)1L; // map gets 1 as its rank (as an ideal)
     395    ideal res_id=fast_map(src_id,currRing,(ideal)theMap,currRing);
     396    theMap->preimage=tmp; // map gets its preimage back
     397
    401398    res=res_id->m[0];
    402399    res_id->m[0]=NULL; idDelete(&res_id);
  • kernel/combinatorics/hdegree.cc

    r9750e3 rf13c85  
    7474  id_Test(S, currRing);
    7575  if( Q!=NULL ) id_Test(Q, currRing);
    76  
     76
    7777  int  mc;
    7878  hexist = hInit(S, Q, &hNexist, currRing);
     
    214214  id_Test(S, currRing);
    215215  if( Q!=NULL ) id_Test(Q, currRing);
    216  
     216
    217217  intvec *Set=new intvec((currRing->N));
    218218  int  mc,i;
     
    700700  id_Test(S, currRing);
    701701  if( Q!=NULL ) id_Test(Q, currRing);
    702  
     702
    703703  int  di;
    704704  int  mc;
     
    801801  id_Test(S, currRing);
    802802  if( Q!=NULL ) id_Test(Q, currRing);
    803  
     803
    804804  hDegree(S, Q);
    805805  return hMu;
     
    824824  id_Test(S, currRing);
    825825  if( Q!=NULL ) id_Test(Q, currRing);
    826  
     826
    827827  int co, mu, l;
    828828  intvec *hseries2;
     
    921921  id_TestTail(S, currRing, tailRing);
    922922  if (Q!=NULL) id_TestTail(Q, currRing, tailRing);
    923  
     923
    924924  hDegree0(S, Q, tailRing);
    925925  return hMu;
     
    10071007  id_TestTail(S, currRing, tailRing);
    10081008  if (Q!=NULL) id_TestTail(Q, currRing, tailRing);
    1009  
     1009
    10101010  int  i;
    10111011  int  k = ak;
     
    13411341{
    13421342  if( Q!=NULL) id_Test(Q, currRing);
    1343  
     1343
    13441344  int  i, di;
    13451345  poly p;
  • kernel/combinatorics/hilb.cc

    r9750e3 rf13c85  
    12991299intvec * hFirstSeries(ideal S, intvec *modulweight, ideal Q, intvec *wdegree, ring tailRing)
    13001300{
    1301   id_TestTail(S, currRing, tailRing); 
     1301  id_TestTail(S, currRing, tailRing);
    13021302  if (Q!= NULL) id_TestTail(Q, currRing, tailRing);
    1303  
     1303
    13041304  return hSeries(S, modulweight, 1, wdegree, Q, tailRing);
    13051305}
  • kernel/ideals.cc

    r9750e3 rf13c85  
    17881788ideal idMinors(matrix a, int ar, ideal R)
    17891789{
    1790  
     1790
    17911791  const ring origR=currRing;
    17921792  id_Test((ideal)a, origR);
     
    17941794  const int r = a->nrows;
    17951795  const int c = a->ncols;
    1796  
     1796
    17971797  if((ar<=0) || (ar>r) || (ar>c))
    17981798  {
     
    18001800    return NULL;
    18011801  }
    1802  
    1803   ideal h = id_Matrix2Module(mp_Copy(a,origR),origR); 
     1802
     1803  ideal h = id_Matrix2Module(mp_Copy(a,origR),origR);
    18041804  long bound = sm_ExpBound(h,c,r,ar,origR);
    18051805  id_Delete(&h, origR);
    1806  
     1806
    18071807  ring tmpR = sm_RingChange(origR,bound);
    1808  
     1808
    18091809  matrix b = mpNew(r,c);
    1810  
     1810
    18111811  for (int i=r*c-1;i>=0;i--)
    18121812    if (a->m[i] != NULL)
    18131813      b->m[i] = prCopyR(a->m[i],origR,tmpR);
    1814  
     1814
    18151815  id_Test( (ideal)b, tmpR);
    1816  
     1816
    18171817  if (R!=NULL)
    18181818  {
     
    18261826    id_Test( R, tmpR);
    18271827  }
    1828  
    1829  
     1828
     1829
    18301830  ideal result = idInit(32,1);
    18311831
    18321832  int elems = 0;
    1833  
     1833
    18341834  if(ar>1)
    18351835    mp_RecMin(ar-1,result,elems,b,r,c,NULL,R,tmpR);
    18361836  else
    18371837    mp_MinorToResult(result,elems,b,r,c,R,tmpR);
    1838  
     1838
    18391839  id_Test( (ideal)b, tmpR);
    1840  
     1840
    18411841  id_Delete((ideal *)&b, tmpR);
    1842  
     1842
    18431843  if (R!=NULL) idDelete(&R);
    1844  
     1844
    18451845  idSkipZeroes(result);
    18461846  rChangeCurrRing(origR);
  • kernel/preimage.h

    r9750e3 rf13c85  
    22#define KERNEL_PREIMAGE_H
    33
    4 struct ip_sring; typedef struct ip_sring * ring;
    5 struct sip_sideal; typedef struct sip_sideal * ideal;
    6 struct sip_smap; typedef struct sip_smap *          map;
     4#include <polys/monomials/ring.h>
    75
    86ideal maGetPreimage(ring theImageRing, map theMap, ideal id, const ring dst_r);
  • libpolys/polys/monomials/maps.h

    r9750e3 rf13c85  
    99#include <coeffs/coeffs.h>
    1010#include <polys/monomials/ring.h>
    11 //#include <polys/simpleideals.h>
    12 
    13 struct sip_smap; typedef struct sip_smap *         map;
    1411
    1512// poly maEval(map theMap, poly p, ring dst_ring, nMapFunc nMap, ideal s=NULL);
  • libpolys/polys/simpleideals.h

    r9750e3 rf13c85  
    4343};
    4444
    45 typedef struct sip_smap *         map;
     45//typedef struct sip_smap *         map;
    4646
    4747struct sideal_list;
Note: See TracChangeset for help on using the changeset viewer.