source: Sophya/trunk/Poubelle/DPC:FitsIOServer/Blitz/blitz/tinymatexpr.h@ 658

Last change on this file since 658 was 658, checked in by ansari, 26 years ago

no message

File size: 2.0 KB
Line 
1/***************************************************************************
2 * blitz/tinymatexpr.h Tiny Matrix Expressions
3 *
4 * $Id: tinymatexpr.h,v 1.1.1.1 1999-11-26 16:37:04 ansari Exp $
5 *
6 * Copyright (C) 1997,1998 Todd Veldhuizen <tveldhui@seurat.uwaterloo.ca>
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * Suggestions: blitz-suggest@cybervision.com
19 * Bugs: blitz-bugs@cybervision.com
20 *
21 * For more information, please see the Blitz++ Home Page:
22 * http://seurat.uwaterloo.ca/blitz/
23 *
24 ***************************************************************************
25 * $Log: not supported by cvs2svn $
26 * Revision 1.1.1.1 1999/04/09 17:59:01 ansari
27 * Creation module DPC/Blitz (blitz 0.4) Reza 09/04/99
28 *
29 * Revision 1.2 1998/03/14 00:04:47 tveldhui
30 * 0.2-alpha-05
31 *
32 * Revision 1.1 1997/07/16 14:51:20 tveldhui
33 * Update: Alpha release 0.2 (Arrays)
34 *
35 */
36
37#ifndef BZ_TINYMATEXPR_H
38#define BZ_TINYMATEXPR_H
39
40#ifndef BZ_TINYMAT_H
41 #error <blitz/tinymatexpr.h> must be included via <blitz/tinymat.h>
42#endif
43
44BZ_NAMESPACE(blitz)
45
46template<class T_expr>
47class _bz_tinyMatExpr {
48public:
49 typedef _bz_typename T_expr::T_numtype T_numtype;
50
51 enum {
52 rows = T_expr::rows,
53 columns = T_expr::columns
54 };
55
56 _bz_tinyMatExpr(T_expr expr)
57 : expr_(expr)
58 { }
59
60 _bz_tinyMatExpr(const _bz_tinyMatExpr<T_expr>& x)
61 : expr_(x.expr_)
62 { }
63
64 T_numtype operator()(int i, int j) const
65 { return expr_(i,j); }
66
67protected:
68 T_expr expr_;
69};
70
71BZ_NAMESPACE_END
72
73#endif // BZ_TINYMATEXPR_H
74
Note: See TracBrowser for help on using the repository browser.