Difference between revisions of "ApCoCoA-1:MatlabCoCoAIdeal"
(Category added) |
m (Format changes) |
||
Line 49: | Line 49: | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td> get </td><td> </td><td> </td><td> Returns the attributes of an ideal. Syntax: get(idealVar, 'Keyword'), where idealVar is a CoCoAIdeal and 'Keyword' is one of the keywords: | + | <td> get </td><td> </td><td> </td><td> Returns the attributes of an ideal. Syntax: <br> |
− | 'BaseRing': Returns the ring over which the polynomials in the generator list are defined. | + | get(idealVar, 'Keyword'), where idealVar is a CoCoAIdeal and 'Keyword' is one of the keywords:<br> |
− | 'Gens': returns the generator array of CoCoAPoly's | + | 'BaseRing': Returns the ring over which the polynomials in the generator list are defined.<br> |
− | 'GBasis': returns the GBasis of the Ideal if it has been computed. Otherwise [] is returned. | + | 'Gens': returns the generator array of CoCoAPoly's<br> |
− | 'NumElements': Returns the number of basis elements. If gBasis is not yet computed the number of generators is returned. | + | 'GBasis': returns the GBasis of the Ideal if it has been computed. Otherwise [] is returned.<br> |
− | 'String': Returns the polynomial as a string. | + | 'NumElements': Returns the number of basis elements. If gBasis is not yet computed the number of generators is returned.<br> |
+ | 'String': Returns the polynomial as a string.<br> | ||
'Latex' will return a string using Latex syntax.</td> | 'Latex' will return a string using Latex syntax.</td> | ||
</tr> | </tr> | ||
Line 81: | Line 82: | ||
* Ideal generated by two polynomials. | * Ideal generated by two polynomials. | ||
<matlab> | <matlab> | ||
− | p1 = CoCoAPoly( | + | p1 = CoCoAPoly('x^2-1'); |
− | p2 = CoCoAPoly( | + | p2 = CoCoAPoly('y+x'); |
myIdeal = CoCoAIdeal([p1 p2]); | myIdeal = CoCoAIdeal([p1 p2]); | ||
</matlab> | </matlab> | ||
[[Category:MatlabToolbox]] | [[Category:MatlabToolbox]] |
Revision as of 15:25, 18 June 2008
Introduction
The CoCoAIdeal class represents an ideal of polynomials over a given polynomial ring (See <a href="MatlabCoCoAPoly.html">Poly class</a>).
Constructor
The constructor for a CoCoAIdeal can have two arguments:
- Generators: Array of polynomials
- Optional: 1/0 : 1 = Compute Groebner-Basis of Ideal
If no input is given the default ideal (1) over Q[x[1]] is returned Generators should be a 1xn CoCoAPoly array. A nx1 array is transposed.
Attributes
basering | A CoCoARing | |
gens | an array of polynomials | |
gBasis | the Groebner-Basis of an Ideal | |
numBasisElements | The number of basis elements. If gBasis is not yet computed the number of generators is stored. |
Methods
Method | Operator | Description | |
computeGBasis | computes the GBasis of the given Ideal and returns a new ideal with the same set of generators and the computed GBasis. | ||
computeLT | computes the leading term of the ideal. Returns a CoCoAPoly. | ||
display | Is used by Matlab to print a CoCoAIdeal to the command window. E.g. when a command is not terminated by a ';'. | ||
eq | == | Compares two ideals. Returns 1 if all generators are equal. | |
ge | >= | Compares two ideals according to their leading term. Returns 1 if first ideal is greater equal the second ideal. | |
get | Returns the attributes of an ideal. Syntax: get(idealVar, 'Keyword'), where idealVar is a CoCoAIdeal and 'Keyword' is one of the keywords: |
||
gt | > | Compares two ideals according to their leading term. Returns 1 if first ideal is greater than the second ideal. | |
isContained | Returns 1 if the first ideal is contained in the second ideal. | ||
isElem | Returns 1 if the polynomial (2. argument) is in the ideal (1. argument) | ||
le | <= | Compares two ideals according to their leading term. Returns 1 if first ideal is less equal the second ideal. | |
lt | < | Compares two ideals according to their leading term. Returns 1 if first ideal is less than the second ideal. | |
ne | ~= | returns NOT eq. |
Examples
A collection of examples is provided in the file TestCoCoAIdeal.m. This file defines the function TestCoCoAIdeal which will run and display many examples. A few common examples are presented below.
- Ideal generated by two polynomials.
<matlab> p1 = CoCoAPoly('x^2-1'); p2 = CoCoAPoly('y+x'); myIdeal = CoCoAIdeal([p1 p2]); </matlab>