Difference between revisions of "ApCoCoA-1:MatlabCoCoAIdeal"
(Initial set up) |
m (Table format change) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 14: | Line 14: | ||
<table border="1"> | <table border="1"> | ||
<tr> | <tr> | ||
− | <td> basering | + | <td> basering </td><td> A CoCoARing |
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td> gens | + | <td> gens </td><td> an array of polynomials |
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td> gBasis | + | <td> gBasis </td><td> the Groebner-Basis of an Ideal |
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td> numBasisElements | + | <td> numBasisElements </td><td> The number of basis elements. If gBasis is not yet computed the number of generators is stored. |
</tr> | </tr> | ||
</table> | </table> | ||
Line 31: | Line 31: | ||
<table border="1"> | <table border="1"> | ||
<tr> | <tr> | ||
− | <td><b>Method</b> | + | <td><b>Method</b></td><td><b>Operator</b></td><td><b>Description</b></td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td> computeGBasis | + | <td> computeGBasis </td><td> </td><td> computes the GBasis of the given Ideal and returns a new ideal with the same set of generators and the computed GBasis.</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td> computeLT | + | <td> computeLT </td><td> </td><td> computes the leading term of the ideal. Returns a CoCoAPoly.</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td> display | + | <td> display </td><td> </td><td> Is used by Matlab to print a CoCoAIdeal to the command window. E.g. when a command is not terminated by a ';'.</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td> eq | + | <td> eq </td><td>==</td><td> Compares two ideals. Returns 1 if all generators are equal.</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td> ge | + | <td> ge </td><td>>=</td><td> Compares two ideals according to their leading term. Returns 1 if first ideal is greater equal the second ideal.</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td> get | + | <td> get </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> | ||
<tr> | <tr> | ||
− | <td> gt | + | <td> gt </td><td>></td><td> Compares two ideals according to their leading term. Returns 1 if first ideal is greater than the second ideal.</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td> isContained | + | <td> isContained </td><td> </td><td> Returns 1 if the first ideal is contained in the second ideal.</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td> isElem | + | <td> isElem </td><td> </td><td> Returns 1 if the polynomial (2. argument) is in the ideal (1. argument)</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td> le | + | <td> le </td><td><=</td><td> Compares two ideals according to their leading term. Returns 1 if first ideal is less equal the second ideal.</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td> lt | + | <td> lt </td><td><</td><td> Compares two ideals according to their leading term. Returns 1 if first ideal is less than the second ideal.</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td> ne | + | <td> ne </td><td>~=</td><td> returns NOT eq.</td> |
</tr> | </tr> | ||
</table> | </table> | ||
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]] |
Latest revision as of 16:54, 19 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>