Difference between revisions of "ApCoCoA-1:LinBox.REF"
m (Corrected example) |
(Initial version) |
||
Line 1: | Line 1: | ||
<command> | <command> | ||
− | <title> | + | <title>IML.REF</title> |
<short_description>compute row echelon form</short_description> | <short_description>compute row echelon form</short_description> | ||
<syntax> | <syntax> | ||
− | + | IML.REF(M:MAT, CompRREF:BOOL):MAT | |
− | + | IML.REF(M:MAT, P:INT, CompRREF:BOOL):MAT | |
</syntax> | </syntax> | ||
<description> | <description> | ||
− | This function allows you to compute a (reduced) row echelon form of <tt>M</tt> over a finite field. If you want to use the first version without the parameter <tt>P</tt>, the components of the input matrix <tt>M</tt> must be of type <tt>ZMOD</tt> and your current working ring must be the same ring over which <tt>M</tt> has been defined. The second version of this function lets you compute a (reduced) row echelon form of <tt>M</tt> mod <tt>P</tt> and the components of M must be of type INT. | + | This function allows you to compute a (reduced) row echelon form of <tt>M</tt> over a finite field. If you want to use the first version without the parameter <tt>P</tt>, the components of the input matrix <tt>M</tt> must be of type <tt>ZMOD</tt> and your current working ring must be the same ring over which <tt>M</tt> has been defined. The second version of this function lets you compute a (reduced) row echelon form of <tt>M</tt> mod <tt>P</tt> and the components of <tt>M</tt> must be of type <tt>INT</tt>. |
The parameter <tt>CompRREF</tt> lets you specify if you want to compute a row echelon form or the reduced row echelon form of <tt>M</tt>. If <tt>CompRREF</tt> is set to <tt>TRUE</tt>, the reduced row echelon form will be computed, and if it is set to <tt>FALSE</tt>, a row echelon form where all pivot elements are equal to one will be computed. | The parameter <tt>CompRREF</tt> lets you specify if you want to compute a row echelon form or the reduced row echelon form of <tt>M</tt>. If <tt>CompRREF</tt> is set to <tt>TRUE</tt>, the reduced row echelon form will be computed, and if it is set to <tt>FALSE</tt>, a row echelon form where all pivot elements are equal to one will be computed. | ||
Line 16: | Line 16: | ||
M := Mat([[1, 2, 3], [4, 5, 6], [7, 8, 9], [11, 12, 13]]); | M := Mat([[1, 2, 3], [4, 5, 6], [7, 8, 9], [11, 12, 13]]); | ||
M; | M; | ||
− | + | IML.REF(M, FALSE); | |
Mat([ | Mat([ | ||
[1, 2, 3], | [1, 2, 3], | ||
Line 35: | Line 35: | ||
M := Mat([[ 1, 1, 2], [200, 3000, 1], [2, 5, 17], [1, 1, 1]]); | M := Mat([[ 1, 1, 2], [200, 3000, 1], [2, 5, 17], [1, 1, 1]]); | ||
M; | M; | ||
− | + | IML.REF(M, 17, TRUE); | |
Mat([ | Mat([ | ||
[1, 1, 2], | [1, 1, 2], | ||
Line 52: | Line 52: | ||
</example> | </example> | ||
</description> | </description> | ||
− | <see> | + | <see>LinBox.REF</see> |
<see>LinearAlgebra.REF</see> | <see>LinearAlgebra.REF</see> | ||
<types> | <types> | ||
Line 58: | Line 58: | ||
</types> | </types> | ||
<key>kaspar</key> | <key>kaspar</key> | ||
+ | <key>iml</key> | ||
<key>ref</key> | <key>ref</key> | ||
<wiki-category>Package_LinBox</wiki-category> | <wiki-category>Package_LinBox</wiki-category> | ||
</command> | </command> |
Revision as of 15:39, 13 November 2008
IML.REF
compute row echelon form
Syntax
IML.REF(M:MAT, CompRREF:BOOL):MAT IML.REF(M:MAT, P:INT, CompRREF:BOOL):MAT
Description
This function allows you to compute a (reduced) row echelon form of M over a finite field. If you want to use the first version without the parameter P, the components of the input matrix M must be of type ZMOD and your current working ring must be the same ring over which M has been defined. The second version of this function lets you compute a (reduced) row echelon form of M mod P and the components of M must be of type INT.
The parameter CompRREF lets you specify if you want to compute a row echelon form or the reduced row echelon form of M. If CompRREF is set to TRUE, the reduced row echelon form will be computed, and if it is set to FALSE, a row echelon form where all pivot elements are equal to one will be computed.
The return value of both functions is the computed (reduced) row echelon form of M.
Example
Use Z/(239)[x]; M := Mat([[1, 2, 3], [4, 5, 6], [7, 8, 9], [11, 12, 13]]); M; IML.REF(M, FALSE); Mat([ [1, 2, 3], [4, 5, 6], [7, 8, 9], [11, 12, 13] ]) ------------------------------- Mat([ [1 % 239, 2 % 239, 3 % 239], [0 % 239, 1 % 239, 2 % 239], [0 % 239, 0 % 239, 0 % 239], [0 % 239, 0 % 239, 0 % 239] ]) ------------------------------- Use Q[x,y]; M := Mat([[ 1, 1, 2], [200, 3000, 1], [2, 5, 17], [1, 1, 1]]); M; IML.REF(M, 17, TRUE); Mat([ [1, 1, 2], [200, 3000, 1], [2, 5, 17], [1, 1, 1] ]) ------------------------------- Mat([ [1, 0, 0], [0, 1, 0], [0, 0, 1], [0, 0, 0] ]) -------------------------------