<?xml version="1.0" encoding="utf-8" ?> <!-- for emacs: -*- coding: utf-8 -*- --> <!-- Apache may like this line in the file .htaccess: AddCharset utf-8 .html --> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg-flat.dtd" > <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head><title>randomMutableMatrix(ZZ,ZZ,RR,ZZ) -- a random mutable matrix of integers</title> <link rel="stylesheet" type="text/css" href="../../../../Macaulay2/Style/doc.css"/> </head> <body> <table class="buttons"> <tr> <td><div><a href="_rank.html">next</a> | <a href="_random_lp__Z__Z_cm__Z__Z_rp.html">previous</a> | <a href="_rank.html">forward</a> | <a href="_random_lp__Z__Z_cm__Z__Z_rp.html">backward</a> | up | <a href="index.html">top</a> | <a href="master.html">index</a> | <a href="toc.html">toc</a> | <a href="http://www.math.uiuc.edu/Macaulay2/">Macaulay2 web site</a></div> </td> </tr> </table> <hr/> <div><h1>randomMutableMatrix(ZZ,ZZ,RR,ZZ) -- a random mutable matrix of integers</h1> <div class="single"><h2>Synopsis</h2> <ul><li><div class="list"><dl class="element"><dt class="heading">Usage: </dt><dd class="value"><div><tt>randomMutableMatrix(nrows,ncols,zerof,max)</tt></div> </dd></dl> </div> </li> <li><span>Function: <a href="_random__Mutable__Matrix_lp__Z__Z_cm__Z__Z_cm__R__R_cm__Z__Z_rp.html" title="a random mutable matrix of integers">randomMutableMatrix</a></span></li> <li><div class="single">Inputs:<ul><li><span><tt>nrows</tt>, <span>an <a href="___Z__Z.html">integer</a></span></span></li> <li><span><tt>ncols</tt>, <span>an <a href="___Z__Z.html">integer</a></span></span></li> <li><span><tt>zerof</tt>, <span>a <a href="___R__R.html">real number</a></span>, between 0 and 1</span></li> <li><span><tt>max</tt>, <span>an <a href="___Z__Z.html">integer</a></span></span></li> </ul> </div> </li> <li><div class="single">Outputs:<ul><li><span><span>a <a href="___Mutable__Matrix.html">mutable matrix</a></span>, a random mutable <tt>nrows</tt> by <tt>ncols</tt> matrix of integers. The absolute value of the entries is less than <tt>max</tt>, and the frequency of entries equal to zero is given by <tt>zerof</tt>.</span></li> </ul> </div> </li> <li><div class="single"><a href="_using_spfunctions_spwith_spoptional_spinputs.html">Optional inputs</a>:<ul><li><span><tt>Dense => </tt><span><span>default value false</span>, whether the encoding of the matrix should be dense or not: see <a href="___Mutable__Matrix.html" title="the class of all mutable matrices">MutableMatrix</a></span></span></li> </ul> </div> </li> </ul> </div> <div class="single"><h2>Description</h2> <div>This function has been superceded by <a href="_fill__Matrix.html" title="fill a mutable matrix with random numbers">fillMatrix</a>, which works over more rings, is much faster for large matrices, and is more flexible.<table class="examples"><tr><td><pre>i1 : randomMutableMatrix(10,15,.9,100) o1 = | . 8 . . . . . . . . . 93 . . . | | . . . . . . . . . . -23 -18 . . . | | . . . . . . . . . . . . . . . | | . . 19 . . . . . . . . . . . . | | . . . . . . 29 . 11 . . . . . . | | . . . . . . . . . . . . . -86 . | | . . . . . . . . . . . . . . . | | . -8 34 . 5 . . . . . . . . . . | | . . . . . . . . . . . 7 . . . | | . . . 100 . . -88 . . . . . . . . | o1 : MutableMatrix</pre> </td></tr> </table> </div> </div> <div class="single"><h2>See also</h2> <ul><li><span><a href="_mutable__Matrix.html" title="make a mutable matrix">mutableMatrix</a> -- make a mutable matrix</span></li> <li><span><a href="_fill__Matrix.html" title="fill a mutable matrix with random numbers">fillMatrix</a> -- fill a mutable matrix with random numbers</span></li> <li><span><a href="_set__Random__Seed.html" title="set starting point for random number generator">setRandomSeed</a> -- set starting point for random number generator</span></li> <li><span><a href="_random.html" title="get a random element">random</a> -- get a random element</span></li> </ul> </div> </div> </body> </html>