Difference between revisions of "ApCoCoA-1:LinAlg.EF"

From ApCoCoAWiki
Line 1: Line 1:
 
<command>
 
<command>
 
   <title>LinAlg.EF</title>
 
   <title>LinAlg.EF</title>
   <short_description>Computes a row echelon form of a matrix with recond keeping.</short_description>
+
   <short_description>Computes a row echelon form of a matrix with record keeping.</short_description>
 
    
 
    
 
<syntax>
 
<syntax>
LinAlg.EF(M:MAT, L1:LIST, L2:LIST):MAT
+
LinAlg.EF(M:LIST, L1:LIST, L2:LIST):MAT
 
</syntax>
 
</syntax>
 
   <description>
 
   <description>
Line 11: Line 11:
 
This function allows you to compute a row echelon form of a matrix <tt>M</tt> defined over the field <tt>F_2</tt>.  
 
This function allows you to compute a row echelon form of a matrix <tt>M</tt> defined over the field <tt>F_2</tt>.  
 
<par/>
 
<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.
 
  
  

Revision as of 12:24, 7 December 2010

LinAlg.EF

Computes a row echelon form of a matrix with record keeping.

Syntax

LinAlg.EF(M:LIST, L1:LIST, L2:LIST):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 row echelon form of a matrix M defined over the field F_2.


  • @param M: A List of Lists whose row echelon form to compute.

  • @param L1: List of integers. For example, the integers could represent the order of lists in the list M.

  • @param L2: List of integers. For example, the integers could be 0-1 to represent the lists already reduced(0) and to be reduced(1).

  • @return A row echelon form of M together with lists L1 and L2.


Example

Use ZZ/(2)[x,y];
M := [
      [1, 1, 0, 1, 0],
      [0, 1, 1, 0, 1],
      [1, 0, 1, 0, 0], 
      [1, 1, 1, 0, 1]
     ];
-- order of lists in M
L1:=[1, 2, 3, 4]; 

-- 0 for lists which are already in echelon form and 1 for those to be reduced.
L2:=[0, 0, 1, 1];

LinAlg.EF(M, L1, L2);

-- CoCoAServer: computing Cpu Time = 0
-------------------------------
[ [[1, 1, 0, 1, 0], [0, 1, 1, 0, 1], [0, 0, 1, 1, 1], [0, 0, 0, 1, 1]], [1, 2, 4, 3], [0, 0, 1, 1]]

-- The last two lists represent the new order of lists in M.

Example

Use ZZ/(2)[x,y];
M := [
      [0, 1, 0, 1, 0],
      [0, 1, 0, 0, 1],
      [1, 0, 1, 1, 0], 
      [1, 1, 0, 0, 1]
     ];
-- order of lists in M
L1:=[1, 2, 3, 4]; 

-- 0 for lists which are already in echelon form and 1 for those to be reduced.
L2:=[0, 0, 1, 1];

LinAlg.EF(M, L1, L2);

-- CoCoAServer: computing Cpu Time = 0.015
-------------------------------
[[[1, 0, 1, 1, 0], [0, 1, 0, 1, 0], [0, 0, 1, 0, 1], [0, 0, 0, 1, 1]], [3, 1, 4, 2], [1, 0, 1, 0]]
-------------------------------

-- The last two lists represent the new order of lists in M.



Introduction to CoCoAServer

IML.REF

LinBox.REF