previous  next
Toric.CheckInput
Syntax
Toric.CheckInput(E:OBJECT):BOOL
Toric.CheckInput(E:OBJECT,X:LIST):BOOL
Summary
check input to 'Toric'
Description
This function checks if E or (E,X) is suitable input for 'Toric'.
Thus, E should be either a list of homogeneous binomials (without
coefficients) or a matrix of non-negative integers.  In the former
case, X must be a list of indeterminates (in the latter, X would be
ignored by 'Toric' anyway).

Example

Use R ::= Q[x,y,z];
Toric.CheckInput([[1,2,3,4],[4,5,6,7]]);
TRUE
-------------------------------
Toric.CheckInput([[-1,2],[3,4]]);
ERROR: entries must be non-negative integers
CONTEXT: Return(Error(Toric_IntMatrix))
-------------------------------
Toric.CheckInput([xy-z^2,x^3-y^2z]);
TRUE
-------------------------------
Toric.CheckInput([3xy-z^2,x^3-y^2z]); -- the binomials should not
                                      -- have coefficients
ERROR: generators must be of type: power-product - power-product
CONTEXT: Return(Error(Toric_PP))
-------------------------------
Toric.CheckInput([xy-z^2,x^3-y^2z],[x]);
TRUE
-------------------------------

See also: