https://cocoa.dima.unige.it/redmine/https://cocoa.dima.unige.it/redmine/redmine/favicon.ico?15088260392011-11-30T07:31:50ZCoCoA ProjectCoCoALib - Feature #37: matrix constructorshttps://cocoa.dima.unige.it/redmine/issues/37?journal_id=772011-11-30T07:31:50ZAnna Maria Bigatti
<ul><li><strong>Subject</strong> changed from <i>matrix constructor</i> to <i>matrix constructors</i></li></ul><p>JAA: C4 has a function for creating an identity matrix. It also has a means of creating a zero matrix (of specified dimensions, <strong>NewMat</strong>). Presumably similar functions should exist in C5.</p>
<p>AMB: <strong>IdentityMat(QQ,2);</strong> and <strong>ZeroMat(QQ,2,4);</strong> [both in CoCoA-5 and in CoCoALib]<br />Should we have <strong>ZeroMat(ZZ,3);</strong> as a shortcut for <strong>ZeroMat(ZZ,3,3);</strong>?</p>
<p>JAA: If (when?) C5 has automatic promotion of ring elements then these functions can safely return a matrix over ZZ; otherwise the ring in which the entries reside will have to be specified explicitly as an argument.</p>
<p>----------------------------------------------------------------------<br />JAA: What would a function such as <strong>ConcatHor</strong> or <strong>ConcatVer</strong> or <strong>BlockMatrix</strong> do when given matrices whose elements belong to different rings? Will automatic promotion occur here too?</p>
<p>----------------------------------------------------------------------<br />JAA: Just a quick comment about the alternative matrix constructors <strong>MatrixByRows</strong> and <strong>MatrixByCols</strong>. JAA believes that <em>both matrix dimensions</em> should be given explicitly when using these ctors: at least one of the dimensions <em>must</em> be given explicitly, and to avoid doubt and confusion about which one, it seems simplest to require both (their product can also be used to check that the supplied list of entry values has the correct length). The presence or absence of an argument specifying the ring should be as for the standard matrix ctor (currently JAA+AMB are tending toward not specifying explicitly the ring).</p>
<p>AMB: <strong>MakeMatByRows(2,3,[1,2,3,4,5,6]);</strong> [in CoCoA-5]</p>
<p>----------------------------------------------------------------------<br />JAA: Consider the example below:<br /><pre>
R ::= QQ[x,y,z];
M := matrix(R,[[1,x],[1,y]]);
Use S ::= ZZ/(7)[x,y];
M := matrix(R,[[1,x],[1,y]]); // cut-and-pasted
</pre><br />The creation of the matrix M will not work as one might reasonably expect (i.e. creating a matrix whose entries are in R): it will produce an error.<br />If the ring were not supplied as an argument then M would contain a matrix whose entries lie in S; this might be what was wanted, but it is different from the original matrix!</p>
<p>Here's another example which is close to a "nasty surprise":<br /><pre>
R ::= QQ[x,y];
Use S ::= QQ[a,b];
x := 2; y := 3;
M := matrix(R,[[1,x],[1,y]]); // cut-and-pasted
</pre><br />Here the matrix construction will presumably succeed, but will not produce the original matrix. It is also easy to create examples producing the wrong result, if we change the definition of the ring R...</p> CoCoALib - Feature #37: matrix constructorshttps://cocoa.dima.unige.it/redmine/issues/37?journal_id=792011-11-30T08:07:36ZAnna Maria Bigatti
<ul><li><strong>Category</strong> set to <i>Philosophy</i></li></ul> CoCoALib - Feature #37: matrix constructorshttps://cocoa.dima.unige.it/redmine/issues/37?journal_id=59992017-04-28T09:11:24ZAnna Maria Bigatti
<ul><li><strong>Project</strong> changed from <i>CoCoA</i> to <i>CoCoALib</i></li><li><strong>Category</strong> deleted (<del><i>Philosophy</i></del>)</li><li><strong>Target version</strong> set to <i>CoCoALib-0.99560</i></li></ul><p>This issue was under "CoCoA" instead of "CoCoALib".<br />I'm recovering these old and forgotten issues, so we reconsider them.</p> CoCoALib - Feature #37: matrix constructorshttps://cocoa.dima.unige.it/redmine/issues/37?journal_id=64622017-11-06T13:31:05ZJohn Abbott
<ul><li><strong>Category</strong> set to <i>Data Structures</i></li></ul><p>This issue is a bit strange -- it is now quite old, and of questionable relevance now.</p>
<p>Perhaps we should just close it?</p> CoCoALib - Feature #37: matrix constructorshttps://cocoa.dima.unige.it/redmine/issues/37?journal_id=64632017-11-06T13:41:11ZAnna Maria Bigatti
<ul><li><strong>% Done</strong> changed from <i>50</i> to <i>90</i></li></ul><p><strong>MatByRows/Cols</strong> is now available in CoCoALib.</p>
<p>All other questions have been dealt with, more or less directly.</p> CoCoALib - Feature #37: matrix constructorshttps://cocoa.dima.unige.it/redmine/issues/37?journal_id=64802017-11-06T14:29:31ZAnna Maria Bigatti
<ul><li><strong>Related to</strong> <i><a class="issue tracker-7 status-1 priority-4 priority-default" href="/redmine/issues/1116">Design #1116</a>: Port RowMat, ColMat, MatByRows,... to CoCoA-5</i> added</li></ul> CoCoALib - Feature #37: matrix constructorshttps://cocoa.dima.unige.it/redmine/issues/37?journal_id=67312017-12-15T14:18:11ZJohn Abbott
<ul><li><strong>Status</strong> changed from <i>In Progress</i> to <i>Closed</i></li><li><strong>% Done</strong> changed from <i>90</i> to <i>100</i></li></ul>