Changeset bf36c4 in git


Ignore:
Timestamp:
May 27, 2015, 8:09:51 PM (8 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
Children:
49b7480ebc6b89c61ea6555f8f339873abbac069
Parents:
794d7ba210aeabf2fc6caef7b75934cab4be8acf
git-author:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2015-05-27 20:09:51+02:00
git-committer:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2015-05-27 21:24:40+02:00
Message:
Fixing dirty hacks (map -> ideal) for fast_map
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • Singular/ipshell.cc

    r794d7b rbf36c4  
    6868#include <math.h>
    6969#include <ctype.h>
     70#include <algorithm>
    7071
    7172// define this if you want to use the fast_map routine for mapping ideals
     
    781782        {
    782783          v->rtyp=IDEAL_CMD;
    783           v->data=fast_map(IDIDEAL(w), src_ring, (ideal)theMap, currRing);
     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         
    784791        }
    785792        else
  • Singular/maps_ip.cc

    r794d7b rbf36c4  
    4444#endif
    4545
     46#include <algorithm>
    4647
    4748/*2
     
    391392    ideal src_id=idInit(1,1);
    392393    src_id->m[0]=p;
    393     ideal res_id=fast_map(src_id,currRing,(ideal)theMap,currRing);
     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   
    394401    res=res_id->m[0];
    395402    res_id->m[0]=NULL; idDelete(&res_id);
  • libpolys/polys/monomials/maps.h

    r794d7b rbf36c4  
    99#include <coeffs/coeffs.h>
    1010#include <polys/monomials/ring.h>
    11 //#include <kernel/ideals.h>
     11//#include <polys/simpleideals.h>
    1212
    13 struct sip_smap;
    14 typedef struct sip_smap *         map;
     13struct sip_smap; typedef struct sip_smap *         map;
    1514
    1615// poly maEval(map theMap, poly p, ring dst_ring, nMapFunc nMap, ideal s=NULL);
     
    3029int maMaxDeg_P(poly p,ring preimage_r);
    3130int maMaxDeg_Ma(ideal a,ring preimage_r);
     31
    3232#endif
  • libpolys/polys/simpleideals.h

    r794d7b rbf36c4  
    4242  int ncols;
    4343};
     44
     45typedef struct sip_smap *         map;
    4446
    4547struct sideal_list;
Note: See TracChangeset for help on using the changeset viewer.