📄 generic_dense2d.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 generic_dense2D</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>generic_dense2D<RepType, RepPtr, OffsetGen, int MM, int NN></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 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 = "containers.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>:containers</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 <A HREF="generic_dense2D.html" >generic_dense2D</A> container implements sevaral of the MTL storage types. They include <A HREF="dense.html" >dense</A>, <A HREF="packed.html" >packed</A>, <A HREF="banded.html" >banded</A>, and <A HREF="banded_view.html" >banded_view</A>. The common theme here is that the <A HREF="matrix.html" >matrix</A> is stored in a contiguous piece of memory. The differences in these storage types has to do with where to find the OneD segements in the linear memory. Caclulating these offsets is the job of the <A HREF="Offset.html" >Offset</A> concept, which has a model to handle each of the different storage types: <A HREF="rect_offset.html" >rect_offset</A>, <A HREF="strided_offset.html" >strided_offset</A>, <A HREF="banded_offset.html" >banded_offset</A>, <A HREF="packed_offset.html" >packed_offset</A>, and <A HREF="banded_view_offset.html" >banded_view_offset</A>. There are two derived classes of <A HREF="generic_dense2D.html" >generic_dense2D</A> that specify the memory management, <A HREF="dense2D.html" >dense2D</A> and <A HREF="external2D.html" >external2D</A>. The <A HREF="dense2D.html" >dense2D</A> version owns its memory, while the <A HREF="external2D.html" >external2D</A> imports its memory from somewhere else through a pointer (which allows for interoperability with other codes -- even with Fortran!). <p>JGS Nasty VC workaround VC doesn't like thisfriend class transpose_type;</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="dense2D.h">dense2D.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>RepType</TT></TD><TD>The Container used to store the elements</TD><TD><TT> </TT></TD></TR><TR><TD><TT>RepPtr</TT></TD><TD>The type used to reference to the container</TD><TD><TT> </TT></TD></TR><TR><TD><TT>OffsetGen</TT></TD><TD>The generator that creates the <A HREF="Offset.html" >Offset</A> class</TD><TD><TT> </TT></TD></TR><TR><TD><TT>MM</TT></TD><TD>For static sized <A HREF="matrix.html" >matrix</A>, the major <A HREF="dimension.html" >dimension</A></TD><TD><TT> </TT></TD></TR><TR><TD><TT>NN</TT></TD><TD>For static sized <A HREF="matrix.html" >matrix</A>, the minor <A HREF="dimension.html" >dimension</A></TD><TD><TT> </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> <A HREF="TwoDStorage.html" >TwoDStorage</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>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>enum { M = MM, N = NN } </TT></TD> <TD><FONT FACE=Times SIZE=3> </FONT></TD> <TD><FONT FACE=Times SIZE=3> Static sizes (0 if dynamic) </FONT></TD> </TR> <TR><TD VALIGN="TOP"><TT> <TT>size_type </TT></TD> <TD><FONT FACE=Times SIZE=3> </FONT></TD> <TD><FONT FACE=Times SIZE=3> The type for dimensions and indices </FONT></TD> </TR> <TR><TD VALIGN="TOP"><TT> <TT>difference_type </TT></TD> <TD><FONT FACE=Times SIZE=3> </FONT></TD> <TD><FONT FACE=Times SIZE=3> The type for differences between iterators </FONT></TD> </TR> <TR><TD VALIGN="TOP"><TT> <TT>dim_type </TT></TD> <TD><FONT FACE=Times SIZE=3> </FONT></TD> <TD><FONT FACE=Times SIZE=3> A pair type for dimensions </FONT></TD> </TR> <TR><TD VALIGN="TOP"><TT> <TT>band_type </TT></TD> <TD><FONT FACE=Times SIZE=3> </FONT></TD> <TD><FONT FACE=Times SIZE=3> A pair type for bandwidth </FONT></TD> </TR> <TR><TD VALIGN="TOP"><TT> <TT>sparsity </TT></TD> <TD><FONT FACE=Times SIZE=3> </FONT></TD> <TD><FONT FACE=Times SIZE=3> This is a <A HREF="dense.html" >dense</A> <A HREF="matrix.html" >matrix</A> </FONT></TD> </TR> <TR><TD VALIGN="TOP"><TT> <TT>is_strided </TT></TD> <TD><FONT FACE=Times SIZE=3> </FONT></TD> <TD><FONT FACE=Times SIZE=3> </FONT></TD> </TR> <TR><TD VALIGN="TOP"><TT> <TT>value_type </TT></TD> <TD><FONT FACE=Times SIZE=3> </FONT></TD> <TD><FONT FACE=Times SIZE=3> The 1D container type </FONT></TD> </TR> <TR><TD VALIGN="TOP"><TT> <TT>reference </TT></TD> <TD><FONT FACE=Times SIZE=3> </FONT></TD> <TD><FONT FACE=Times SIZE=3> The type for a reference to value_type </FONT></TD> </TR> <TR><TD VALIGN="TOP"><TT> <TT>const_reference </TT></TD> <TD><FONT FACE=Times SIZE=3> </FONT></TD> <TD><FONT FACE=Times SIZE=3> The type for a const reference to value_type </FONT></TD> </TR> <TR><TD VALIGN="TOP"><TT> <TT>iterator </TT></TD> <TD><FONT FACE=Times SIZE=3> </FONT></TD> <TD><FONT FACE=Times SIZE=3> The iterator type </FONT></TD> </TR> <TR><TD VALIGN="TOP"><TT> <TT>const_iterator </TT></TD> <TD><FONT FACE=Times SIZE=3> </FONT></TD> <TD><FONT FACE=Times SIZE=3> The const iterator type </FONT></TD> </TR> <TR><TD VALIGN="TOP"><TT> <TT>reverse_iterator </TT></TD> <TD><FONT FACE=Times SIZE=3> </FONT></TD> <TD><FONT FACE=Times SIZE=3> The reverse iterator type </FONT></TD> </TR> <TR><TD VALIGN="TOP"><TT> <TT>const_reverse_iterator </TT></TD> <TD><FONT FACE=Times SIZE=3> </FONT></TD> <TD><FONT FACE=Times SIZE=3> The const reverse iterator type </FONT></TD> </TR> <TR><TD VALIGN="TOP"><TT> <TT>transpose_type </TT></TD> <TD><FONT FACE=Times SIZE=3> </FONT></TD> <TD><FONT FACE=Times SIZE=3> The type for the transpose of this container </FONT></TD> </TR> <TR><TD VALIGN="TOP"><TT> <TT>banded_view_type </TT></TD> <TD><FONT FACE=Times SIZE=3> </FONT></TD> <TD><FONT FACE=Times SIZE=3> The type for a <A HREF="banded.html" >banded</A> view of this container </FONT></TD> </TR> <TR><TD VALIGN="TOP"><TT> <TT>submatrix_type </TT></TD> <TD><FONT FACE=Times SIZE=3> </FONT></TD> <TD><FONT FACE=Times SIZE=3> The type for a sub-section of this 2D container </FONT></TD> </TR> <TR><TD VALIGN="TOP"><TT> <TT>strideability </TT></TD> <TD><FONT FACE=Times SIZE=3> </FONT></TD> <TD><FONT FACE=Times SIZE=3> This is a stridable container, can use rows(A), columns(A) </FONT></TD> </TR> <TR><TD VALIGN="TOP"><TT> <TT>generic_dense2D () </TT> </TT></TD> <TD><FONT FACE=Times SIZE=3> </FONT></TD> <TD><FONT FACE=Times SIZE=3> Default Constructor </FONT></TD> </TR> <TR><TD VALIGN="TOP"><TT> <TT>generic_dense2D (rep_ptr data, size_type m, size_type n, size_type ld) </TT> </TT></TD> <TD><FONT FACE=Times SIZE=3> </FONT></TD> <TD><FONT FACE=Times SIZE=3> Normal Constructor </FONT></TD> </TR> <TR><TD VALIGN="TOP"><TT> <TT>generic_dense2D (rep_ptr data, size_type m, size_type n, size_type ld, dyn_dim s, char) </TT> </TT></TD> <TD><FONT FACE=Times SIZE=3> </FONT></TD> <TD><FONT FACE=Times SIZE=3> Constructor with non-zero upper-left corner indices </FONT></TD> </TR> <TR><TD VALIGN="TOP"><TT> <TT>generic_dense2D (rep_ptr data, size_type ld) </TT> </TT></TD> <TD><FONT FACE=Times SIZE=3> </FONT></TD> <TD><FONT FACE=Times SIZE=3> Static M, N constructor </FONT></TD> </TR> <TR><TD VALIGN="TOP"><TT> <TT>generic_dense2D (rep_ptr data, size_type m, size_type n, size_type ld, band_type bw) </TT> </TT></TD> <TD><FONT FACE=Times SIZE=3> </FONT></TD> <TD><FONT FACE=Times SIZE=3> with bandwidth constructor </FONT></TD> </TR> <TR><TD VALIGN="TOP"><TT> <TT>generic_dense2D (const <A HREF="generic_dense2D.html" >generic_dense2D</A>& x) </TT> </TT></TD> <TD><FONT FACE=Times SIZE=3> </FONT></TD> <TD><FONT FACE=Times SIZE=3> Static M, N with bandwith?Copy Constructor </FONT></TD> </TR> <TR><TD VALIGN="TOP"><TT> <A HREF="generic_dense2D.html" >generic_dense2D</A>& <TT>operator= (const <A HREF="generic_dense2D.html" >generic_dense2D</A>& x) </TT> </TT></TD> <TD><FONT FACE=Times SIZE=3>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -