/usr/share/gap/doc/ref/chap26.html is in gap-doc 4r8p6-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 | <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>GAP (ref) - Chapter 26: Vector and matrix objects</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta name="generator" content="GAPDoc2HTML" />
<link rel="stylesheet" type="text/css" href="manual.css" />
<script src="manual.js" type="text/javascript"></script>
<script type="text/javascript">overwriteStyle();</script>
</head>
<body class="chap26" onload="jscontent()">
<div class="chlinktop"><span class="chlink1">Goto Chapter: </span><a href="chap0.html">Top</a> <a href="chap1.html">1</a> <a href="chap2.html">2</a> <a href="chap3.html">3</a> <a href="chap4.html">4</a> <a href="chap5.html">5</a> <a href="chap6.html">6</a> <a href="chap7.html">7</a> <a href="chap8.html">8</a> <a href="chap9.html">9</a> <a href="chap10.html">10</a> <a href="chap11.html">11</a> <a href="chap12.html">12</a> <a href="chap13.html">13</a> <a href="chap14.html">14</a> <a href="chap15.html">15</a> <a href="chap16.html">16</a> <a href="chap17.html">17</a> <a href="chap18.html">18</a> <a href="chap19.html">19</a> <a href="chap20.html">20</a> <a href="chap21.html">21</a> <a href="chap22.html">22</a> <a href="chap23.html">23</a> <a href="chap24.html">24</a> <a href="chap25.html">25</a> <a href="chap26.html">26</a> <a href="chap27.html">27</a> <a href="chap28.html">28</a> <a href="chap29.html">29</a> <a href="chap30.html">30</a> <a href="chap31.html">31</a> <a href="chap32.html">32</a> <a href="chap33.html">33</a> <a href="chap34.html">34</a> <a href="chap35.html">35</a> <a href="chap36.html">36</a> <a href="chap37.html">37</a> <a href="chap38.html">38</a> <a href="chap39.html">39</a> <a href="chap40.html">40</a> <a href="chap41.html">41</a> <a href="chap42.html">42</a> <a href="chap43.html">43</a> <a href="chap44.html">44</a> <a href="chap45.html">45</a> <a href="chap46.html">46</a> <a href="chap47.html">47</a> <a href="chap48.html">48</a> <a href="chap49.html">49</a> <a href="chap50.html">50</a> <a href="chap51.html">51</a> <a href="chap52.html">52</a> <a href="chap53.html">53</a> <a href="chap54.html">54</a> <a href="chap55.html">55</a> <a href="chap56.html">56</a> <a href="chap57.html">57</a> <a href="chap58.html">58</a> <a href="chap59.html">59</a> <a href="chap60.html">60</a> <a href="chap61.html">61</a> <a href="chap62.html">62</a> <a href="chap63.html">63</a> <a href="chap64.html">64</a> <a href="chap65.html">65</a> <a href="chap66.html">66</a> <a href="chap67.html">67</a> <a href="chap68.html">68</a> <a href="chap69.html">69</a> <a href="chap70.html">70</a> <a href="chap71.html">71</a> <a href="chap72.html">72</a> <a href="chap73.html">73</a> <a href="chap74.html">74</a> <a href="chap75.html">75</a> <a href="chap76.html">76</a> <a href="chap77.html">77</a> <a href="chap78.html">78</a> <a href="chap79.html">79</a> <a href="chap80.html">80</a> <a href="chap81.html">81</a> <a href="chap82.html">82</a> <a href="chap83.html">83</a> <a href="chap84.html">84</a> <a href="chap85.html">85</a> <a href="chap86.html">86</a> <a href="chap87.html">87</a> <a href="chapBib.html">Bib</a> <a href="chapInd.html">Ind</a> </div>
<div class="chlinkprevnexttop"> <a href="chap0.html">[Top of Book]</a> <a href="chap0.html#contents">[Contents]</a> <a href="chap25.html">[Previous Chapter]</a> <a href="chap27.html">[Next Chapter]</a> </div>
<p id="mathjaxlink" class="pcenter"><a href="chap26_mj.html">[MathJax on]</a></p>
<p><a id="X856C23B87E50F118" name="X856C23B87E50F118"></a></p>
<div class="ChapSects"><a href="chap26.html#X856C23B87E50F118">26 <span class="Heading">Vector and matrix objects</span></a>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap26.html#X81975083855CA9A1">26.1 <span class="Heading">Fundamental ideas and rules</span></a>
</span>
</div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap26.html#X7CF9CC0082C7AFF8">26.2 <span class="Heading">Categories of vectors and matrices</span></a>
</span>
</div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap26.html#X7BD7D2837BFDE649">26.3 <span class="Heading">Constructing vector and matrix objects</span></a>
</span>
</div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap26.html#X7AB6FE5B82E582E0">26.4 <span class="Heading">Operations for row vector objects</span></a>
</span>
</div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap26.html#X7D40EE2084A6C976">26.5 <span class="Heading">Operations for row list matrix objects</span></a>
</span>
</div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap26.html#X7C03C92985B58F58">26.6 <span class="Heading">Operations for flat matrix objects</span></a>
</span>
</div>
</div>
<h3>26 <span class="Heading">Vector and matrix objects</span></h3>
<p>This chapter is work in progress. It will eventually describe the new interface to vector and matrix objects.</p>
<p>Traditionally, vectors in <strong class="pkg">GAP</strong> have been lists and matrices have been lists of lists (of equal length). Unfortunately, such lists cannot store their type and so it is impossible to use the full advantages of <strong class="pkg">GAP</strong>'s method selection on them. This situation is unsustainable in the long run since more special representations (compressed, sparse, etc.) have already been and even more will be implemented. To eventually solve this problem, this chapter describes a new programming interface to vectors and matrices.</p>
<p><a id="X81975083855CA9A1" name="X81975083855CA9A1"></a></p>
<h4>26.1 <span class="Heading">Fundamental ideas and rules</span></h4>
<p>The whole idea of this interface is that (row-) vectors and matrices must be proper objects with a stored type (i.e. created by Objectify allowing inheritance) to benefit from method selection. We therefore refer to the new style vectors and matrices as "vector objects" and "matrix objects" respectively.</p>
<p>It should be possible to write (efficient) code that is independent of the actual representation (in the sense of <strong class="pkg">GAP</strong>'s representation filters) and preserves it.</p>
<p>This latter requirement makes it necessary to distinguish between (at least) two classes of matrices:</p>
<ul>
<li><p>"RowList"-Matrices which behave basically like lists of rows, in particular are the rows individual <strong class="pkg">GAP</strong> objects that can be shared between different matrix objects.</p>
</li>
<li><p>"Flat" matrices which behave basically like one <strong class="pkg">GAP</strong> object that cannot be split up further. In particular a row is only a part of a matrix and no GAP object in itself.</p>
</li>
</ul>
<p>For various reasons these two classes have to be distinguished already with respect to the definition of the operations for them.</p>
<p>In particular vectors and matrices know their BaseDomain and their dimensions. Note that the basic condition is that the elements of vectors and matrices must either lie in the BaseDomain or naturally embed in the sense that + and * and = automatically work with all elements of the base domain (example: integers in polynomials over integers).</p>
<p>Vectors are equal with respect to "=" if they have the same length and the same entries. It is not necessary that they have the same BaseDomain. Matrices are equal with respect to "=" if they have the same dimensions and the same entries. It is possible that not for all pairs of representations methods exist.</p>
<p>It is not guaranteed that all rows of a matrix have the same vector type! It is for example thinkable that a matrix stores some of its rows in a sparse representation and some in a dense one! However, it is guaranteed that the rows of matrices in the same representation are compatible in the sense that all vector operations defined in this interface can be applied to them and that new matrices in the same representation as the original matrix can be formed out of them.</p>
<p>Note that there is neither a default mapping from the set of matrix representations to the set of vector representations nor one in the reverse direction! There is nothing like an "associated" vector representation to a matrix representation or vice versa.</p>
<p>The way to write code that preserves the representation basically works by using constructing operations that take template objects to decide about the actual representation of the new object.</p>
<p>Vectors do not have to be lists in the sense that they do not have to support all list operations. The same holds for matrices. However, RowList matrices behave nearly like lists of row vectors that insist on being dense and containing only vectors of the same length and with the same BaseDomain.</p>
<p>There are some rules embedded in the comments to the following code. They are marked with the word "Rule". FIXME: Collect all rules here.</p>
<p><a id="X7CF9CC0082C7AFF8" name="X7CF9CC0082C7AFF8"></a></p>
<h4>26.2 <span class="Heading">Categories of vectors and matrices</span></h4>
<p><a id="X7BD7D2837BFDE649" name="X7BD7D2837BFDE649"></a></p>
<h4>26.3 <span class="Heading">Constructing vector and matrix objects</span></h4>
<p><a id="X7AB6FE5B82E582E0" name="X7AB6FE5B82E582E0"></a></p>
<h4>26.4 <span class="Heading">Operations for row vector objects</span></h4>
<p><a id="X7D40EE2084A6C976" name="X7D40EE2084A6C976"></a></p>
<h4>26.5 <span class="Heading">Operations for row list matrix objects</span></h4>
<p><a id="X7C03C92985B58F58" name="X7C03C92985B58F58"></a></p>
<h4>26.6 <span class="Heading">Operations for flat matrix objects</span></h4>
<div class="chlinkprevnextbot"> <a href="chap0.html">[Top of Book]</a> <a href="chap0.html#contents">[Contents]</a> <a href="chap25.html">[Previous Chapter]</a> <a href="chap27.html">[Next Chapter]</a> </div>
<div class="chlinkbot"><span class="chlink1">Goto Chapter: </span><a href="chap0.html">Top</a> <a href="chap1.html">1</a> <a href="chap2.html">2</a> <a href="chap3.html">3</a> <a href="chap4.html">4</a> <a href="chap5.html">5</a> <a href="chap6.html">6</a> <a href="chap7.html">7</a> <a href="chap8.html">8</a> <a href="chap9.html">9</a> <a href="chap10.html">10</a> <a href="chap11.html">11</a> <a href="chap12.html">12</a> <a href="chap13.html">13</a> <a href="chap14.html">14</a> <a href="chap15.html">15</a> <a href="chap16.html">16</a> <a href="chap17.html">17</a> <a href="chap18.html">18</a> <a href="chap19.html">19</a> <a href="chap20.html">20</a> <a href="chap21.html">21</a> <a href="chap22.html">22</a> <a href="chap23.html">23</a> <a href="chap24.html">24</a> <a href="chap25.html">25</a> <a href="chap26.html">26</a> <a href="chap27.html">27</a> <a href="chap28.html">28</a> <a href="chap29.html">29</a> <a href="chap30.html">30</a> <a href="chap31.html">31</a> <a href="chap32.html">32</a> <a href="chap33.html">33</a> <a href="chap34.html">34</a> <a href="chap35.html">35</a> <a href="chap36.html">36</a> <a href="chap37.html">37</a> <a href="chap38.html">38</a> <a href="chap39.html">39</a> <a href="chap40.html">40</a> <a href="chap41.html">41</a> <a href="chap42.html">42</a> <a href="chap43.html">43</a> <a href="chap44.html">44</a> <a href="chap45.html">45</a> <a href="chap46.html">46</a> <a href="chap47.html">47</a> <a href="chap48.html">48</a> <a href="chap49.html">49</a> <a href="chap50.html">50</a> <a href="chap51.html">51</a> <a href="chap52.html">52</a> <a href="chap53.html">53</a> <a href="chap54.html">54</a> <a href="chap55.html">55</a> <a href="chap56.html">56</a> <a href="chap57.html">57</a> <a href="chap58.html">58</a> <a href="chap59.html">59</a> <a href="chap60.html">60</a> <a href="chap61.html">61</a> <a href="chap62.html">62</a> <a href="chap63.html">63</a> <a href="chap64.html">64</a> <a href="chap65.html">65</a> <a href="chap66.html">66</a> <a href="chap67.html">67</a> <a href="chap68.html">68</a> <a href="chap69.html">69</a> <a href="chap70.html">70</a> <a href="chap71.html">71</a> <a href="chap72.html">72</a> <a href="chap73.html">73</a> <a href="chap74.html">74</a> <a href="chap75.html">75</a> <a href="chap76.html">76</a> <a href="chap77.html">77</a> <a href="chap78.html">78</a> <a href="chap79.html">79</a> <a href="chap80.html">80</a> <a href="chap81.html">81</a> <a href="chap82.html">82</a> <a href="chap83.html">83</a> <a href="chap84.html">84</a> <a href="chap85.html">85</a> <a href="chap86.html">86</a> <a href="chap87.html">87</a> <a href="chapBib.html">Bib</a> <a href="chapInd.html">Ind</a> </div>
<hr />
<p class="foot">generated by <a href="http://www.math.rwth-aachen.de/~Frank.Luebeck/GAPDoc">GAPDoc2HTML</a></p>
</body>
</html>
|