Difference between revisions of "ApCoCoA-1:MatlabCoCoAModule"

From ApCoCoAWiki
(Initial set up)
 
m (Table format change)
 
(One intermediate revision by the same user not shown)
Line 10: Line 10:
 
     <table border="1">
 
     <table border="1">
 
       <tr>
 
       <tr>
         <td> basering </td><td>&nbsp;</td><td> A CoCoARing</td>
+
         <td> basering </td><td> A CoCoARing</td>
 
       </tr>
 
       </tr>
 
       <tr>
 
       <tr>
         <td> gens </td><td>&nbsp;</td><td> an array of polynomials</td>
+
         <td> gens </td><td> an array of polynomials</td>
 
       </tr>
 
       </tr>
 
       <tr>
 
       <tr>
         <td> gBasis </td><td>&nbsp;</td><td> the Groebner-Basis of a Module (Currently computation is not implemented)</td>
+
         <td> gBasis </td><td> the Groebner-Basis of a Module (Currently computation is not implemented)</td>
 
       </tr>
 
       </tr>
 
       <tr>
 
       <tr>
         <td> numBasisElements </td><td>&nbsp;</td><td> The number of basis elements. If gBasis is not yet computed the number of generators is stored.</td>
+
         <td> numBasisElements </td><td> The number of basis elements. If gBasis is not yet computed the number of generators is stored.</td>
 
       </tr>
 
       </tr>
 
       <tr>
 
       <tr>
         <td> numComponents </td><td>&nbsp;</td><td> The number of components = size(Basis,2)</td>
+
         <td> numComponents </td><td> The number of components = size(Basis,2)</td>
 
       </tr>
 
       </tr>
 
     </table>
 
     </table>
Line 30: Line 30:
 
     <table border="1">
 
     <table border="1">
 
       <tr>
 
       <tr>
         <td><b>Method</b></td><td>&nbsp;</td><td><b>Description</b></td>
+
         <td><b>Method</b></td><td><b>Description</b></td>
 
       </tr>
 
       </tr>
 
       <tr>
 
       <tr>
         <td> display</td><td>&nbsp;</td><td> Is used by Matlab to print a CoCoAModule to the command window. E.g. when a command is not terminated by a ';'.</td>
+
         <td> display</td><td> Is used by Matlab to print a CoCoAModule to the command window. E.g. when a command is not terminated by a ';'.</td>
 
       </tr>
 
       </tr>
 
       <tr>
 
       <tr>
         <td> get</td><td>&nbsp;</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> 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(<span class="string">'x^2-1'</span>);
+
p1 = CoCoAPoly('x^2-1');
p2 = CoCoAPoly(<span class="string">'y+x'</span>);
+
p2 = CoCoAPoly('y+x');
p3 = CoCoAPoly(<span class="string">'x^2y'</span>);
+
p3 = CoCoAPoly('x^2y');
p4 = CoCoAPoly(<span class="string">'y'</span>);
+
p4 = CoCoAPoly('y');
 
myModule = CoCoAModule([p1 p2 ; p3 p4]);
 
myModule = CoCoAModule([p1 p2 ; p3 p4]);
 
</matlab>
 
</matlab>
  
 
[[Category:MatlabToolbox]]
 
[[Category:MatlabToolbox]]

Latest revision as of 16:55, 19 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

MethodDescription
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:
'BaseRing': Returns the ring over which the polynomials in the generator list are defined.
'Gens': returns the generator array of CoCoAPoly's
'GBasis': returns the GBasis of the Module if it has been computed. Otherwise [] is returned.
'NumElements': Returns the number of basis elements. If gBasis is not yet computed the number of generators is returned.
'NumComponents': Returns the number of components = size(Gens,2)
'String': Returns the polynomial as a string.

'Latex' will return a string using Latex syntax.

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>