Loading...
Searching...
No Matches
ipconv.cc File Reference
`#include "kernel/mod2.h"`
`#include "Singular/tok.h"`
`#include "Singular/ipid.h"`
`#include "misc/intvec.h"`
`#include "misc/options.h"`
`#include "kernel/polys.h"`
`#include "kernel/ideals.h"`
`#include "Singular/subexpr.h"`
`#include "coeffs/numbers.h"`
`#include "coeffs/coeffs.h"`
`#include "coeffs/bigintmat.h"`
`#include "polys/matpol.h"`
`#include "Singular/links/silink.h"`
`#include "kernel/GBEngine/syz.h"`
`#include "Singular/attrib.h"`
`#include "polys/monomials/ring.h"`
`#include "Singular/ipshell.h"`
`#include "Singular/number2.h"`
`#include "Singular/ipconv.h"`
`#include "Singular/table.h"`

Go to the source code of this file.

## Data Structures

struct | sConvertTypes

## Macros

#define | IPCONV
#define | D(A)
#define | NULL_VAL NULL

## Typedefs

typedef void *(* | iiConvertProc) (void *data)
typedef void(* | iiConvertProcL) (leftv out, leftv in)

## Functions

static void * | iiI2P (void *data)
static void * | iiBI2P (void *data)
static void | iiBu2P (leftv out, leftv in)
static void * | iiI2V (void *data)
static void * | iiBI2V (void *data)
static void * | iiIV2BIV (void *data)
static void * | iiI2Id (void *data)
static void * | iiBI2Id (void *data)
static void * | iiBu2V (void *data)
static void * | iiP2V (void *data)
static void * | iiBu2Id (void *data)
static void * | iiP2Id (void *data)
static void * | iiV2Ma (void *data)
static void * | iiN2P (void *data)
static void * | iiDummy (void *data)
static void * | iiMo2Ma (void *data)
static void * | iiMa2Mo (void *data)
static void * | iiI2Iv (void *data)
static void * | iiI2N (void *data)
static void * | iiI2BI (void *data)
static void * | iiI2BIV (void *data)
static void * | iiBI2N (void *data)
static void * | iiIm2Ma (void *data)
static void * | iiIm2Bim (void *data)
static void * | iiN2Ma (void *data)
static void * | iiS2Link (void *data)
static void | iiR2L_l (leftv out, leftv in)
static void | iiL2R (leftv out, leftv in)
BOOLEAN | iiConvert (int inputType, int outputType, int index, leftv input, leftv output, const struct sConvertTypes *dConvertTypes)
int | iiTestConvert (int inputType, int outputType, const struct sConvertTypes *dConvertTypes)

## Data Structure Documentation

## sConvertTypes

struct sConvertTypes

Definition at line 115 of file gentable.cc.

Data Fields
int | i_typ |
int | o_typ |
int | p |
iiConvertProc | p |
int | pl |
iiConvertProcL | pl |

## Macro Definition Documentation

## D

#define D | ( |  | A | ) |

Value:
A
A
#define A
Definition sirandom.c:24

Definition at line 443 of file ipconv.cc.

## IPCONV

#define IPCONV

Definition at line 442 of file ipconv.cc.

## NULL_VAL

#define NULL_VAL NULL

Definition at line 444 of file ipconv.cc.

## Typedef Documentation

## iiConvertProc

typedef void *(* iiConvertProc) (void *data)

Definition at line 32 of file ipconv.cc.

## iiConvertProcL

typedef void(* iiConvertProcL) (leftv out, leftv in)

Definition at line 33 of file ipconv.cc.

## Function Documentation

## iiBI2Id()

void * iiBI2Id | ( | void * | data | ) |

static

Definition at line 108 of file ipconv.cc.

{
ideal I=idInit(1,1);
nMapFunc nMap=n_SetMap(coeffs_BIGINT,currRing->cf);
if (nMap==NULL)
{
Werror("no conversion from bigint to %s", nCoeffName(currRing->cf));
return NULL;
}
number n=nMap((number)data,coeffs_BIGINT,currRing->cf);
n_Delete((number *)&data,coeffs_BIGINT);
poly p=pNSet(n);
I->m[0]=p;
return (void *)I;
}
p
int p
Definition cfModGcd.cc:4086
n_SetMap
static FORCE_INLINE nMapFunc n_SetMap(const coeffs src, const coeffs dst)
set the mapping function pointers for translating numbers from src to dst
Definition coeffs.h:703
n_Delete
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete 'p'
Definition coeffs.h:461
nCoeffName
static FORCE_INLINE char * nCoeffName(const coeffs cf)
Definition coeffs.h:962
nMapFunc
number(* nMapFunc)(number a, const coeffs src, const coeffs dst)
maps "a", which lives in src, into dst
Definition coeffs.h:80
NULL
#define NULL
Definition omList.c:12
coeffs_BIGINT
VAR coeffs coeffs_BIGINT
Definition polys.cc:14
currRing
VAR ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition polys.cc:13
pNSet
#define pNSet(n)
Definition polys.h:314
Werror
void Werror(const char *fmt,...)
Definition reporter.cc:189
idInit
ideal idInit(int idsize, int rank)
initialise an ideal / module
Definition simpleideals.cc:35

## iiBI2N()

void * iiBI2N | ( | void * | data | ) |

static

Definition at line 256 of file ipconv.cc.

{
if (currRing==NULL) return NULL;
nMapFunc nMap=n_SetMap(coeffs_BIGINT,currRing->cf);
if (nMap==NULL)
{
Werror("no conversion from bigint to %s", nCoeffName(currRing->cf));
return NULL;
}
number n=nMap((number)data,coeffs_BIGINT,currRing->cf);
n_Delete((number *)&data, coeffs_BIGINT);
return (void*)n;
}

## iiBI2P()

void * iiBI2P | ( | void * | data | ) |

static

Definition at line 50 of file ipconv.cc.

{
nMapFunc nMap=n_SetMap(coeffs_BIGINT,currRing->cf);
if (nMap==NULL)
{
Werror("no conversion from bigint to %s", nCoeffName(currRing->cf));
return NULL;
}
number n=nMap((number)data,coeffs_BIGINT,currRing->cf);
n_Delete((number *)&data, coeffs_BIGINT);
poly p=p_NSet(n, currRing);
return (void *)p;
}
p_NSet
poly p_NSet(number n, const ring r)
returns the poly representing the number n, destroys n
Definition p_polys.cc:1474

## iiBI2V()

void * iiBI2V | ( | void * | data | ) |

static

Definition at line 79 of file ipconv.cc.

{
nMapFunc nMap=n_SetMap(coeffs_BIGINT,currRing->cf);
if (nMap==NULL)
{
Werror("no conversion from bigint to %s", nCoeffName(currRing->cf));
return NULL;
}
number n=nMap((number)data,coeffs_BIGINT,currRing->cf);
n_Delete((number *)&data, coeffs_BIGINT);
poly p=p_NSet(n, currRing);
if (p!=NULL) pSetComp(p,1);
return (void *)p;
}
pSetComp
#define pSetComp(p, v)
Definition polys.h:39

## iiBu2Id()

void * iiBu2Id | ( | void * | data | ) |

static

Definition at line 143 of file ipconv.cc.

{
ideal I=idInit(1,1);
if (data!=NULL)
{
sBucket_pt b=(sBucket_pt)data;
poly p; int l;
sBucketDestroyAdd(b,&p,&l);
I->m[0]=p;
}
return (void *)I;
}
l
int l
Definition cfEzgcd.cc:100
b
CanonicalForm b
Definition cfModGcd.cc:4111
sBucket_pt
sBucket * sBucket_pt
Definition sbuckets.h:16
sBucketDestroyAdd
void sBucketDestroyAdd(sBucket_pt bucket, poly *p, int *length)
Definition sbuckets.h:68

## iiBu2P()

void iiBu2P | ( | leftv | out,
|  | leftv | in )

static

Definition at line 64 of file ipconv.cc.

{
sBucket_pt b=(sBucket_pt)in->CopyD();
poly p; int l;
sBucketDestroyAdd(b,&p,&l);
out->data=(void*)p;
}
sleftv::CopyD
void * CopyD(int t)
Definition subexpr.cc:714
sleftv::data
void * data
Definition subexpr.h:88

## iiBu2V()

void * iiBu2V | ( | void * | data | ) |

static

Definition at line 123 of file ipconv.cc.

{
poly p=NULL;
if (data!=NULL)
{
sBucket_pt b=(sBucket_pt)data;
int l;
sBucketDestroyAdd(b,&p,&l);
if (p!=NULL) pSetCompP(p,1);
}
return (void *)p;
}
pSetCompP
#define pSetCompP(a, i)
Definition polys.h:304

## iiConvert()

BOOLEAN iiConvert | ( | int | inputType,
|  | int | outputType,
|  | int | index,
|  | leftv | input,
|  | leftv | output,
|  | const struct sConvertTypes * | dConvertTypes )

Definition at line 450 of file ipconv.cc.

{
output->Init();
if ((inputType==outputType)
|| (outputType==DEF_CMD)
|| ((outputType==IDHDL)&&(input->rtyp==IDHDL)))
{
memcpy(output,input,sizeof(*output));
input->Init();
return FALSE;
}
else if (outputType==ANY_TYPE)
{
output->rtyp=ANY_TYPE;
output->data=(char *)(long)input->Typ();
/* the name of the object:*/
if (input->e==NULL)
{
if (input->rtyp==IDHDL)
/* preserve name: copy it */
output->name=omStrDup(IDID((idhdl)(input->data)));
else if (input->name!=NULL)
{
if (input->rtyp==ALIAS_CMD)
output->name=omStrDup(input->name);
else
{
output->name=input->name;
input->name=NULL;
}
}
else if ((input->rtyp==POLY_CMD) && (input->name==NULL))
{
if (input->data!=NULL)
{
int nr=pIsPurePower((poly)input->data);
if (nr!=0)
{
if (pGetExp((poly)input->data,nr)==1)
{
output->name=omStrDup(currRing->names[nr-1]);
}
else
{
char *tmp=(char *)omAlloc(8);
snprintf(tmp,8,"%c%d",*(currRing->names[nr-1]),
(int)pGetExp((poly)input->data,nr));
output->name=tmp;
}
}
else if(pIsConstant((poly)input->data))
{
StringSetS("");
number n=(pGetCoeff((poly)input->data));
n_Write(n, currRing->cf);
(pGetCoeff((poly)input->data))=n; // n_Write may have changed n
output->name=StringEndS();
}
}
}
else if ((input->rtyp==NUMBER_CMD) && (input->name==NULL))
{
StringSetS("");
number n=(number)input->data;
n_Write(n, currRing->cf);
input->data=(void*)n; // n_Write may have changed n
output->name=StringEndS();
}
else
{
/* no need to preserve name: use it */
output->name=input->name;
input->name=NULL;
}
}
output->next=input->next;
input->next=NULL;
if (!errorreported) input->CleanUp();
return errorreported;
}
if (index!=0) /* iiTestConvert does not returned 'failure' */
{
index--;
if((dConvertTypes[index].i_typ==inputType)
&&(dConvertTypes[index].o_typ==outputType))
{
if(traceit&TRACE_CONV)
{
Print("automatic conversion %s -> %s\n",
Tok2Cmdname(inputType),Tok2Cmdname(outputType));
}
if ((currRing==NULL) && (outputType>BEGIN_RING) && (outputType<END_RING))
return TRUE;
output->rtyp=outputType;
if (dConvertTypes[index].p!=NULL)
{
output->data=dConvertTypes[index].p(input->CopyD());
}
else
{
dConvertTypes[index].pl(output,input);
}
if ((output->data==NULL)
&& ((outputType!=INT_CMD)
&&(outputType!=POLY_CMD)
&&(outputType!=VECTOR_CMD)
&&(outputType!=NUMBER_CMD)))
{
return TRUE;
}
if (errorreported) return TRUE;
output->next=input->next;
input->next=NULL;
if ((input->rtyp!=IDHDL) && (input->attribute!=NULL))
{
input->attribute->killAll(currRing);
input->attribute=NULL;
}
if (input->e!=NULL)
{
Subexpr h;
while (input->e!=NULL)
{
h=input->e->next;
omFreeBin((ADDRESS)input->e, sSubexpr_bin);
input->e=h;
}
}
//input->Init(); // seems that input (rtyp?) is still needed
return FALSE;
}
}
return TRUE;
}
TRUE
#define TRUE
Definition auxiliary.h:101
FALSE
#define FALSE
Definition auxiliary.h:97
ADDRESS
void * ADDRESS
Definition auxiliary.h:120
sattr::killAll
void killAll(const ring r)
Definition attrib.cc:189
sleftv::Typ
int Typ()
Definition subexpr.cc:1048
sleftv::name
const char * name
Definition subexpr.h:87
sleftv::rtyp
int rtyp
Definition subexpr.h:91
sleftv::Init
void Init()
Definition subexpr.h:107
sleftv::next
leftv next
Definition subexpr.h:86
sleftv::CleanUp
void CleanUp(ring r=currRing)
Definition subexpr.cc:351
sleftv::e
Subexpr e
Definition subexpr.h:105
sleftv::attribute
attr attribute
Definition subexpr.h:89
n_Write
static FORCE_INLINE void n_Write(number n, const coeffs r, const BOOLEAN bShortOut=TRUE)
Definition coeffs.h:594
Print
#define Print
Definition emacs.cc:80
errorreported
VAR short errorreported
Definition feFopen.cc:23
Tok2Cmdname
const char * Tok2Cmdname(int tok)
Definition gentable.cc:137
END_RING
@ END_RING
Definition grammar.cc:311
BEGIN_RING
@ BEGIN_RING
Definition grammar.cc:283
VECTOR_CMD
@ VECTOR_CMD
Definition grammar.cc:293
NUMBER_CMD
@ NUMBER_CMD
Definition grammar.cc:289
POLY_CMD
@ POLY_CMD
Definition grammar.cc:290
dConvertTypes
const struct sConvertTypes dConvertTypes[]
Definition table.h:1321
IDID
#define IDID(a)
Definition ipid.h:122
h
STATIC_VAR Poly * h
Definition janet.cc:971
pGetCoeff
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy
Definition monomials.h:44
omStrDup
#define omStrDup(s)
Definition omAllocDecl.h:263
omAlloc
#define omAlloc(size)
Definition omAllocDecl.h:210
omFreeBin
#define omFreeBin(addr, bin)
Definition omAllocDecl.h:259
index
static int index(p_Length length, p_Ord ord)
Definition p_Procs_Impl.h:592
pIsConstant
#define pIsConstant(p)
like above, except that Comp must be 0
Definition polys.h:239
pGetExp
#define pGetExp(p, i)
Exponent.
Definition polys.h:42
pIsPurePower
#define pIsPurePower(p)
Definition polys.h:249
StringSetS
void StringSetS(const char *st)
Definition reporter.cc:128
StringEndS
char * StringEndS()
Definition reporter.cc:151
traceit
EXTERN_VAR int traceit
Definition reporter.h:24
TRACE_CONV
#define TRACE_CONV
Definition reporter.h:48
idhdl
idrec * idhdl
Definition ring.h:22
sSubexpr_bin
VAR omBin sSubexpr_bin
Definition subexpr.cc:40
IDHDL
#define IDHDL
Definition tok.h:31
ALIAS_CMD
@ ALIAS_CMD
Definition tok.h:34
DEF_CMD
@ DEF_CMD
Definition tok.h:58
INT_CMD
@ INT_CMD
Definition tok.h:96
ANY_TYPE
#define ANY_TYPE
Definition tok.h:30

## iiDummy()

void * iiDummy | ( | void * | data | ) |

static

Definition at line 183 of file ipconv.cc.

{
return data;
}

## iiI2BI()

void * iiI2BI | ( | void * | data | ) |

static

Definition at line 213 of file ipconv.cc.

{
number n=n_Init((int)(long)data, coeffs_BIGINT);
return (void *)n;
}
n_Init
static FORCE_INLINE number n_Init(long i, const coeffs r)
a number representing i in the given coeff field/ring r
Definition coeffs.h:541

## iiI2BIV()

void * iiI2BIV | ( | void * | data | ) |

static

Definition at line 219 of file ipconv.cc.

{
number n=n_Init((int)(long)data, coeffs_BIGINT);
bigintmat *b=new bigintmat(1,1,coeffs_BIGINT);
n_Delete(&((*b)[0]),coeffs_BIGINT);
(*b)[0]=n;
return (void *)b;
}
bigintmat
Matrices of numbers.
Definition bigintmat.h:51

## iiI2Id()

void * iiI2Id | ( | void * | data | ) |

static

Definition at line 101 of file ipconv.cc.

{
ideal I=idInit(1,1);
I->m[0]=pISet((int)(long)data);
return (void *)I;
}
pISet
#define pISet(i)
Definition polys.h:313

## iiI2Iv()

void * iiI2Iv | ( | void * | data | ) |

static

Definition at line 200 of file ipconv.cc.

{
int s=(int)(long)data;
intvec *iv=new intvec(s,s);
return (void *)iv;
}
intvec
Definition intvec.h:24
s
const CanonicalForm int s
Definition facAbsFact.cc:51

## iiI2N()

void * iiI2N | ( | void * | data | ) |

static

Definition at line 207 of file ipconv.cc.

{
number n=nInit((int)(long)data);
return (void *)n;
}
nInit
#define nInit(i)
Definition numbers.h:24

## iiI2P()

void * iiI2P | ( | void * | data | ) |

static

Definition at line 44 of file ipconv.cc.

{
poly p=pISet((int)(long)data);
return (void *)p;
}

## iiI2V()

void * iiI2V | ( | void * | data | ) |

static

Definition at line 72 of file ipconv.cc.

{
poly p=pISet((int)(long)data);
if (p!=NULL) pSetComp(p,1);
return (void *)p;
}

## iiIm2Bim()

void * iiIm2Bim | ( | void * | data | ) |

static

Definition at line 369 of file ipconv.cc.

{
intvec *iv=(intvec*)data;
void *r=(void *)iv2bim(iv,coeffs_BIGINT);
delete iv;
return r;
}
iv2bim
bigintmat * iv2bim(intvec *b, const coeffs C)
Definition bigintmat.cc:347

## iiIm2Ma()

void * iiIm2Ma | ( | void * | data | ) |

static

Definition at line 352 of file ipconv.cc.

{
int i, j;
intvec *iv = (intvec *)data;
matrix m = mpNew(iv->rows(), iv->cols());
for (i=iv->rows(); i>0; i--)
{
for (j=iv->cols(); j>0; j--)
{
MATELEM(m, i, j) = pISet(IMATELEM(*iv, i, j));
}
}
delete iv;
return (void *)m;
}
m
int m
Definition cfEzgcd.cc:128
i
int i
Definition cfEzgcd.cc:132
intvec::cols
int cols() const
Definition intvec.h:96
intvec::rows
int rows() const
Definition intvec.h:97
j
int j
Definition facHensel.cc:110
IMATELEM
#define IMATELEM(M, I, J)
Definition intvec.h:86
mpNew
matrix mpNew(int r, int c)
create a r x c zero-matrix
Definition matpol.cc:37
MATELEM
#define MATELEM(mat, i, j)
1-based access to matrix
Definition matpol.h:29
matrix
ip_smatrix * matrix
Definition matpol.h:43

## iiIV2BIV()

void * iiIV2BIV | ( | void * | data | ) |

static

Definition at line 94 of file ipconv.cc.

{
intvec *aa=(intvec*)data;
bigintmat* bim=iv2biv(aa,coeffs_BIGINT);
return (void *)bim;
}
iv2biv
bigintmat * iv2biv(intvec *hilb, const coeffs cf)
Definition intvec.cc:851

## iiL2R()

void iiL2R | ( | leftv | out,
|  | leftv | in )

static

Definition at line 425 of file ipconv.cc.

{
//int add_row_shift = 0;
lists l=(lists)in->Data();
intvec *ww=NULL;
if (l->nr>=0) ww=(intvec *)atGet(&(l->m[0]),"isHomog",INTVEC_CMD);
out->data=(void *)syConvList(l);
if (ww!=NULL)
{
intvec *weights=ivCopy(ww);
atSet(out,omStrDup("isHomog"),weights,INTVEC_CMD);
}
}
atSet
void atSet(idhdl root, char *name, void *data, int typ)
Definition attrib.cc:153
atGet
void * atGet(idhdl root, const char *name, int t, void *defaultReturnValue)
Definition attrib.cc:132
sleftv::Data
void * Data()
Definition subexpr.cc:1192
ivCopy
intvec * ivCopy(const intvec *o)
Definition intvec.h:146
syConvList
syStrategy syConvList(lists li)
Definition ipshell.cc:3250
lists
slists * lists
Definition mpr_numeric.h:146
INTVEC_CMD
@ INTVEC_CMD
Definition tok.h:101

## iiMa2Mo()

void * iiMa2Mo | ( | void * | data | ) |

static

Definition at line 194 of file ipconv.cc.

{
void *res=id_Matrix2Module((matrix)data,currRing);
return res;
}
res
CanonicalForm res
Definition facAbsFact.cc:60
id_Matrix2Module
ideal id_Matrix2Module(matrix mat, const ring R)
converts mat to module, destroys mat
Definition simpleideals.cc:1560

## iiMo2Ma()

void * iiMo2Ma | ( | void * | data | ) |

static

Definition at line 188 of file ipconv.cc.

{
void *res=id_Module2Matrix((ideal)data,currRing);
return res;
}
id_Module2Matrix
matrix id_Module2Matrix(ideal mod, const ring R)
Definition simpleideals.cc:1594

## iiN2Ma()

void * iiN2Ma | ( | void * | data | ) |

static

Definition at line 391 of file ipconv.cc.

{
ideal I=idInit(1,1);
if (!nIsZero((number)data))
{
poly p=pNSet((number)data);
I->m[0]=p;
}
//else
//{
// nDelete((number *)&data);
//}
return (void *)I;
}
nIsZero
#define nIsZero(n)
Definition numbers.h:19

## iiN2P()

void * iiN2P | ( | void * | data | ) |

static

Definition at line 377 of file ipconv.cc.

{
poly p=NULL;
if (!nIsZero((number)data))
{
p=pNSet((number)data);
}
//else
//{
// nDelete((number *)&data);
//}
return (void *)p;
}

## iiP2Id()

void * iiP2Id | ( | void * | data | ) |

static

Definition at line 157 of file ipconv.cc.

{
ideal I=idInit(1,1);
if (data!=NULL)
{
poly p=(poly)data;
I->m[0]=p;
if (pGetComp(p)!=0) I->rank=pMaxComp(p);
}
return (void *)I;
}
pGetComp
#define pGetComp(p)
Component.
Definition polys.h:38
pMaxComp
#define pMaxComp(p)
Definition polys.h:300

## iiP2V()

void * iiP2V | ( | void * | data | ) |

static

Definition at line 136 of file ipconv.cc.

{
poly p=(poly)data;
if (p!=NULL) pSetCompP(p,1);
return (void *)p;
}

## iiR2L_l()

void iiR2L_l | ( | leftv | out,
|  | leftv | in )

static

Definition at line 414 of file ipconv.cc.

{
int add_row_shift = 0;
intvec *weights=(intvec*)atGet(in,"isHomog",INTVEC_CMD);
if (weights!=NULL) add_row_shift=weights->min_in();
syStrategy tmp=(syStrategy)in->CopyD();
out->data=(void *)syConvRes(tmp,TRUE,add_row_shift);
}
intvec::min_in
int min_in()
Definition intvec.h:122
syConvRes
lists syConvRes(syStrategy syzstr, BOOLEAN toDel, int add_row_shift)
Definition ipshell.cc:3178
syStrategy
ssyStrategy * syStrategy
Definition syz.h:36

## iiS2Link()

void * iiS2Link | ( | void * | data | ) |

static

Definition at line 406 of file ipconv.cc.

{
si_link l=(si_link)omAlloc0Bin(ip_link_bin);
slInit(l, (char *) data);
omFree((ADDRESS)data);
return (void *)l;
}
omAlloc0Bin
#define omAlloc0Bin(bin)
Definition omAllocDecl.h:206
omFree
#define omFree(addr)
Definition omAllocDecl.h:261
ip_link_bin
VAR omBin ip_link_bin
Definition silink.cc:41
slInit
BOOLEAN slInit(si_link l, char *istr)
Definition silink.cc:48
si_link
ip_link * si_link
Definition silink.h:20

## iiTestConvert()

int iiTestConvert | ( | int | inputType,
|  | int | outputType,
|  | const struct sConvertTypes * | dConvertTypes )

Definition at line 590 of file ipconv.cc.

{
if ((inputType==outputType)
|| (outputType==DEF_CMD)
|| (outputType==IDHDL)
|| (outputType==ANY_TYPE))
{
return -1;
}
if (inputType==UNKNOWN) return 0;
if ((currRing==NULL) && (outputType>BEGIN_RING) && (outputType<END_RING))
return 0;
//if ((currRing==NULL) && (outputType==CNUMBER_CMD))
// return 0;
// search the list
int i=0;
while (dConvertTypes[i].i_typ!=0)
{
if((dConvertTypes[i].i_typ==inputType)
&&(dConvertTypes[i].o_typ==outputType))
{
//Print("test convert %d to %d (%s -> %s):%d\n",inputType,outputType,
//Tok2Cmdname(inputType), Tok2Cmdname(outputType),i+1);
return i+1;
}
i++;
}
//Print("test convert %d to %d (%s -> %s):0, tested:%d\n",inputType,outputType,
// Tok2Cmdname(inputType), Tok2Cmdname(outputType),i);
return 0;
}
UNKNOWN
#define UNKNOWN
Definition tok.h:224

## iiV2Ma()

void * iiV2Ma | ( | void * | data | ) |

static

Definition at line 170 of file ipconv.cc.

{
matrix m=(matrix)idVec2Ideal((poly)data);
int h=MATCOLS(m);
MATCOLS(m)=MATROWS(m);
MATROWS(m)=h;
m->rank=h;
pDelete((poly *)&data);
return (void *)m;
}
idVec2Ideal
static ideal idVec2Ideal(poly vec)
Definition ideals.h:173
MATROWS
#define MATROWS(i)
Definition matpol.h:26
MATCOLS
#define MATCOLS(i)
Definition matpol.h:27
pDelete
#define pDelete(p_ptr)
Definition polys.h:187