Changeset f5da37 in git


Ignore:
Timestamp:
Aug 13, 2009, 7:24:45 PM (14 years ago)
Author:
Motsak Oleksandr <motsak@…>
Branches:
(u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
Children:
7d9b62a1308b2363fd7fd805a4689167ce92ccaa
Parents:
64a88ed9bbe06816b964e301999e88484a0abab6
Message:
*motsak: some fixes


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

Legend:

Unmodified
Added
Removed
  • Singular/extra.cc

    r64a88e rf5da37  
    22*  Computer Algebra System SINGULAR      *
    33*****************************************/
    4 /* $Id: extra.cc,v 1.312 2009-08-06 10:18:00 Singular Exp $ */
     4/* $Id: extra.cc,v 1.313 2009-08-13 17:24:45 motsak Exp $ */
    55/*
    66* ABSTRACT: general interface to internals of Singular ("system" command)
     
    753753
    754754    /// Returns old SyzCompLimit, can set new limit
    755     if(strcmp(sys_cmd,"SetISReferrence")==0)
    756     {
    757       extern void rSetISReference(const ideal F, const int l, const int p, const intvec * componentWeights, const ring r);
     755    if(strcmp(sys_cmd,"SetInducedReferrence")==0)
     756    {
     757      extern void rSetISReference(const ideal F, const int rank, const int p, const intvec * componentWeights, const ring r);
    758758
    759759      if ((h!=NULL) && ( (h->Typ()==IDEAL_CMD) || (h->Typ()==MODUL_CMD)))
    760        {
     760      {
    761761        intvec * componentWeights = (intvec *)atGet(h,"isHomog",INTVEC_CMD); // No copy?!
     762
    762763        const ideal F = (ideal)h->Data(); ; // No copy!
    763764        h=h->next;
    764765
    765         int l = 0; // Starting syz-comp (1st: i+1)
     766        int rank = idRankFreeModule(F, currRing, currRing); // Starting syz-comp (1st: i+1)
    766767
    767768        if ((h!=NULL) && (h->Typ()==INT_CMD))
    768769        {
    769           l = (int)((long)(h->Data())); h=h->next;
     770          rank = (int)((long)(h->Data())); h=h->next;
    770771        }
    771772
     
    778779
    779780        // F & componentWeights belong to that ordering block of currRing now:
    780         rSetISReference(F, l, p, componentWeights, currRing); // F and componentWeights will be copied!
     781        rSetISReference(F, rank, p, componentWeights, currRing); // F and componentWeights will be copied!
    781782      }
    782783      else
     
    787788      return FALSE;
    788789    }
     790
     791
     792//    F = system("ISUpdateComponents", F, V, MIN );
     793//    // replace gen(i) -> gen(MIN + V[i-MIN]) for all i > MIN in all terms from F!
     794//    extern void pISUpdateComponents(ideal F, const intvec *const V, const int MIN, const ring r);
     795    if(strcmp(sys_cmd,"ISUpdateComponents")==0)
     796    {
     797
     798      PrintS("ISUpdateComponents:.... \n");
     799
     800      if ((h!=NULL) && (h->Typ()==MODUL_CMD))
     801      {
     802        ideal F = (ideal)h->Data(); ; // No copy!
     803        h=h->next;
     804
     805        if ((h!=NULL) && (h->Typ()==INTVEC_CMD))
     806        {
     807          const intvec* const V = (const intvec* const) h->Data();
     808          h=h->next;
     809
     810          if ((h!=NULL) && (h->Typ()==INT_CMD))
     811          {
     812            const int MIN = (int)((long)(h->Data()));
     813
     814            extern void pISUpdateComponents(ideal F, const intvec *const V, const int MIN, const ring r);
     815            pISUpdateComponents(F, V, MIN, currRing);
     816            return FALSE;
     817          }
     818        }
     819      }
     820
     821      WerrorS("`system(\"ISUpdateComponents\",<module>, intvec, int)` expected");
     822      return TRUE;
     823    }
     824   
    789825
    790826
     
    20592095#endif
    20602096/*==================== generic debug ==================================*/
    2061 #ifdef PDEBUG
    2062       if(strcmp(sys_cmd,"DebugPrint")==0)
    2063       {
     2097//#ifdef PDEBUG
     2098      if(strcmp(sys_cmd,"DetailedPrint")==0)
     2099      {
     2100        if( h == NULL )
     2101        {
     2102          WarnS("DetailedPrint needs arguments...");
     2103          return TRUE;
     2104        }
     2105       
    20642106        if( h->Typ() == RING_CMD)
    20652107        {
     
    20812123        if( h->Typ() == IDEAL_CMD || h->Typ() == MODUL_CMD)
    20822124        {
    2083           const int nTerms = 3;
    20842125          const ideal id = (const ideal)h->Data();
     2126         
     2127          h = h->Next();
     2128         
     2129          int nTerms = 3;
     2130
     2131          if( h!= NULL && h->Typ() == INT_CMD )
     2132          {
     2133            int n = (int)(long)(h->Data());
     2134            if( n < 0 )
     2135            {
     2136              Warn("Negative int argument: %d", n);
     2137            }
     2138            else
     2139              nTerms = n;
     2140          }
     2141         
    20852142          idShow(id, currRing, currRing, nTerms);
    20862143        }
     
    20892146      }
    20902147      else
    2091 #endif
     2148//#endif
    20922149/*==================== mtrack ==================================*/
    20932150    if(strcmp(sys_cmd,"mtrack")==0)
     
    21042161          fd = fopen((char*) h->Data(), "w");
    21052162          if (fd == NULL)
    2106             Warn("Can not open %s for writing og mtrack. Using stdout");
     2163            Warn("Can not open %s for writing og mtrack. Using stdout"); // %s  ???
    21072164        }
    21082165        if (h->Typ() == INT_CMD)
  • Singular/iparith.cc

    r64a88e rf5da37  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: iparith.cc,v 1.512 2009-07-28 14:18:34 Singular Exp $ */
     4/* $Id: iparith.cc,v 1.513 2009-08-13 17:24:45 motsak Exp $ */
    55
    66/*
     
    25932593static BOOLEAN jjPlural_num_poly(leftv res, leftv a, leftv b)
    25942594{
     2595  if( currRing->qideal != NULL )
     2596  {
     2597    WerrorS("basering must NOT be a qring!");
     2598    return TRUE;
     2599  }
     2600 
    25952601  if (iiOp==NCALGEBRA_CMD)
    25962602  {
     
    26082614static BOOLEAN jjPlural_num_mat(leftv res, leftv a, leftv b)
    26092615{
     2616  if( currRing->qideal != NULL )
     2617  {
     2618    WerrorS("basering must NOT be a qring!");
     2619    return TRUE;
     2620  }
     2621
    26102622  if (iiOp==NCALGEBRA_CMD)
    26112623  {
     
    26232635static BOOLEAN jjPlural_mat_poly(leftv res, leftv a, leftv b)
    26242636{
     2637  if( currRing->qideal != NULL )
     2638  {
     2639    WerrorS("basering must NOT be a qring!");
     2640    return TRUE;
     2641  }
     2642
    26252643  if (iiOp==NCALGEBRA_CMD)
    26262644  {
     
    26382656static BOOLEAN jjPlural_mat_mat(leftv res, leftv a, leftv b)
    26392657{
     2658  if( currRing->qideal != NULL )
     2659  {
     2660    WerrorS("basering must NOT be a qring!");
     2661    return TRUE;
     2662  }
     2663
    26402664  if (iiOp==NCALGEBRA_CMD)
    26412665  {
  • Singular/mod2.h.in

    r64a88e rf5da37  
    66 *          DO NOT EDIT!
    77 *
    8  *  Version: $Id: mod2.h.in,v 1.147 2009-07-28 14:18:35 Singular Exp $
     8 *  Version: $Id: mod2.h.in,v 1.148 2009-08-13 17:24:45 motsak Exp $
    99 *******************************************************************/
    1010#ifndef MOD2_H
     
    109109#undef HAVE_SIGINTERRUPT
    110110/* define for boost includes and lib */
    111 #undef HAVE_BOOST_DYNAMIC_BITSET_HPP
     111//////////////////////// #undef HAVE_BOOST_DYNAMIC_BITSET_HPP
    112112/* define for std:vector includes */
    113113#undef USE_STDVECBOOL
Note: See TracChangeset for help on using the changeset viewer.