📄 page94.html
字号:
<HTML><HEAD><TITLE>Matrices</TITLE></HEAD><BODY bgcolor="#FFFFFF"> <a href="../index.html" target="_top"><img src="../icons/usins.gif" alt="Logo" align=right></a><b>Data Structures and Algorithms with Object-Oriented Design Patterns in Python</b><br><A NAME="tex2html2293" HREF="page95.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="../icons/next_motif.gif"></A> <A NAME="tex2html2291" HREF="page89.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="../icons/up_motif.gif"></A> <A NAME="tex2html2285" HREF="page93.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="../icons/previous_motif.gif"></A> <A NAME="tex2html2295" HREF="page611.html"><IMG WIDTH=43 HEIGHT=24 ALIGN=BOTTOM ALT="index" SRC="../icons/index_motif.gif"></A> <BR><HR><H2><A NAME="SECTION004250000000000000000">Matrices</A></H2><P>Two-dimensional arrays of floating-point numbersarise in many different scientific computations.Such arrays are usually called <em>matrices</em><A NAME=3183> </A>.Mathematicians have studied the properties of matrices for many yearsand have developed an extensive repertoire of operations on matrices.In this section we consider two-dimensional matricesand examine the implementation of simple, matrix multiplication.<P>The dimensions of a two-dimensional matrix are referred to as the<em>rows</em> and the <em>columns</em> of the matrix.Program <A HREF="page94.html#progmatrixa"><IMG ALIGN=BOTTOM ALT="gif" SRC="../icons/cross_ref_motif.gif"></A> defines a <tt>Matrix</tt> classwhich provides two properties, <tt>numberOfRows</tt> and <tt>numberOfColumns</tt>.<P><P><A NAME="3300"> </A><A NAME="progmatrixa"> </A> <IMG WIDTH=575 HEIGHT=428 ALIGN=BOTTOM ALT="program3190" SRC="img615.gif" ><BR><STRONG>Program:</STRONG> <tt>Matrix</tt> class.<BR><P><P>The <tt>Matrix</tt> class has two plain integer instance attributes,<tt>_numberOfRows</tt> and <tt>_numberOfColumns</tt>,which record the dimensions of the matrix.<P><HR><A NAME="tex2html2293" HREF="page95.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="../icons/next_motif.gif"></A> <A NAME="tex2html2291" HREF="page89.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="../icons/up_motif.gif"></A> <A NAME="tex2html2285" HREF="page93.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="../icons/previous_motif.gif"></A> <A NAME="tex2html2295" HREF="page611.html"><IMG WIDTH=43 HEIGHT=24 ALIGN=BOTTOM ALT="index" SRC="../icons/index_motif.gif"></A> <P><ADDRESS><img src="../icons/bruno.gif" alt="Bruno" align=right><a href="../copyright.html">Copyright © 2003</a> by <a href="../signature.html">Bruno R. Preiss, P.Eng.</a> All rights reserved.</ADDRESS></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -