version 1.3, 2003/11/16 13:48:08 |
version 1.5, 2003/11/27 14:19:50 |
|
|
/* $OpenXM: OpenXM/src/ox_ntl/ntlconv.cpp,v 1.2 2003/11/15 09:06:20 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 150 ZZ_to_cmo_zz(const ZZ &z) |
|
Line 150 ZZ_to_cmo_zz(const ZZ &z) |
|
cmo_zz *c; |
cmo_zz *c; |
char *ptr; |
char *ptr; |
|
|
ostrstream sout; |
std::ostrstream sout; |
sout << z << '\0'; |
sout << z << '\0'; |
ptr = sout.str(); |
ptr = sout.str(); |
|
|
|
|
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 315 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 346 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 392 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 |