[BACK]Return to ntlconv.cpp CVS log [TXT][DIR] Up to [local] / OpenXM / src / ox_ntl

Diff for /OpenXM/src/ox_ntl/ntlconv.cpp between version 1.2 and 1.5

version 1.2, 2003/11/15 09:06:20 version 1.5, 2003/11/27 14:19:50
Line 1 
Line 1 
 /* $OpenXM: OpenXM/src/ox_ntl/ntlconv.cpp,v 1.1 2003/11/08 12:34:00 iwane Exp $ */  /* $OpenXM: OpenXM/src/ox_ntl/ntlconv.cpp,v 1.4 2003/11/17 12:04:20 iwane Exp $ */
   
 #include <NTL/ZZX.h>  #include <NTL/ZZX.h>
 #include <NTL/mat_ZZ.h>  #include <NTL/mat_ZZ.h>
Line 11 
Line 11 
 #define __NTL_PRINT (1)  #define __NTL_PRINT (1)
 #endif  #endif
   
   /*==========================================================================*
    * Block interrupt input
    *==========================================================================*/
 #define BLOCK_NEW_CMO()         BLOCK_INPUT()  #define BLOCK_NEW_CMO()         BLOCK_INPUT()
 #define UNBLOCK_NEW_CMO()       UNBLOCK_INPUT()  #define UNBLOCK_NEW_CMO()       UNBLOCK_INPUT()
   
Line 145  cmo_zz *
Line 148  cmo_zz *
 ZZ_to_cmo_zz(const ZZ &z)  ZZ_to_cmo_zz(const ZZ &z)
 {  {
         cmo_zz *c;          cmo_zz *c;
           char *ptr;
   
         ostrstream sout;          std::ostrstream sout;
         sout << z << '\0';          sout << z << '\0';
           ptr = sout.str();
   
         BLOCK_NEW_CMO();          BLOCK_NEW_CMO();
         c = new_cmo_zz_set_string(sout.str());          c = new_cmo_zz_set_string(ptr);
         UNBLOCK_NEW_CMO();          UNBLOCK_NEW_CMO();
   
           delete [] ptr;
   
         return (c);          return (c);
 }  }
Line 215  cmo_list *
Line 222  cmo_list *
 mat_zz_to_cmo(mat_ZZ &mat)  mat_zz_to_cmo(mat_ZZ &mat)
 {  {
         cmo_list *list;          cmo_list *list;
         int ret;  
   
         cmo_zz *zz;          cmo_zz *zz;
         int row, col;          int row, col;
Line 308  cmo_to_mat_zz(mat_ZZ &mat, cmo *m)
Line 314  cmo_to_mat_zz(mat_ZZ &mat, cmo *m)
   
   
   
   
   
   
   
   
   
 /****************************************************************************  /****************************************************************************
  * convert cmo to ZZX which is polynomial in Z[x]   * convert cmo to ZZX which is polynomial in Z[x]
  *   *
Line 339  cmo_to_ZZX(ZZX &f, cmo *m, cmo_indeterminate *&x)
Line 339  cmo_to_ZZX(ZZX &f, cmo *m, cmo_indeterminate *&x)
                         return (NTL_FAILURE);                          return (NTL_FAILURE);
                 }                  }
                 {                  {
                         istrstream sin(str, strlen(str));                          std::istrstream sin(str, strlen(str));
                         sin >> f;                          sin >> f;
                 }                  }
                 break;                  break;
Line 385  cmo_to_ZZX(ZZX &f, cmo *m, cmo_indeterminate *&x)
Line 385  cmo_to_ZZX(ZZX &f, cmo *m, cmo_indeterminate *&x)
         }          }
         return (NTL_SUCCESS);          return (NTL_SUCCESS);
 }  }
   
   
   
 /****************************************************************************  /****************************************************************************
  * convert polynomial in Z[x] to cmo_recursive_polynomial   * convert polynomial in Z[x] to cmo_recursive_polynomial

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.5

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>