📄 __mult_dimconstmatrixconstvecxvecyoned_tag.html
字号:
<HTML><!-- -- Copyright (c) 1998 -- University of Notre Dame -- -- Permission to use, copy, modify, distribute and sell this software -- and its documentation for any purpose is hereby granted without fee, -- provided that the above copyright notice appears in all copies and -- that both that copyright notice and this permission notice appear -- in supporting documentation. The University of Notre Dame makes no -- representations about the suitability of this software for any -- purpose. It is provided "as is" without express or implied warranty. -- --><HEAD><TITLE>Description of __mult_dim</TITLE></HEAD><BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" ALINK="#ff0000"> <FONT FACE=Helvetica><!--end header--><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=2 WIDTH=100%><TR><TD><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH=100%><TR><TD Align=left valign=middle width=440 rowspan=2><FONT FACE=verdana,arial,helvetica SIZE=+3 COLOR=#110088><B>__mult_dim</B></FONT></TD><TD valign=middle Align=right width=128 rowspan=2><A HREF="http://lsc.nd.edu/research/mtl"><IMG BORDER=0 SRC="./glossy-mtl-logo.jpg" height=48 ALT="[MTL Home]"></A></TD><TD Align=center width=280 nowrap><Font face=verdana,arial,helvetica size=+3><b>Programmers Guide</b></font></TD></TR><TR BGCOLOR='#2020b0'><TD HEIGHT=20 VALIGN='MIDDLE' NOWRAP align=center STYLE="font-family:verdana,arial,helvetica;font-weight:bold;"> <A STYLE="text-decoration:none;color:white;font-family:verdana,arial,helvetica;font-weight:bold;" HREF="./table_of_contents.html">Contents</A> | <A STYLE="text-decoration:none;color:white;font-family:verdana,arial,helvetica;font-weight:bold;" HREF="./mtl_index.html">Index</A> | <A STYLE="text-decoration:none;color:white;font-family:verdana,arial,helvetica;font-weight:bold;" HREF="http://lsc.nd.edu/research/mtl/search.html">Search</A> </TD></TR></TABLE></TD></TR><TR><TD><Table CellPadding=0 CellSpacing=0 width=100% cols=2><TR><TD Align=left><BR><TABLE BORDER=0 CellSpacing=0 CellPadding=0><TR><TD><Img src = "algorithms.gif" Alt="" WIDTH = "194" HEIGHT = "38" ></TD></TR></TABLE></TD><TD Align=right><BR><TABLE BORDER=0 CellSpacing=0 CellPadding=0><TR><TD><Img src = "function.gif" Alt="" WIDTH = "194" HEIGHT = "38" ></TD></TR></TABLE></TD></TR><TR><TD Align=left VAlign=top><b>Category</b>:algorithms</TD><TD Align=right VAlign=top><b>Component type</b>:function</TD></TR></Table></TD></TR><TR><TD><IMG SRC="whitespace.gif" Alt="" WIDTH="32" HEIGHT="10" ALIGN="TOP"></TD></TR><TR BGCOLOR=#e0e0e0><TD VALIGN=BOTTOM><FONT FACE=arial,helvetica SIZE=+1><B>Prototype</B></FONT></TD></TR><TR><TD><TT>template <class <A HREF="Matrix.html" >Matrix</A>, class VecX, class VecY><br> void <B>__mult_dim</B>(const <A HREF="Matrix.html" >Matrix</A>& A, const VecX& x, VecY y, <A HREF="oned_tag.html" >oned_tag</A>) ;</TT></TD></TR><TR><TD><IMG SRC="whitespace.gif" Alt="" WIDTH="32" HEIGHT="10" ALIGN="TOP"></TD></TR><TR BGCOLOR=#e0e0e0><TD VALIGN=BOTTOM><FONT FACE=arial,helvetica SIZE=+1><B>Description</B></FONT></TD></TR><TR><TD> Multiplies <A HREF="matrix.html" >matrix</A> A times vector x and stores the result in vector y. <p> Note: ignore the <tt><A HREF="oned_tag.html" >oned_tag</A></tt> parameter and the underscores in the name of this function.</TD></TR><TR><TD><IMG SRC="whitespace.gif" Alt="" WIDTH="32" HEIGHT="10" ALIGN="TOP"></TD></TR><TR BGCOLOR=#e0e0e0><TD VALIGN=BOTTOM><FONT FACE=arial,helvetica SIZE=+1><B>Definition</B></FONT></TD></TR><TR><TD><A HREF="../../mtl/mtl.h">mtl.h</A></TD></TR> <TR><TD><IMG SRC="whitespace.gif" Alt="" WIDTH="32" HEIGHT="10" ALIGN="TOP"></TD></TR><TR BGCOLOR=#e0e0e0><TD VALIGN=BOTTOM><FONT FACE=arial,helvetica SIZE=+1><B>Requirements on types</B></FONT></TD></TR><TR><TD><UL><LI> <tt><A HREF="Matrix.html" >Matrix</A>::value_type</tt>, <tt>VecX::value_type</tt>, and <tt>VecY::value_type</tt> must be the same type<LI> the multiplication operator must be defined for <tt><A HREF="Matrix.html" >Matrix</A>::value_type</tt><LI> the addition operator must be defined for <tt><A HREF="Matrix.html" >Matrix</A>::value_type</tt></UL></TD></TR><TR><TD><IMG SRC="whitespace.gif" Alt="" WIDTH="32" HEIGHT="10" ALIGN="TOP"></TD></TR><TR BGCOLOR=#e0e0e0><TD VALIGN=BOTTOM><FONT FACE=arial,helvetica SIZE=+1><B>Preconditions</B></FONT></TD></TR><TR><TD><UL><LI> <TT>A.nrows() <= y.size()</TT><LI> <TT>A.ncols() <= x.size()</TT><LI> x and y not same vector</UL></TD></TR><TR><TD><IMG SRC="whitespace.gif" Alt="" WIDTH="32" HEIGHT="10" ALIGN="TOP"></TD></TR><TR BGCOLOR=#e0e0e0><TD VALIGN=BOTTOM><FONT FACE=arial,helvetica SIZE=+1><B>Complexity</B></FONT></TD></TR><TR><TD></TD></TR><TR><TD><IMG SRC="whitespace.gif" Alt="" WIDTH="32" HEIGHT="10" ALIGN="TOP"></TD></TR><TR BGCOLOR=#e0e0e0><TD VALIGN=BOTTOM><FONT FACE=arial,helvetica SIZE=+1><B>Example</B></FONT></TD></TR><TR><TD>In <A HREF=../../contrib/examples/general_matvec_mult.cc>general_matvec_mult.cc</A>:<PRE> typedef <A HREF="matrix.html" >matrix</A>< double, <A HREF="rectangle.html" >rectangle</A><2,2>, <A HREF="dense.html" >dense</A><external>, <A HREF="column_major.html" >column_major</A>>::type <A HREF="Matrix.html" >Matrix</A>; typedef dense1D<double> <A HREF="Vector.html" >Vector</A>; double pi, theta; double dA[4]; <A HREF="Matrix.html" >Matrix</A> rot(dA); <A HREF="Vector.html" >Vector</A> vec1(<A HREF="Matrix.html" >Matrix</A>::N),vec2(<A HREF="Matrix.html" >Matrix</A>::N); pi = 4.0 * atan (1.0); theta = pi / 2.0; rot(0,0) = cos(theta); rot(1,0) = sin(theta); rot(0,1) = -sin(theta); rot(1,1) = cos(theta); vec1[0] = 3.0; vec1[1] = 4.0; <A HREF="mult.html" >mult</A>(rot, scaled(vec1, 0.5), vec2);</PRE><P>More examples can be found in <a href=../../contrib/examples/banded_matvec_mult.cc>banded_matvec_mult.cc</a>, <a href=../../contrib/examples/symm_matvec_mult.ccsymm_matvec_mult.cc>symm_matvec_mult.ccsymm_matvec_mult.cc</a></TD></TR><TR><TD><IMG SRC="whitespace.gif" Alt="" WIDTH="32" HEIGHT="10" ALIGN="TOP"></TD></TR><TR BGCOLOR=#e0e0e0><TD VALIGN=BOTTOM><FONT FACE=arial,helvetica SIZE=+1><B>Notes</B></FONT></TD></TR><TR><TD></TD></TR><TR><TD><IMG SRC="whitespace.gif" Alt="" WIDTH="32" HEIGHT="15" ALIGN="TOP"></TD></TR><TR BGCOLOR=#e0e0e0><TD VALIGN=BOTTOM><FONT FACE=arial,helvetica SIZE=+1><B>See also</B></FONT></TD></TR><TR><TD></TD></TR></TABLE><!--start footer--> <P><CENTER><CENTER><IMG SRC="./blue-bar.jpg" width=640></CENTER></CENTER><P><A HREF="http://www.nd.edu"><IMG BORDER=0 SRC="./ndtoclogo.gif" ALT="[MTL Home]" ALIGN=absmiddle></A></A><FONT SIZE="-2"><A HREF="../LICENSE.htm">Copyright ©1998,1999 University of Notre Dame. All Rights Reserved.</FONT></FONT></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -