Difference between revisions of "ApCoCoA-1:LinBox.REF"

From ApCoCoAWiki
(Initial version)
m (insert version info)
 
(20 intermediate revisions by 5 users not shown)
Line 1: Line 1:
 +
{{Version|1}}
 
<command>
 
<command>
    <title>IML.REF</title>
+
  <title>LinBox.REF</title>
    <short_description>compute row echelon form</short_description>
+
  <short_description>Computes a row echelon form of a matrix.</short_description>
 +
 
 
<syntax>
 
<syntax>
IML.REF(M:MAT, CompRREF:BOOL):MAT
+
LinBox.REF(M:MAT, CompRREF:BOOL):MAT
IML.REF(M:MAT, P:INT, CompRREF:BOOL):MAT
+
LinBox.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 <tt>M</tt> must be of type <tt>INT</tt>.
+
<em>Please note:</em> The function(s) explained on this page is/are using the <em>ApCoCoAServer</em>. You will have to start the ApCoCoAServer in order to use it/them.
 
+
<par/>
 +
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 castable to type <tt>ZMOD</tt> and your current working ring must be a finite field. 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>.
 +
<par/>
 
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.
 
+
<par/>
 
The return value of both functions is the computed (reduced) row echelon form of <tt>M</tt>.
 
The return value of both functions is the computed (reduced) row echelon form of <tt>M</tt>.
 +
<itemize>
 +
  <item>@param <em>M</em> A matrix whose (reduced) row echelon form to compute. If parameter <tt>P</tt> is given, the components of <tt>M</tt> must be of type <tt>INT</tt>. Otherwise, they must be of type <tt>ZMOD</tt>.</item>
 +
  <item>@param <em>CompRREF</em> Set to <tt>TRUE</tt> if you want to compute the reduced row echelon form of <tt>M</tt> or to <tt>FALSE</tt> otherwise.</item>
 +
  <item>@return A (reduced) row echelon form of <tt>M</tt>.</item>
 +
</itemize>
 +
The following parameter is optional.
 +
<itemize>
 +
  <item>@param <em>P</em> An integer value. If <tt>P</tt> is specified, the (reduced) row echelon form computation will be carried out over the ring <tt>Z/pZ</tt>.</item>
 +
</itemize>
 
<example>
 
<example>
Use Z/(239)[x];
+
Use ZZ/(239)[x];
 
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);
+
LinBox.REF(M, FALSE);
 
Mat([
 
Mat([
 
   [1, 2, 3],
 
   [1, 2, 3],
Line 31: Line 44:
 
])
 
])
 
-------------------------------
 
-------------------------------
 
+
</example>
Use Q[x,y];
+
<example>
 +
Use QQ[x,y];
 
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);
+
LinBox.REF(M, 17, TRUE);
 
Mat([
 
Mat([
 
   [1, 1, 2],
 
   [1, 1, 2],
Line 51: Line 65:
 
-------------------------------
 
-------------------------------
 
</example>
 
</example>
    </description>
+
  </description>
    <see>LinBox.REF</see>
+
 
    <see>LinearAlgebra.REF</see>
+
  <see>ApCoCoA-1:Introduction to CoCoAServer|Introduction to CoCoAServer</see>
    <types>
+
  <see>ApCoCoA-1:IML.REF|IML.REF</see>
        <type>cocoaserver</type>
+
  <see>ApCoCoA-1:LinAlg.REF|LinAlg.REF</see>
     </types>
+
  <types>
    <key>kaspar</key>
+
    <type>matrix</type>
    <key>iml</key>
+
     <type>apcocoaserver</type>
    <key>ref</key>
+
  </types>
    <wiki-category>Package_LinBox</wiki-category>
+
  <key>Ref</key>
 +
  <key>LinBox.Ref</key>
 +
  <key>linbox.Ref</key>
 +
  <key>row echelon form</key>
 +
  <wiki-category>ApCoCoA-1:Package_linbox</wiki-category>
 
</command>
 
</command>

Latest revision as of 10:11, 7 October 2020

This article is about a function from ApCoCoA-1.

LinBox.REF

Computes a row echelon form of a matrix.

Syntax

LinBox.REF(M:MAT, CompRREF:BOOL):MAT
LinBox.REF(M:MAT, P:INT, CompRREF:BOOL):MAT

Description

Please note: The function(s) explained on this page is/are using the ApCoCoAServer. You will have to start the ApCoCoAServer in order to use it/them.

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 castable to type ZMOD and your current working ring must be a finite field. 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.

  • @param M A matrix whose (reduced) row echelon form to compute. If parameter P is given, the components of M must be of type INT. Otherwise, they must be of type ZMOD.

  • @param CompRREF Set to TRUE if you want to compute the reduced row echelon form of M or to FALSE otherwise.

  • @return A (reduced) row echelon form of M.

The following parameter is optional.

  • @param P An integer value. If P is specified, the (reduced) row echelon form computation will be carried out over the ring Z/pZ.

Example

Use ZZ/(239)[x];
M := Mat([[1, 2, 3], [4, 5, 6], [7, 8, 9], [11, 12, 13]]);
M;
LinBox.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]
])
-------------------------------

Example

Use QQ[x,y];
M := Mat([[ 1, 1, 2], [200, 3000, 1], [2, 5, 17], [1, 1, 1]]);
M;
LinBox.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]
])
-------------------------------

Introduction to CoCoAServer

IML.REF

LinAlg.REF