http://apcocoa.uni-passau.de/wiki/api.php?action=feedcontributions&user=87.168.253.74&feedformat=atomApCoCoAWiki - User contributions [en]2024-03-29T11:46:56ZUser contributionsMediaWiki 1.35.0http://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoA-1:MatlabCoCoAModule&diff=7465ApCoCoA-1:MatlabCoCoAModule2008-06-18T15:21:00Z<p>87.168.253.74: Initial set up</p>
<hr />
<div>=Introduction=<br />
The CoCoAModule class represents a module of polynomials over a given polynomial ring (See <a href="MatlabCoCoAPoly.html">Poly class</a>).<br />
<br />
=Constructor=<br />
The constructor for a CoCoAModule takes an array of polynomials.<br />
If no input is given the default module (1) over Q[x[1]] is returned Generators should be a MxN CoCoAPoly array.<br />
<br />
=Attributes=<br />
<br />
<table border="1"><br />
<tr><br />
<td> basering </td><td>&nbsp;</td><td> A CoCoARing</td><br />
</tr><br />
<tr><br />
<td> gens </td><td>&nbsp;</td><td> an array of polynomials</td><br />
</tr><br />
<tr><br />
<td> gBasis </td><td>&nbsp;</td><td> the Groebner-Basis of a Module (Currently computation is not implemented)</td><br />
</tr><br />
<tr><br />
<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><br />
</tr><br />
<tr><br />
<td> numComponents </td><td>&nbsp;</td><td> The number of components = size(Basis,2)</td><br />
</tr><br />
</table><br />
<br />
<h1>Methods</h1><br />
<br />
<table border="1"><br />
<tr><br />
<td><b>Method</b></td><td>&nbsp;</td><td><b>Description</b></td><br />
</tr><br />
<tr><br />
<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><br />
</tr><br />
<tr><br />
<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:<br />
'BaseRing': Returns the ring over which the polynomials in the generator list are defined.<br />
'Gens': returns the generator array of CoCoAPoly's<br />
'GBasis': returns the GBasis of the Module if it has been computed. Otherwise [] is returned.<br />
'NumElements': Returns the number of basis elements. If gBasis is not yet computed the number of generators is returned.<br />
'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><br />
</tr><br />
</table><br />
<br />
=Examples=<br />
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.<br />
<br />
* Module generated by four polynomials.<br />
<matlab><br />
p1 = CoCoAPoly(<span class="string">'x^2-1'</span>);<br />
p2 = CoCoAPoly(<span class="string">'y+x'</span>);<br />
p3 = CoCoAPoly(<span class="string">'x^2y'</span>);<br />
p4 = CoCoAPoly(<span class="string">'y'</span>);<br />
myModule = CoCoAModule([p1 p2 ; p3 p4]);<br />
</matlab><br />
<br />
[[Category:MatlabToolbox]]</div>87.168.253.74http://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoA-1:MatlabCoCoAIdeal&diff=7464ApCoCoA-1:MatlabCoCoAIdeal2008-06-18T15:16:11Z<p>87.168.253.74: Category added</p>
<hr />
<div>=Introduction=<br />
The CoCoAIdeal class represents an ideal of polynomials over a given polynomial ring (See <a href="MatlabCoCoAPoly.html">Poly class</a>).<br />
<br />
=Constructor=<br />
The constructor for a CoCoAIdeal can have two arguments:<br />
<br />
* Generators: Array of polynomials<br />
* Optional: 1/0 : 1 = Compute Groebner-Basis of Ideal<br />
<br />
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.<br />
<br />
=Attributes=<br />
<br />
<table border="1"><br />
<tr><br />
<td> basering </td><td>&nbsp;</td><td> A CoCoARing<br />
</tr><br />
<tr><br />
<td> gens </td><td>&nbsp;</td><td> an array of polynomials<br />
</tr><br />
<tr><br />
<td> gBasis </td><td>&nbsp;</td><td> the Groebner-Basis of an Ideal<br />
</tr><br />
<tr><br />
<td> numBasisElements </td><td>&nbsp;</td><td> The number of basis elements. If gBasis is not yet computed the number of generators is stored.<br />
</tr><br />
</table><br />
<br />
=Methods=<br />
<br />
<table border="1"><br />
<tr><br />
<td><b>Method</b></td><td>&nbsp;</td><td><b>Operator</b></td><td><b>Description</b></td><br />
</tr><br />
<tr><br />
<td> computeGBasis </td><td>&nbsp;</td><td>&nbsp;</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><br />
</tr><br />
<tr><br />
<td> computeLT </td><td>&nbsp;</td><td>&nbsp;</td><td> computes the leading term of the ideal. Returns a CoCoAPoly.</td><br />
</tr><br />
<tr><br />
<td> display </td><td>&nbsp;</td><td>&nbsp;</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><br />
</tr><br />
<tr><br />
<td> eq </td><td>&nbsp;</td><td>==</td><td> Compares two ideals. Returns 1 if all generators are equal.</td><br />
</tr><br />
<tr><br />
<td> ge </td><td>&nbsp;</td><td>>=</td><td> Compares two ideals according to their leading term. Returns 1 if first ideal is greater equal the second ideal.</td><br />
</tr><br />
<tr><br />
<td> get </td><td>&nbsp;</td><td>&nbsp;</td><td> Returns the attributes of an ideal. Syntax: get(idealVar, 'Keyword'), where idealVar is a CoCoAIdeal and 'Keyword' is one of the keywords:<br />
'BaseRing': Returns the ring over which the polynomials in the generator list are defined.<br />
'Gens': returns the generator array of CoCoAPoly's<br />
'GBasis': returns the GBasis of the Ideal if it has been computed. Otherwise [] is returned.<br />
'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><br />
</tr><br />
<tr><br />
<td> gt </td><td>&nbsp;</td><td>></td><td> Compares two ideals according to their leading term. Returns 1 if first ideal is greater than the second ideal.</td><br />
</tr><br />
<tr><br />
<td> isContained </td><td>&nbsp;</td><td>&nbsp;</td><td> Returns 1 if the first ideal is contained in the second ideal.</td><br />
</tr><br />
<tr><br />
<td> isElem </td><td>&nbsp;</td><td>&nbsp;</td><td> Returns 1 if the polynomial (2. argument) is in the ideal (1. argument)</td><br />
</tr><br />
<tr><br />
<td> le </td><td>&nbsp;</td><td><=</td><td> Compares two ideals according to their leading term. Returns 1 if first ideal is less equal the second ideal.</td><br />
</tr><br />
<tr><br />
<td> lt </td><td>&nbsp;</td><td><</td><td> Compares two ideals according to their leading term. Returns 1 if first ideal is less than the second ideal.</td><br />
</tr><br />
<tr><br />
<td> ne </td><td>&nbsp;</td><td>~=</td><td> returns NOT eq.</td><br />
</tr><br />
</table><br />
<br />
=Examples=<br />
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.<br />
* Ideal generated by two polynomials.<br />
<matlab><br />
p1 = CoCoAPoly(<span class="string">'x^2-1'</span>);<br />
p2 = CoCoAPoly(<span class="string">'y+x'</span>);<br />
myIdeal = CoCoAIdeal([p1 p2]);<br />
</matlab><br />
<br />
[[Category:MatlabToolbox]]</div>87.168.253.74http://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoA-1:MatlabCoCoAIdeal&diff=7463ApCoCoA-1:MatlabCoCoAIdeal2008-06-18T15:15:10Z<p>87.168.253.74: Initial set up</p>
<hr />
<div>=Introduction=<br />
The CoCoAIdeal class represents an ideal of polynomials over a given polynomial ring (See <a href="MatlabCoCoAPoly.html">Poly class</a>).<br />
<br />
=Constructor=<br />
The constructor for a CoCoAIdeal can have two arguments:<br />
<br />
* Generators: Array of polynomials<br />
* Optional: 1/0 : 1 = Compute Groebner-Basis of Ideal<br />
<br />
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.<br />
<br />
=Attributes=<br />
<br />
<table border="1"><br />
<tr><br />
<td> basering </td><td>&nbsp;</td><td> A CoCoARing<br />
</tr><br />
<tr><br />
<td> gens </td><td>&nbsp;</td><td> an array of polynomials<br />
</tr><br />
<tr><br />
<td> gBasis </td><td>&nbsp;</td><td> the Groebner-Basis of an Ideal<br />
</tr><br />
<tr><br />
<td> numBasisElements </td><td>&nbsp;</td><td> The number of basis elements. If gBasis is not yet computed the number of generators is stored.<br />
</tr><br />
</table><br />
<br />
=Methods=<br />
<br />
<table border="1"><br />
<tr><br />
<td><b>Method</b></td><td>&nbsp;</td><td><b>Operator</b></td><td><b>Description</b></td><br />
</tr><br />
<tr><br />
<td> computeGBasis </td><td>&nbsp;</td><td>&nbsp;</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><br />
</tr><br />
<tr><br />
<td> computeLT </td><td>&nbsp;</td><td>&nbsp;</td><td> computes the leading term of the ideal. Returns a CoCoAPoly.</td><br />
</tr><br />
<tr><br />
<td> display </td><td>&nbsp;</td><td>&nbsp;</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><br />
</tr><br />
<tr><br />
<td> eq </td><td>&nbsp;</td><td>==</td><td> Compares two ideals. Returns 1 if all generators are equal.</td><br />
</tr><br />
<tr><br />
<td> ge </td><td>&nbsp;</td><td>>=</td><td> Compares two ideals according to their leading term. Returns 1 if first ideal is greater equal the second ideal.</td><br />
</tr><br />
<tr><br />
<td> get </td><td>&nbsp;</td><td>&nbsp;</td><td> Returns the attributes of an ideal. Syntax: get(idealVar, 'Keyword'), where idealVar is a CoCoAIdeal and 'Keyword' is one of the keywords:<br />
'BaseRing': Returns the ring over which the polynomials in the generator list are defined.<br />
'Gens': returns the generator array of CoCoAPoly's<br />
'GBasis': returns the GBasis of the Ideal if it has been computed. Otherwise [] is returned.<br />
'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><br />
</tr><br />
<tr><br />
<td> gt </td><td>&nbsp;</td><td>></td><td> Compares two ideals according to their leading term. Returns 1 if first ideal is greater than the second ideal.</td><br />
</tr><br />
<tr><br />
<td> isContained </td><td>&nbsp;</td><td>&nbsp;</td><td> Returns 1 if the first ideal is contained in the second ideal.</td><br />
</tr><br />
<tr><br />
<td> isElem </td><td>&nbsp;</td><td>&nbsp;</td><td> Returns 1 if the polynomial (2. argument) is in the ideal (1. argument)</td><br />
</tr><br />
<tr><br />
<td> le </td><td>&nbsp;</td><td><=</td><td> Compares two ideals according to their leading term. Returns 1 if first ideal is less equal the second ideal.</td><br />
</tr><br />
<tr><br />
<td> lt </td><td>&nbsp;</td><td><</td><td> Compares two ideals according to their leading term. Returns 1 if first ideal is less than the second ideal.</td><br />
</tr><br />
<tr><br />
<td> ne </td><td>&nbsp;</td><td>~=</td><td> returns NOT eq.</td><br />
</tr><br />
</table><br />
<br />
=Examples=<br />
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.<br />
* Ideal generated by two polynomials.<br />
<matlab><br />
p1 = CoCoAPoly(<span class="string">'x^2-1'</span>);<br />
p2 = CoCoAPoly(<span class="string">'y+x'</span>);<br />
myIdeal = CoCoAIdeal([p1 p2]);<br />
</matlab></div>87.168.253.74http://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoA-1:MatlabCoCoAPoly&diff=7462ApCoCoA-1:MatlabCoCoAPoly2008-06-18T15:07:33Z<p>87.168.253.74: Tables updated</p>
<hr />
<div>=Introduction=<br />
The CoCoAPoly class represents a polynomial over a given polynomial ring (See [http://www.apcocoa.org/wiki/ApCoCoA:MatlabCoCoARing CoCoARing]).<br />
<br />
It is based on a representation of the terms by using the logarithm of the term. For example the polynomial ''x^2+2y+3xy+4'' defined over the Ring Q[x,y] can be represented in a matrix of the following form:<br />
<table align="center" border="1"><br />
<tr><br />
<td align="center">coeff</td><td align="center">power x</td><td align="center">power y</td><br />
</tr><br />
<tr><br />
<td align="center">1</td><td align="center">2</td><td align="center">0</td><br />
</tr><br />
<tr><br />
<td align="center">2</td><td align="center">0</td><td align="center">1</td><br />
</tr><br />
<tr><br />
<td align="center">3</td><td align="center">1</td><td align="center">1</td><br />
</tr><br />
<tr><br />
<td align="center">4</td><td align="center">0</td><td align="center">0</td><br />
</tr><br />
</table><br />
<br />
=Constructor=<br />
The constructor for a CoCoAPoly can be used in one of the three different forms: <br />
*CoCoAPoly('keyword1',value1,'keyword2','value2',...). <br />
Available keywords are listed below:<br />
<table border="1"><br />
<tr><br />
<td>''Keyword''</td><td>''Description''</td><td>''Default''</td> <br />
</tr><br />
<tr><br />
<td>Ring</td><td>A CoCoARing object</td><td>Q[x[1]]</td><br />
</tr><br />
<tr><br />
<td>Terms</td><td>A term representing matrix as described above.<br>Can also be the string 'One' or 'Zero'.<br>This will generate the constant 1 or 0 polynomial.</td><td>[0 0]</td><br />
</tr><br />
</table><br />
Table 1: Keywords for CoCoAPoly<br />
<br />
<br />
*A string can be passed as a single argument. For example: CoCoAPoly('x^2+2y'). The string must hold the following conventions:<br />
** Indeterminates: a-z<br />
** + or - seperates two terms<br />
** Coefficients are placed left to the indeterminate and without a '*' character. Decimal delimiter is '.'. If coefficient=1 it is not needed to be typed.<br />
** The ring is build upon the found indeterminates over Q with a DegRevLex ordering. If only a constant is given the constant polynomial over Q[x] is returned. To define a poly over an indeterminate which is not part of the current polynomial use coefficient = 0.<br />
<br />
<br />
*A real numeric value can be passed as a single argument. For example: CoCoAPoly(2). This will return a constant polynomial over Q[x[1]].<br />
<br />
=Attributes=<br />
<table border="1"><br />
<tr><br />
<td>ring </td><td>&nbsp;</td><td> A CoCoARing</td><br />
</tr><br />
<tr><br />
<td>terms </td><td>&nbsp;</td><td> a polynomial representing matrix as described above.</td><br />
</tr><br />
</table><br />
<br />
=Methods=<br />
<table border="1"><br />
<tr><br />
<td><b>Method</b></td><td>&nbsp;</td><td><b>Operator</b></td><td><b>Description</b></td><br />
</tr><br />
<tr><br />
<td> display</td><td>&nbsp;</td><td>&nbsp;</td><td> Is used by Matlab to print a CoCoAPoly to the command window. <br />
E.g. when a command is not terminated by a ';'.</td><br />
</tr><br />
<tr><br />
<td> end</td><td>&nbsp;</td><td>&nbsp;</td><td> returns the last coloumn or row of CoCoAPoly array</td><br />
</tr><br />
<tr><br />
<td> eq</td><td>&nbsp;</td><td>==</td><td> Compares two polynomials. Returns 1 if all attributes are equal. <br />
Of polynomials are not equal 0 is returned.</td><br />
</tr><br />
<tr><br />
<td> ge</td><td>&nbsp;</td><td>>=</td><td> Compares two polynomials accordingto the given term ordering. Returns 1 if<br />
first polynomial is greater equal the second polynomial.</td><br />
</tr><br />
<tr><br />
<td> get</td><td>&nbsp;</td><td>&nbsp;</td><td>Returns the attributes of a polynomial. Syntax: get(polyVar, 'Keyword'), where polyVar is a CoCoAPoly and 'Keyword' is one of the keywords listed in table 1. Additionaly the keyword 'String' can be used. This will return the polynomial as a string. The keyword 'Latex' will return a string using Latex syntax.</td><br />
</tr><br />
<tr><br />
<td> gt</td><td>&nbsp;</td><td>></td><td> Compares two polynomials accordingto the given term ordering. Returns 1 if<br />
first polynomial is greater than the second polynomial.</td><br />
</tr><br />
<tr><br />
<td> le</td><td>&nbsp;</td><td><=</td><td> Compares two polynomials accordingto the given term ordering. Returns 1 if<br />
first polynomial is less equal the second polynomial.</td><br />
</tr><br />
<tr><br />
<td> lt</td><td>&nbsp;</td><td><</td><td> Compares two polynomials accordingto the given term ordering. Returns 1 if<br />
first polynomial is less than the second polynomial.</td><br />
</tr><br />
<tr> <br />
<td> minus</td><td>&nbsp;</td><td>-</td><td> Subtract one polynomial from another.</td><br />
</tr><br />
<tr><br />
<td> mpower</td><td>&nbsp;</td><td>^</td><td> Returns the i-th power of a polynomial.</td><br />
</tr><br />
<tr><br />
<td> mtimes</td><td>&nbsp;</td><td>*</td><td> Multiplies two polynomials.</td><br />
</tr><br />
<tr><br />
<td> ne</td><td>&nbsp;</td><td>~=</td><td> returns NOT eq.</td><br />
</tr><br />
<tr><br />
<td> plus</td><td>&nbsp;</td><td>+</td><td> Adds two polynomials.</td><br />
</tr><br />
<tr><br />
<td> subsasgn</td><td>&nbsp;</td><td>()</td><td> Writes a polynomial to the (i,j) coordinate of a CoCoAPoly array.</td><br />
</tr><br />
<tr><br />
<td> subsref</td><td>&nbsp;</td><td>()</td><td> Returns the (i,j) element of a CoCoAPoly array, {i,j} returns <br />
the element as a string.</td><br />
</tr><br />
<tr><br />
<td> times</td><td>&nbsp;</td><td>.*</td><td> Multiplies arrays of polynomials elementwise. If both arrays have the same dimension than each element of poly1 is multiplied with the corresponding element in poly2. If one of the poly's is a single value, this value is multiplied to each element in the other poly. If both poly's are single values they are simply multiplied.</td><br />
</tr><br />
<tr><br />
<td> uminus</td><td>&nbsp;</td><td>-</td><td> support for leading minus symbol.</td><br />
</tr><br />
<tr><br />
<td> uplus</td><td>&nbsp;</td><td>+</td><td> support for leading plus symbol.</td><br />
</tr><br />
</table><br />
<br />
=Examples=<br />
A collection of examples is provided in the file TestCoCoAPoly.m. This file defines the function TestCoCoAPoly which will run and display many examples. A few common examples are presented below.<br />
<br />
* Default polynomial: Constant 0 over Q[x[1]]<br />
<matlab><br />
pDefault = CoCoAPoly();<br />
</matlab><br />
<br />
* Create two polynomials over same ring<br />
<matlab><br />
r1 = CoCoARing('Typ','Q','Indets',{'x','y'},'Ordering','DegRevLex');<br />
p1 = CoCoAPoly('Ring', r1, 'Terms', [1 1 2 ; 1 2 1 ; 1 1 1]);<br />
p2 = CoCoAPoly('Ring', r1, 'Terms', [1 1 2 ; 1 0 0 ; 1 0 1]);<br />
</matlab><br />
<br />
* Add the two polynomials<br />
<matlab><br />
pAdded = p1+p2;<br />
</matlab><br />
<br />
* To read the attributes of a CoCoARing use the following command (this examples reads all attributes):<br />
<matlab><br />
[a1,a2] = get(p1,'Ring','Terms');<br />
</matlab><br />
<br />
* Create an array of CoCoAPolys and access an element<br />
<matlab><br />
pArray = [p1,p2 ; p2,p1];<br />
pElement = pArray(1,2);<br />
</matlab><br />
<br />
* Passing a string to create a CoCoAPoly<br />
<matlab><br />
poly = CoCoAPoly('45.4x^2x-x^1y^2+0z+5');<br />
</matlab><br />
<br />
[[Category:MatlabToolbox]]</div>87.168.253.74http://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoA-1:MatlabCoCoARing&diff=7461ApCoCoA-1:MatlabCoCoARing2008-06-18T15:02:55Z<p>87.168.253.74: Tables updated</p>
<hr />
<div>=Introduction=<br />
The CoCoARing class represents a polynomial ring structure. It stores the name of indeterminates defined over a coefficient ring which is defined in the typ attribute amongst other supporting attributes.<br />
<br />
=Constructor=<br />
The constructor function takes a parameter in the form 'keyword',value. For example to build a ring over Q use the keyword = 'Typ' and the value = 'Q'. The function is called CoCoARing().<br />
<br />
Available keywords are listed below:<br />
<table border="1"><br />
<tr><br />
<td>''Keyword''</td><td>''Possible Values''</td><td>Default</td><br />
</tr><br />
<tr><br />
<td>Typ</td><td>'Q','Z','RF','RD'</td><td>'Q'</td><br />
</tr><br />
<tr><br />
<td>Order</td><td>0,1,2,...</td><td>0</td><br />
</tr><br />
<tr><br />
<td>Noindets</td><td>1,2,...</td><td>1</td><br />
</tr><br />
<tr><br />
<td>Indets</td><td>'auto', {'anyString1','anyString2',...}</td><td>{'x[1]'}</td><br />
</tr><br />
<tr><br />
<td>Ordering</td><td>'DegRevLex', 'DegLex', AnyTermOrderingMatrix</td><td>1</td><br />
</tr><br />
</table><br />
Table 1: Keywords for CoCoARing<br />
<br />
<br />
Note: The order of the keywords is not completly arbitrary:<br />
* The keyword ''Ordering'' can only be used after the keyword ''Indets''.<br />
* ''Noindets'' should be defined before ''Indets'' otherwise result might not be correct as default value is used.<br />
<br />
=Attributes=<br />
<table border="1"><br />
<tr><br />
<td> typ </td><td>&nbsp;</td><td> Defines the coefficent ring. In the current implementation only Q <br />
- Ring of rational numbers - is available.</td><br />
</tr><br />
<tr><br />
<td> order </td><td>&nbsp;</td><td> Defines the order of the polynmoial ring. Usually a prime number or 0.</td><br />
</tr><br />
<tr><br />
<td> noindets </td><td>&nbsp;</td><td> Stores the number of indeterminates.</td><br />
</tr><br />
<tr><br />
<td> indets </td><td>&nbsp;</td><td> Holds the label of the indeterminates as a 1xNoindets cell array of strings.</td><br />
</tr><br />
<tr><br />
<td> ordering</td><td>&nbsp;</td><td> A matrix representing a degree compatible term ordering.</td><br />
</tr><br />
</table><br />
<br />
=Methods=<br />
The following methods are available for rings:<br />
<table border="1"><br />
<tr><br />
<td><b>Method</b></td><td>&nbsp;</td><td><b>Operator</b></td><td><b>Description</b></td><br />
</tr><br />
<tr><br />
<td> display </td><td>&nbsp;</td><td>&nbsp;</td><td> Is used by Matlab to print a CoCoARing to the command window. E.g. when a command is not terminated by a ';'.</td><br />
</tr><br />
<tr><br />
<td> eq </td><td>&nbsp;</td><td>==</td><td> Compares two rings and returns 1 in case that all attributes of the two rings are equal. Otherwise 0 is returned.</td><br />
</tr><br />
<tr><br />
<td> neq </td><td>&nbsp;</td><td>~=</td><td> returns NOT eq.</td><br />
</tr><br />
<tr><br />
<td> get </td><td>&nbsp;</td><td>&nbsp;</td><td> Returns the attributes of a ring. Syntax: get(ringVar, 'Keyword'), where ringVar is a CoCoARing and 'Keyword' is one of the keywords listed in table 1. Additionaly the keyword 'String' can be used. This will return the polynomial as a string. </td><br />
</tr><br />
<tr><br />
<td> one </td><td>&nbsp;</td><td>&nbsp;</td><td> returns the 1 polynomial of the polynomial ring</td><br />
</tr><br />
<tr><br />
<td> zero </td><td>&nbsp;</td><td>&nbsp;</td><td> returns the 0 polynomial of the polynomial ring</td><br />
</tr><br />
</table><br />
<br />
=Examples=<br />
A collection of examples is provided in the file TestCoCoARing.m. This file defines the function TestCoCoARing which will run and display many examples. A few common examples are presented below.<br />
* Default ring Q[x[1]]:<br />
<matlab><br />
defaultRing = CoCoARing();<br />
</matlab><br />
<br />
* Q[x1,...,xN]: The only supported ring for the CoCoAPoly class at the moment is Q[x1,...,xN]. To generate this ring with a DegRevLex ordering over 3 indeterminates x,y and z use the following code:<br />
<matlab><br />
myR = CoCoARing('Typ','Q','Indets',{'x','y','z'},'Ordering','DegRevLex');<br />
</matlab><br />
<br />
* To generate the 1 and 0 polynomial of a CoCoARing use the following code:<br />
<matlab><br />
oneOfRing = one(myR);<br />
zeroOfRing = zero(myR);<br />
</matlab><br />
<br />
* To read the attributes of a CoCoARing use the following command (this examples reads all attributes):<br />
<matlab><br />
[a1,a2,a3,a4,a5] = get(myR,'Typ','Order','Noindets','Indets','Ordering');<br />
</matlab><br />
<br />
[[Category:MatlabToolbox]]</div>87.168.253.74http://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoA-1:MatlabToolbox&diff=7460ApCoCoA-1:MatlabToolbox2008-06-18T14:52:58Z<p>87.168.253.74: Function list updated</p>
<hr />
<div>= Introduction =<br />
The MatlabToolbox is a collection of .m and .mex files to use the functions provided by the ApCoCoALib. Classes representing rings, polynomials, ideals and modules are added to provide an intuitive approach to the algebraic nature of the functions.<br />
<br />
To overcome technical difficulties the interaction with the ApCoCoALib is done via a dll. For more technical details how this dll is programmed have a look at the [http://www.apcocoa.org/wiki/ApCoCoA:MatlabInterface MatlabToolbox Interface].<br />
<br />
The MatlabToolbox in it's current state needs to be compiled by the user on Windows with MSVC. Read the howto page for a description of the compilation process: [http://www.apcocoa.org/wiki/HowTo:Compile_MatlabToolbox_on_Windows HowTo: Compile MatlabToolbox on Windows]<br />
<br />
Note: From a perspective of an ApCoCoA User this toolbox provides an interface to communicate with Matlab - thus the toolbox is called in this Wiki ''MatlabToolbox''. Yet from the perspective of a Matlab user the toolbox provides an interface to communicate with the ApCoCoALib - thus the compiled library is called ''ApCoCoAToolbox.dll''.<br />
<br />
= MatlabToolbox structure =<br />
The toolbox is based on classes to handle multivariate polynomials. The concept is based on a ring representing class called CoCoARing. Then a multivariate polynomial is build with coefficients defined over a CoCoARing. The polynomial is an element of the CoCoAPoly class.<br />
<br />
Multiple CoCoAPoly's can be combined in an array. In many cases a list of polynomials (a 1xN array) is interpreted as the set of generators of an ideal. To represent this view and provide common operations on ideals the class CoCoAIdeal is introduced.<br />
<br />
A MxN array of CoCoAPoly's could then be interpreted as a set of generators for a module and the class CoCoAModule is introduced to provide common module operations.<br />
<br />
[[Image:ToolboxStructure.png|thumb|right|350px|Figure 1: Class structure]]<br />
<br />
Note: Due to technical limitations the current implementation assumes that all polynomials are defined over the ring Q[x1,...xn]. General ring support in the CoCoAPoly class will be added in a later stage.<br />
<br />
The structure of the MatlabToolbox is depicted in figure 1.<br />
==Class descriptions==<br />
Detailed descriptions for each class and its methods are given at the following links:<br />
* [http://www.apcocoa.org/wiki/ApCoCoA:MatlabCoCoARing CoCoARing]<br />
* [http://www.apcocoa.org/wiki/ApCoCoA:MatlabCoCoAPoly CoCoAPoly]<br />
* [http://www.apcocoa.org/wiki/ApCoCoA:MatlabCoCoAIdeal CoCoAIdeal]<br />
* [http://www.apcocoa.org/wiki/ApCoCoA:MatlabCoCoAModule CoCoAModule]<br />
<br />
=Available functions=<br />
The interface provides mex functions to call the ApCoCoALib functions. These functions are located in the subfolder ''MexFiles''. <br />
<br />
But the mex files parameters for polynomial operations are based on double matrices representing the polynomials. This syntax is far away from an intuitive handling of polynomials. Thus wrapper functions have been written to provide automated conversion from CoCoAPoly's, CoCoAIdeal's or CoCoAModule's. <br />
<br />
For example to compute the Groebner Basis of an ideal one can call the function ''GBasisIdeal_wrap(InputIdeal)'' which takes a CoCoAIdeal, computes the Groebner Basis and returns the result as a CoCoAPoly list. To store the Groebner Basis in the ideal the ideal method ''computeGBasis(InputIdeal)'' can be used. This functions also computes the Groebner Basis but adds the result to the ideals attribute GBasis. <br />
<br />
The wrapper files are bundled in a subfolder called ''MatlabFiles''. The filename is indicating which type of input is needed. E.g. ''GBasisIdeal_wrap()'' takes a CoCoAIdeal and returns the Groebner Basis as a list of CoCoAPoly's.<br />
<br />
The mex files and if available the corresponding wrapper files are individually described at the following links. In case that there are versions available for ideals and modules these functions are described on the same page. Note that some of the mex files are used to define methods for the described classes and that there is no corresponding wrapper file available.<br />
<br />
For examples on how to use the mex and wrapper functions see the test file: [http://www.apcocoa.org/wiki/ApCoCoA:TestMexFiles Test Mex Files]<br />
<br />
<br />
ApCoCoALib<br />
<ul><br />
<li>Build-Info ApCoCoALib<br />
<li>APVI<br />
<li>BorderBasisIdeal<br />
<li>FGLM<br />
</ul><br />
<br />
<br />
CoCoALib<br />
<ul><br />
<li>Build-Info CoCoALib<br />
<li>PolyPower<br />
<li>PolyRingHom<br />
<li>Colon<br />
<li>CColon<br />
<li>SyzygyPolyList<br />
<li>GBasis<br />
<li>SATGBasis<br />
<li>SATMixGBasis<br />
<li>PreProcess (Grid, Aggr, Subdiv)<br />
<li>Intersection<br />
<li>Saturation<br />
<li>SSaturation<br />
<li>EliminationIdeal<br />
<li>LeadingTermIdeal<br />
<li>IsElemIdeal<br />
<li>SyzygyIdeal<br />
</ul><br />
<br />
[[Category:MatlabToolbox]]</div>87.168.253.74