Difference between revisions of "ApCoCoA-1:MatlabCoCoAModule"
(Initial set up) |
m (format changes) |
||
Line 36: | Line 36: | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td> get</td><td> </td><td> Returns the attributes of a module. Syntax: get(moduleVar, 'Keyword'), where moduleVar is a CoCoAModule and 'Keyword' is one of the keywords: | + | <td> get</td><td> </td><td> Returns the attributes of a module. Syntax: <br> |
− | 'BaseRing': Returns the ring over which the polynomials in the generator list are defined. | + | get(moduleVar, 'Keyword'), where moduleVar is a CoCoAModule 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 Module 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 Module if it has been computed. Otherwise [] is returned.<br> |
− | 'NumComponents': Returns the number of components = size(Gens,2) | + | '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. | + | 'NumComponents': Returns the number of components = size(Gens,2)<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 52: | Line 53: | ||
* Module generated by four polynomials. | * Module generated by four polynomials. | ||
<matlab> | <matlab> | ||
− | p1 = CoCoAPoly( | + | p1 = CoCoAPoly('x^2-1'); |
− | p2 = CoCoAPoly( | + | p2 = CoCoAPoly('y+x'); |
− | p3 = CoCoAPoly( | + | p3 = CoCoAPoly('x^2y'); |
− | p4 = CoCoAPoly( | + | p4 = CoCoAPoly('y'); |
myModule = CoCoAModule([p1 p2 ; p3 p4]); | myModule = CoCoAModule([p1 p2 ; p3 p4]); | ||
</matlab> | </matlab> | ||
[[Category:MatlabToolbox]] | [[Category:MatlabToolbox]] |
Revision as of 15:24, 18 June 2008
Introduction
The CoCoAModule class represents a module of polynomials over a given polynomial ring (See <a href="MatlabCoCoAPoly.html">Poly class</a>).
Constructor
The constructor for a CoCoAModule takes an array of polynomials. If no input is given the default module (1) over Q[x[1]] is returned Generators should be a MxN CoCoAPoly array.
Attributes
basering | A CoCoARing | |
gens | an array of polynomials | |
gBasis | the Groebner-Basis of a Module (Currently computation is not implemented) | |
numBasisElements | The number of basis elements. If gBasis is not yet computed the number of generators is stored. | |
numComponents | The number of components = size(Basis,2) |
Methods
Method | Description | |
display | Is used by Matlab to print a CoCoAModule to the command window. E.g. when a command is not terminated by a ';'. | |
get | Returns the attributes of a module. Syntax: get(moduleVar, 'Keyword'), where moduleVar is a CoCoAModule and 'Keyword' is one of the keywords: |
Examples
A collection of examples is provided in the file TestCoCoAModule.m. This file defines the function TestCoCoAModule which will run and display many examples. A few common examples are presented below.
- Module generated by four polynomials.
<matlab> p1 = CoCoAPoly('x^2-1'); p2 = CoCoAPoly('y+x'); p3 = CoCoAPoly('x^2y'); p4 = CoCoAPoly('y'); myModule = CoCoAModule([p1 p2 ; p3 p4]); </matlab>