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

📄 scale_iterator.html

📁 Matrix_Template_Library.rar c++矩阵模块库函数
💻 HTML
字号:
<HTML><!--  -- Copyright (c) 1998,1999  -- 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 scale_iterator</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>scale_iterator&#60;RandomAccessIterator, T&#62;</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;">&nbsp;&nbsp;<A STYLE="text-decoration:none;color:white;font-family:verdana,arial,helvetica;font-weight:bold;" HREF="./table_of_contents.html">Contents</A>&nbsp;|&nbsp;<A STYLE="text-decoration:none;color:white;font-family:verdana,arial,helvetica;font-weight:bold;" HREF="./mtl_index.html">Index</A>&nbsp;|&nbsp;&nbsp;<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>&nbsp;</TD></TR></TABLE></TD></TR><TR><TD><Table Border=0 CellPadding=0 CellSpacing=0 width=100% cols=2><TR><TD Align=left><BR><TABLE BORDER=0 CellSpacing=0 CellPadding=0><TR><TD><Img src = "iterators.gif" Alt="" WIDTH = "194"  HEIGHT = "38" ></TD></TR><TR><TD><Img src = "adaptors.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 = "type.gif" Alt="" WIDTH = "194"  HEIGHT = "38" ></TD></TR></TABLE></TD></TR><TR><TD Align=left VAlign=top><b>Category</b>:iterators,adaptors</TD><TD Align=right VAlign=top><b>Component type</b>:type</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>Description</B></FONT></TD></TR><TR><TD> The scale iterator is an adaptor which multiplies the value of the underlying element by some scalar as they are access (through the dereference operator). Scale iterators are somewhat different from most in that they are always considered to be a constant iterator whether or not the underlying elements are mutable. Typically users will not need to use scale iterator directly. It is really just an implementation detail of the <A HREF="scaled1D.html" >scaled1D</A> container.</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>Example</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>Definition</B></FONT></TD></TR><TR><TD><A HREF="scale_iterator.h">scale_iterator.h</A></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>Template Parameters</B></FONT></TD></TR><TR><TD><BR><TABLE BORDER><TR><TH>Parameter</TH><TH>Description</TH><TH>Default</TH></TR><TR><TD><TT>RandomAccessIterator</TT></TD><TD>The underlying iterator</TD><TD><TT>&nbsp;</TT></TD></TR><TR><TD><TT>T</TT></TD><TD>The type of the scalar to multiply by</TD><TD><TT>&nbsp;</TT></TD></TR></TABLE></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>Model of</B></FONT></TD></TR><TR><TD> RandomAccessIterator</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>Type requirements</B></FONT></TD></TR><TR><TD><UL><LI>  T must be convertible to RandomAccessIterator's value_type<LI>  RandomAccessIterator's value_type must be a model of Ring</UL></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>Members</B></FONT></TD></TR><TR><TD><TABLE BORDER><TR><TH>Member</TH><TH>Where defined</TH><TH>Description</TH></TR>    <TR><TD VALIGN="TOP"><TT>        <TT>value_type         </TT></TD>    <TD><FONT FACE=Times SIZE=3>      &nbsp;     </FONT></TD>    <TD><FONT FACE=Times SIZE=3>      The value type      </FONT></TD>	    </TR>    <TR><TD VALIGN="TOP"><TT>        <TT>difference_type         </TT></TD>    <TD><FONT FACE=Times SIZE=3>      &nbsp;     </FONT></TD>    <TD><FONT FACE=Times SIZE=3>      The difference type       </FONT></TD>	    </TR>    <TR><TD VALIGN="TOP"><TT>        <TT>pointer         </TT></TD>    <TD><FONT FACE=Times SIZE=3>      &nbsp;     </FONT></TD>    <TD><FONT FACE=Times SIZE=3>      The pointer type      </FONT></TD>	    </TR>    <TR><TD VALIGN="TOP"><TT>        <TT>distance_type         </TT></TD>    <TD><FONT FACE=Times SIZE=3>      &nbsp;     </FONT></TD>    <TD><FONT FACE=Times SIZE=3>             &nbsp;      </FONT></TD>	    </TR>    <TR><TD VALIGN="TOP"><TT>        <TT>pointer         </TT></TD>    <TD><FONT FACE=Times SIZE=3>      &nbsp;     </FONT></TD>    <TD><FONT FACE=Times SIZE=3>      The pointer type      </FONT></TD>	    </TR>    <TR><TD VALIGN="TOP"><TT>        <TT>iterator_category         </TT></TD>    <TD><FONT FACE=Times SIZE=3>      &nbsp;     </FONT></TD>    <TD><FONT FACE=Times SIZE=3>      The iterator category      </FONT></TD>	    </TR>    <TR><TD VALIGN="TOP"><TT>        <TT>Distance         </TT></TD>    <TD><FONT FACE=Times SIZE=3>      &nbsp;     </FONT></TD>    <TD><FONT FACE=Times SIZE=3>             &nbsp;      </FONT></TD>	    </TR>    <TR><TD VALIGN="TOP"><TT>        <TT>iterator_type         </TT></TD>    <TD><FONT FACE=Times SIZE=3>      &nbsp;     </FONT></TD>    <TD><FONT FACE=Times SIZE=3>             &nbsp;      </FONT></TD>	    </TR>    <TR><TD VALIGN="TOP"><TT>        <TT>reference         </TT></TD>    <TD><FONT FACE=Times SIZE=3>      &nbsp;     </FONT></TD>    <TD><FONT FACE=Times SIZE=3>      The reference type      </FONT></TD>	    </TR>    <TR><TD VALIGN="TOP"><TT>        <TT>const_reference         </TT></TD>    <TD><FONT FACE=Times SIZE=3>      &nbsp;     </FONT></TD>    <TD><FONT FACE=Times SIZE=3>             &nbsp;      </FONT></TD>	    </TR>    <TR><TD VALIGN="TOP"><TT>         <TT>scale_iterator () </TT>            </TT></TD>    <TD><FONT FACE=Times SIZE=3>      Trivial Iterator      </FONT></TD>    <TD><FONT FACE=Times SIZE=3>      The default constructor      </FONT></TD>	    </TR>    <TR><TD VALIGN="TOP"><TT>         <TT>scale_iterator (const RandomAccessIterator&#38; x) </TT>            </TT></TD>    <TD><FONT FACE=Times SIZE=3>      <A HREF="scale_iterator.html" >scale_iterator</A>      </FONT></TD>    <TD><FONT FACE=Times SIZE=3>             &nbsp;      </FONT></TD>	    </TR>    <TR><TD VALIGN="TOP"><TT>         <TT>scale_iterator (const RandomAccessIterator&#38; x, const value_type&#38; a) </TT>            </TT></TD>    <TD><FONT FACE=Times SIZE=3>      <A HREF="scale_iterator.html" >scale_iterator</A>      </FONT></TD>    <TD><FONT FACE=Times SIZE=3>      Normal constructor      </FONT></TD>	    </TR>    <TR><TD VALIGN="TOP"><TT>         <TT>scale_iterator (const self&#38; x) </TT>            </TT></TD>    <TD><FONT FACE=Times SIZE=3>      Trivial Iterator      </FONT></TD>    <TD><FONT FACE=Times SIZE=3>      Copy constructor      </FONT></TD>	    </TR>    <TR><TD VALIGN="TOP"><TT>     int     <TT>index () const</TT>            </TT></TD>    <TD><FONT FACE=Times SIZE=3>      Indexible Iterator      </FONT></TD>    <TD><FONT FACE=Times SIZE=3>      MTL index method      </FONT></TD>	    </TR>    <TR><TD VALIGN="TOP"><TT>     operator     <TT>RandomAccessIterator () </TT>            </TT></TD>    <TD><FONT FACE=Times SIZE=3>      <A HREF="scale_iterator.html" >scale_iterator</A>      </FONT></TD>    <TD><FONT FACE=Times SIZE=3>      Convert to base iterator      </FONT></TD>	    </TR>    <TR><TD VALIGN="TOP"><TT>     RandomAccessIterator     <TT>base () const</TT>            </TT></TD>    <TD><FONT FACE=Times SIZE=3>      <A HREF="scale_iterator.html" >scale_iterator</A>      </FONT></TD>    <TD><FONT FACE=Times SIZE=3>      Access base iterator      </FONT></TD>	    </TR>    <TR><TD VALIGN="TOP"><TT>     value_type     <TT>operator* () const</TT>            </TT></TD>    <TD><FONT FACE=Times SIZE=3>      Trivial Iterator      </FONT></TD>    <TD><FONT FACE=Times SIZE=3>      Dereference (and scale)      </FONT></TD>	    </TR>    <TR><TD VALIGN="TOP"><TT>     self&#38;     <TT>operator () </TT>            </TT></TD>    <TD><FONT FACE=Times SIZE=3>      Forward Iterator      </FONT></TD>    <TD><FONT FACE=Times SIZE=3>      Preincrement      </FONT></TD>	    </TR>    <TR><TD VALIGN="TOP"><TT>     self     <TT>operator (int) </TT>            </TT></TD>    <TD><FONT FACE=Times SIZE=3>      Forward Iterator      </FONT></TD>    <TD><FONT FACE=Times SIZE=3>      Postincrement      </FONT></TD>	    </TR>    <TR><TD VALIGN="TOP"><TT>     self&#38;     <TT>operator-- () </TT>            </TT></TD>    <TD><FONT FACE=Times SIZE=3>      Bidirectional Iterator      </FONT></TD>    <TD><FONT FACE=Times SIZE=3>      Preincrement      </FONT></TD>	    </TR>    <TR><TD VALIGN="TOP"><TT>     self     <TT>operator-- (int) </TT>            </TT></TD>    <TD><FONT FACE=Times SIZE=3>      Bidirectional Iterator      </FONT></TD>    <TD><FONT FACE=Times SIZE=3>      Postincrement      </FONT></TD>	    </TR>    <TR><TD VALIGN="TOP"><TT>     self     <TT>operator+  (Distance n) const</TT>            </TT></TD>    <TD><FONT FACE=Times SIZE=3>      Random Access Iterator      </FONT></TD>    <TD><FONT FACE=Times SIZE=3>      Iterator addition      </FONT></TD>	    </TR>    <TR><TD VALIGN="TOP"><TT>     self&#38;     <TT>operator+= (Distance n) </TT>            </TT></TD>    <TD><FONT FACE=Times SIZE=3>      Random Access Iterator      </FONT></TD>    <TD><FONT FACE=Times SIZE=3>      Advance a distance      </FONT></TD>	    </TR>    <TR><TD VALIGN="TOP"><TT>     self     <TT>operator-  (Distance n) const</TT>            </TT></TD>    <TD><FONT FACE=Times SIZE=3>      Random Access Iterator      </FONT></TD>    <TD><FONT FACE=Times SIZE=3>      Subtract a distance      </FONT></TD>	    </TR>    <TR><TD VALIGN="TOP"><TT>     difference_type     <TT>operator-  (const self&#38; x) const</TT>            </TT></TD>    <TD><FONT FACE=Times SIZE=3>      &nbsp;     </FONT></TD>    <TD><FONT FACE=Times SIZE=3>             &nbsp;      </FONT></TD>	    </TR>    <TR><TD VALIGN="TOP"><TT>     self&#38;     <TT>operator-= (Distance n) </TT>            </TT></TD>    <TD><FONT FACE=Times SIZE=3>      Random Access Iterator      </FONT></TD>    <TD><FONT FACE=Times SIZE=3>      Retreat a distance      </FONT></TD>	    </TR>    <TR><TD VALIGN="TOP"><TT>     value_type     <TT>operator[] (Distance n) const</TT>            </TT></TD>    <TD><FONT FACE=Times SIZE=3>      &nbsp;     </FONT></TD>    <TD><FONT FACE=Times SIZE=3>      Access at an offset      </FONT></TD>	    </TR>    <TR><TD VALIGN="TOP"><TT>     bool     <TT>operator== (const self&#38; x) const</TT>            </TT></TD>    <TD><FONT FACE=Times SIZE=3>      Trivial Iterator      </FONT></TD>    <TD><FONT FACE=Times SIZE=3>      Equality      </FONT></TD>	    </TR>    <TR><TD VALIGN="TOP"><TT>     bool     <TT>operator!= (const self&#38; x) const</TT>            </TT></TD>    <TD><FONT FACE=Times SIZE=3>      Trivial Iterator      </FONT></TD>    <TD><FONT FACE=Times SIZE=3>      Inequality      </FONT></TD>	    </TR>    <TR><TD VALIGN="TOP"><TT>     bool     <TT>operator< (const self&#38; x) const</TT>            </TT></TD>    <TD><FONT FACE=Times SIZE=3>      Random Access Iterator      </FONT></TD>    <TD><FONT FACE=Times SIZE=3>      Less than      </FONT></TD>	    </TR></TABLE></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>New members</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>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 &copy;1998,1999 University of Notre Dame.  All Rights Reserved.</FONT></FONT></BODY></HTML> 

⌨️ 快捷键说明

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