⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 matrix.html

📁 JAMA: A Java Matrix Package 用于JAVA开发中的矩阵运算
💻 HTML
📖 第 1 页 / 共 4 页
字号:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A = A - B</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;double</CODE></FONT></TD><TD><CODE><B><A HREF="../Jama/Matrix.html#norm1()">norm1</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;One norm</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;double</CODE></FONT></TD><TD><CODE><B><A HREF="../Jama/Matrix.html#norm2()">norm2</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Two norm</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;double</CODE></FONT></TD><TD><CODE><B><A HREF="../Jama/Matrix.html#normF()">normF</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Frobenius norm</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;double</CODE></FONT></TD><TD><CODE><B><A HREF="../Jama/Matrix.html#normInf()">normInf</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Infinity norm</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../Jama/Matrix.html">Matrix</A></CODE></FONT></TD><TD><CODE><B><A HREF="../Jama/Matrix.html#plus(Jama.Matrix)">plus</A></B>(<A HREF="../Jama/Matrix.html">Matrix</A>&nbsp;B)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;C = A + B</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../Jama/Matrix.html">Matrix</A></CODE></FONT></TD><TD><CODE><B><A HREF="../Jama/Matrix.html#plusEquals(Jama.Matrix)">plusEquals</A></B>(<A HREF="../Jama/Matrix.html">Matrix</A>&nbsp;B)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A = A + B</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../Jama/Matrix.html#print(int, int)">print</A></B>(int&nbsp;w,      int&nbsp;d)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print the matrix to stdout.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../Jama/Matrix.html#print(java.text.NumberFormat, int)">print</A></B>(java.text.NumberFormat&nbsp;format,      int&nbsp;width)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print the matrix to stdout.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../Jama/Matrix.html#print(java.io.PrintWriter, int, int)">print</A></B>(java.io.PrintWriter&nbsp;output,      int&nbsp;w,      int&nbsp;d)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print the matrix to the output stream.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../Jama/Matrix.html#print(java.io.PrintWriter, java.text.NumberFormat, int)">print</A></B>(java.io.PrintWriter&nbsp;output,      java.text.NumberFormat&nbsp;format,      int&nbsp;width)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print the matrix to the output stream.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../Jama/QRDecomposition.html">QRDecomposition</A></CODE></FONT></TD><TD><CODE><B><A HREF="../Jama/Matrix.html#qr()">qr</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;QR Decomposition</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="../Jama/Matrix.html">Matrix</A></CODE></FONT></TD><TD><CODE><B><A HREF="../Jama/Matrix.html#random(int, int)">random</A></B>(int&nbsp;m,       int&nbsp;n)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Generate matrix with random elements</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../Jama/Matrix.html#rank()">rank</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Matrix rank</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="../Jama/Matrix.html">Matrix</A></CODE></FONT></TD><TD><CODE><B><A HREF="../Jama/Matrix.html#read(java.io.BufferedReader)">read</A></B>(java.io.BufferedReader&nbsp;input)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Read a matrix from a stream.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../Jama/Matrix.html#set(int, int, double)">set</A></B>(int&nbsp;i,    int&nbsp;j,    double&nbsp;s)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set a single element.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../Jama/Matrix.html#setMatrix(int[], int[], Jama.Matrix)">setMatrix</A></B>(int[]&nbsp;r,          int[]&nbsp;c,          <A HREF="../Jama/Matrix.html">Matrix</A>&nbsp;X)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set a submatrix.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../Jama/Matrix.html#setMatrix(int[], int, int, Jama.Matrix)">setMatrix</A></B>(int[]&nbsp;r,          int&nbsp;j0,          int&nbsp;j1,          <A HREF="../Jama/Matrix.html">Matrix</A>&nbsp;X)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set a submatrix.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../Jama/Matrix.html#setMatrix(int, int, int[], Jama.Matrix)">setMatrix</A></B>(int&nbsp;i0,          int&nbsp;i1,          int[]&nbsp;c,          <A HREF="../Jama/Matrix.html">Matrix</A>&nbsp;X)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set a submatrix.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../Jama/Matrix.html#setMatrix(int, int, int, int, Jama.Matrix)">setMatrix</A></B>(int&nbsp;i0,          int&nbsp;i1,          int&nbsp;j0,          int&nbsp;j1,          <A HREF="../Jama/Matrix.html">Matrix</A>&nbsp;X)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set a submatrix.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../Jama/Matrix.html">Matrix</A></CODE></FONT></TD><TD><CODE><B><A HREF="../Jama/Matrix.html#solve(Jama.Matrix)">solve</A></B>(<A HREF="../Jama/Matrix.html">Matrix</A>&nbsp;B)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Solve A*X = B</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../Jama/Matrix.html">Matrix</A></CODE></FONT></TD><TD><CODE><B><A HREF="../Jama/Matrix.html#solveTranspose(Jama.Matrix)">solveTranspose</A></B>(<A HREF="../Jama/Matrix.html">Matrix</A>&nbsp;B)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Solve X*A = B, which is also A'*X' = B'</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../Jama/SingularValueDecomposition.html">SingularValueDecomposition</A></CODE></FONT></TD><TD><CODE><B><A HREF="../Jama/Matrix.html#svd()">svd</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Singular Value Decomposition</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../Jama/Matrix.html">Matrix</A></CODE></FONT></TD><TD><CODE><B><A HREF="../Jama/Matrix.html#times(double)">times</A></B>(double&nbsp;s)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Multiply a matrix by a scalar, C = s*A</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../Jama/Matrix.html">Matrix</A></CODE></FONT></TD><TD><CODE><B><A HREF="../Jama/Matrix.html#times(Jama.Matrix)">times</A></B>(<A HREF="../Jama/Matrix.html">Matrix</A>&nbsp;B)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Linear algebraic matrix multiplication, A * B</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../Jama/Matrix.html">Matrix</A></CODE></FONT></TD><TD><CODE><B><A HREF="../Jama/Matrix.html#timesEquals(double)">timesEquals</A></B>(double&nbsp;s)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Multiply a matrix by a scalar in place, A = s*A</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;double</CODE></FONT></TD><TD><CODE><B><A HREF="../Jama/Matrix.html#trace()">trace</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Matrix trace.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../Jama/Matrix.html">Matrix</A></CODE></FONT></TD><TD><CODE><B><A HREF="../Jama/Matrix.html#transpose()">transpose</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Matrix transpose.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../Jama/Matrix.html">Matrix</A></CODE></FONT></TD><TD><CODE><B><A HREF="../Jama/Matrix.html#uminus()">uminus</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Unary minus</TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.lang.Object</B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE>equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD></TR></TABLE>&nbsp;<P><!-- ============ FIELD DETAIL =========== --><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="Matrix(int, int)"><!-- --></A><H3>Matrix</H3><PRE>public <B>Matrix</B>(int&nbsp;m,              int&nbsp;n)</PRE><DL><DD>Construct an m-by-n matrix of zeros.<DD><DL><DT><B>Parameters:</B><DD><CODE>m</CODE> - Number of rows.<DD><CODE>n</CODE> - Number of colums.</DL></DD></DL><HR><A NAME="Matrix(int, int, double)"><!-- --></A><H3>Matrix</H3><PRE>public <B>Matrix</B>(int&nbsp;m,              int&nbsp;n,              double&nbsp;s)</PRE><DL><DD>Construct an m-by-n constant matrix.<DD><DL><DT><B>Parameters:</B><DD><CODE>m</CODE> - Number of rows.<DD><CODE>n</CODE> - Number of colums.<DD><CODE>s</CODE> - Fill the matrix with this scalar value.</DL></DD></DL><HR><A NAME="Matrix(double[][])"><!-- --></A><H3>Matrix</H3><PRE>public <B>Matrix</B>(double[][]&nbsp;A)</PRE><DL><DD>Construct a matrix from a 2-D array.<DD><DL><DT><B>Parameters:</B><DD><CODE>A</CODE> - Two-dimensional array of doubles.<DT><B>Throws:</B><DD>java.lang.IllegalArgumentException - All rows must have the same length<DT><B>See Also: </B><DD><A HREF="../Jama/Matrix.html#constructWithCopy(double[][])"><CODE>constructWithCopy(double[][])</CODE></A></DL></DD></DL><HR><A NAME="Matrix(double[][], int, int)"><!-- --></A><H3>Matrix</H3><PRE>public <B>Matrix</B>(double[][]&nbsp;A,              int&nbsp;m,              int&nbsp;n)</PRE><DL><DD>Construct a matrix quickly without checking arguments.<DD><DL><DT><B>Parameters:</B><DD><CODE>A</CODE> - Two-dimensional array of doubles.<DD><CODE>m</CODE> - Number of rows.<DD><CODE>n</CODE> - Number of colums.</DL></DD></DL><HR><A NAME="Matrix(double[], int)"><!-- --></A><H3>Matrix</H3><PRE>public <B>Matrix</B>(double[]&nbsp;vals,              int&nbsp;m)</PRE><DL><DD>Construct a matrix from a one-dimensional packed array<DD><DL><DT><B>Parameters:</B><DD><CODE>vals</CODE> - One-dimensional array of doubles, packed by columns (ala Fortran).<DD><CODE>m</CODE> - Number of rows.<DT><B>Throws:</B><DD>java.lang.IllegalArgumentException - Array length must be a multiple of m.</DL></DD></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="constructWithCopy(double[][])"><!-- --></A><H3>constructWithCopy</H3><PRE>public static <A HREF="../Jama/Matrix.html">Matrix</A> <B>constructWithCopy</B>(double[][]&nbsp;A)</PRE><DL><DD>Construct a matrix from a copy of a 2-D array.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>A</CODE> - Two-dimensional array of doubles.<DT><B>Throws:</B><DD>java.lang.IllegalArgumentException - All rows must have the same length</DL></DD></DL><HR><A NAME="copy()"><!-- --></A><H3>copy</H3><PRE>public <A HREF="../Jama/Matrix.html">Matrix</A> <B>copy</B>()</PRE><DL><DD>Make a deep copy of a matrix<DD><DL></DL></DD></DL><HR><A NAME="clone()"><!-- --></A><H3>clone</H3><PRE>public java.lang.Object <B>clone</B>()</PRE><DL><DD>Clone the Matrix object.<DD><DL><DT><B>Overrides:</B><DD>clone in class java.lang.Object</DL></DD></DL><HR><A NAME="getArray()"><!-- --></A><H3>getArray</H3><PRE>public double[][] <B>getArray</B>()</PRE><DL><DD>Access the internal two-dimensional array.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>Pointer to the two-dimensional array of matrix elements.</DL></DD></DL><HR><A NAME="getArrayCopy()"><!-- --></A><H3>getArrayCopy</H3><PRE>public double[][] <B>getArrayCopy</B>()</PRE><DL><DD>Copy the internal two-dimensional array.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>Two-dimensional array copy of matrix elements.</DL>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -