File: BasicMatrix.html

package info (click to toggle)
boost 1.27.0-3
  • links: PTS
  • area: main
  • in suites: woody
  • size: 19,908 kB
  • ctags: 26,546
  • sloc: cpp: 122,225; ansic: 10,956; python: 4,412; sh: 855; yacc: 803; makefile: 257; perl: 165; lex: 90; csh: 6
file content (107 lines) | stat: -rw-r--r-- 2,394 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<HTML>
<!--
  -- Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
  --
  -- 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.  We make no
  -- representations about the suitability of this software for any
  -- purpose.  It is provided "as is" without express or implied warranty.
  -->
<Head>
<Title>BasicMatrix</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" 
        ALINK="#ff0000"> 
<IMG SRC="../../../c++boost.gif" 
     ALT="C++ Boost" width="277" height="86"> 

<BR Clear>

<H1><A NAME="concept:BasicMatrix"></A>
BasicMatrix
</H1>

The BasicMatrix concept provides a minimalist interface for
accessing elements from a 2 dimensional table of values.


<H3>Refinement of</H3>

none

<h3>Notation</h3>

<Table>
<TR>
<TD>{<tt>M,I,V</tt>}</TD>
<TD>The matrix, index, and values types that together model the BasicMatrix concept.</TD>
</TR>

<TR>
<TD><tt>A</tt></TD>
<TD>An object of type <tt>M</tt>.</TD>
</TR>

<TR>
<TD><tt>i, j</tt></TD>
<TD>Objects of type <tt>I</tt>.</TD>
</TR>

</table>

<H3>Associated Types</H3>

none

<h3>Valid Expressions</h3>

<Table border>

<tr>
<td><a name="sec:elt-access"><TT>A[i][j]</TT></a></TD>
<TD>Returns a reference to the element object stored at index <tt>(i,j)</tt><br>
Return type: <TT>V&amp;</TT> for mutable <tt>A</tt> or <TT>const V&amp;</TT>
for constant <tt>A</tt>.
</TD>
</TR>

</table>

<H3>Complexity guarantees</H3>

Element access is constant time.

<H3>Concept Checking Class</H3>

<pre>
  template &lt;class M, class I, class V&gt;
  struct BasicMatrixConcept
  {
    void constraints() {
      V&amp; elt = A[i][j];
      const_constraints(A);
      ignore_unused_variable_warning(elt);      
    }
    void const_constraints(const M&amp; A) {
      const V&amp; elt = A[i][j];
      ignore_unused_variable_warning(elt);      
    }
    M A;
    I i, j;
  };
</pre>

<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000-2001</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>,
Indiana University (<A
HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)
</TD></TR></TABLE>

</BODY>
</HTML>