Difference between revisions of "ApCoCoA-1:Slinalg.SEF"
m (insert version info) |
|||
(13 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
+ | {{Version|1}} | ||
<command> | <command> | ||
<title>Slinalg.SEF</title> | <title>Slinalg.SEF</title> | ||
− | <short_description> | + | <short_description>Computes the row echelon form of a sparse matrix over F2.</short_description> |
<syntax> | <syntax> | ||
− | Slinalg.SEF(NRow : INT ,NCol : INT, | + | Slinalg.SEF(NRow:INT, NCol:INT, M:LIST): LIST |
+ | Slinalg.SEF_v2(NRow:INT, NCol:INT, M:LIST): LIST | ||
</syntax> | </syntax> | ||
<description> | <description> | ||
<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. | <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/> | ||
+ | Both functions compute the row echelon form of a sparse matrix. The first one performs usual gaussian elimination. The second one collects all the rows which contain the pivot element and then select the row with fewer number of non zero elements to perform elimination. Therefore, the second one is more efficient than the first one. | ||
<itemize> | <itemize> | ||
Line 12: | Line 16: | ||
<item>@param <em>NCol</em>: Number of Columns of the matrix.</item> | <item>@param <em>NCol</em>: Number of Columns of the matrix.</item> | ||
− | <item>@param <em> | + | <item>@param <em>M</em>: List of lists containing positions of non zero elements.</item> |
− | <item>@return A list of lists containing the | + | <item>@return A list of lists containing the row echelon form of the matrix M.</item> |
</itemize> | </itemize> | ||
<example> | <example> | ||
Use ZZ/(2)[x]; | Use ZZ/(2)[x]; | ||
− | |||
NRow:=10; | NRow:=10; | ||
NCol:=13; | NCol:=13; | ||
+ | M := [[1, 2, 6, 7], | ||
+ | [1, 2, 4, 5, 6], | ||
+ | [2, 3], | ||
+ | [2, 3, 10, 11], | ||
+ | [2, 4, 6, 7, 9, 10], | ||
+ | [2, 10, 11, 13], | ||
+ | [5, 6, 8], | ||
+ | [ 6, 8, 9,10,12], | ||
+ | [6, 10, 12], | ||
+ | [10, 13]]; | ||
Slinalg.SEF(NRow, NCol, M); | Slinalg.SEF(NRow, NCol, M); | ||
− | [[1,2,6,7],[2,3],[3,4,6,7,9,10],[4,5,7],[5,6,8],[6,8,9,10,12],[8,9,11,13],[10,11],[11,13]] | + | [[1,2,6,7], |
+ | [2,3], | ||
+ | [3,4,6,7,9,10], | ||
+ | [4,5,7], | ||
+ | [5,6,8], | ||
+ | [6,8,9,10,12], | ||
+ | [8,9,11,13], | ||
+ | [10,11], | ||
+ | [11,13]] | ||
------------------------------- | ------------------------------- | ||
+ | </example> | ||
+ | |||
+ | <example> | ||
+ | Use ZZ/(2)[x]; | ||
+ | NRow:=10; | ||
+ | NCol:=13; | ||
+ | M := [[1, 2, 6, 7], | ||
+ | [1, 2, 4, 5, 6], | ||
+ | [2, 3], | ||
+ | [2, 3, 10, 11], | ||
+ | [2, 4, 6, 7, 9, 10], | ||
+ | [2, 10, 11, 13], | ||
+ | [5, 6, 8], | ||
+ | [ 6, 8, 9,10,12], | ||
+ | [6, 10, 12], | ||
+ | [10, 13]]; | ||
+ | Slinalg.SEF_v2(NRow, NCol, M); | ||
+ | [[1, 2, 6, 7], | ||
+ | [2, 3], | ||
+ | [3, 10, 11, 13], | ||
+ | [4, 5, 7], | ||
+ | [5, 6, 8], | ||
+ | [6, 10, 12], | ||
+ | [8, 9], | ||
+ | [10, 11], | ||
+ | [11, 13]] | ||
+ | ------------------------------- | ||
</example> | </example> | ||
− | |||
</description> | </description> | ||
<types> | <types> | ||
<type>apcocoaserver</type> | <type>apcocoaserver</type> | ||
− | <type> | + | <type>matrix</type> |
</types> | </types> | ||
<seealso> | <seealso> | ||
− | <see>Introduction to CoCoAServer</see> | + | <see>ApCoCoA-1:Introduction to CoCoAServer|Introduction to CoCoAServer</see> |
− | <see> | + | <see>ApCoCoA-1:IML.REF|IML.REF</see> |
− | + | <see>ApCoCoA-1:LinAlg.REF|LinAlg.REF</see> | |
− | |||
</seealso> | </seealso> | ||
− | <key> | + | <key>slinalg.sef</key> |
− | <key> | + | <key>sef</key> |
− | <key> | + | <key>sparse matrix</key> |
− | <wiki-category>Package_slinalg</wiki-category> | + | <wiki-category>ApCoCoA-1:Package_slinalg</wiki-category> |
</command> | </command> |
Latest revision as of 10:34, 7 October 2020
This article is about a function from ApCoCoA-1. |
Slinalg.SEF
Computes the row echelon form of a sparse matrix over F2.
Syntax
Slinalg.SEF(NRow:INT, NCol:INT, M:LIST): LIST Slinalg.SEF_v2(NRow:INT, NCol:INT, M:LIST): LIST
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.
Both functions compute the row echelon form of a sparse matrix. The first one performs usual gaussian elimination. The second one collects all the rows which contain the pivot element and then select the row with fewer number of non zero elements to perform elimination. Therefore, the second one is more efficient than the first one.
@param NRow: Number of rows of the matrix.
@param NCol: Number of Columns of the matrix.
@param M: List of lists containing positions of non zero elements.
@return A list of lists containing the row echelon form of the matrix M.
Example
Use ZZ/(2)[x]; NRow:=10; NCol:=13; M := [[1, 2, 6, 7], [1, 2, 4, 5, 6], [2, 3], [2, 3, 10, 11], [2, 4, 6, 7, 9, 10], [2, 10, 11, 13], [5, 6, 8], [ 6, 8, 9,10,12], [6, 10, 12], [10, 13]]; Slinalg.SEF(NRow, NCol, M); [[1,2,6,7], [2,3], [3,4,6,7,9,10], [4,5,7], [5,6,8], [6,8,9,10,12], [8,9,11,13], [10,11], [11,13]] -------------------------------
Example
Use ZZ/(2)[x]; NRow:=10; NCol:=13; M := [[1, 2, 6, 7], [1, 2, 4, 5, 6], [2, 3], [2, 3, 10, 11], [2, 4, 6, 7, 9, 10], [2, 10, 11, 13], [5, 6, 8], [ 6, 8, 9,10,12], [6, 10, 12], [10, 13]]; Slinalg.SEF_v2(NRow, NCol, M); [[1, 2, 6, 7], [2, 3], [3, 10, 11, 13], [4, 5, 7], [5, 6, 8], [6, 10, 12], [8, 9], [10, 11], [11, 13]] -------------------------------
See also