/[escript]/trunk/escript/src/DataBlocks2D.h
ViewVC logotype

Diff of /trunk/escript/src/DataBlocks2D.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 478 by jgs, Tue Jan 31 02:21:49 2006 UTC revision 1312 by ksteube, Mon Sep 24 06:18:44 2007 UTC
# Line 1  Line 1 
1  /*  
2   ******************************************************************************  /* $Id$ */
3   *                                                                            *  
4   *       COPYRIGHT  ACcESS 2004 -  All Rights Reserved                        *  /*******************************************************
5   *                                                                            *   *
6   * This software is the property of ACcESS. No part of this code              *   *           Copyright 2003-2007 by ACceSS MNRF
7   * may be copied in any form or by any means without the expressed written    *   *       Copyright 2007 by University of Queensland
8   * consent of ACcESS.  Copying, use or modification of this software          *   *
9   * by any unauthorised person is illegal unless that person has a software    *   *                http://esscc.uq.edu.au
10   * license agreement with ACcESS.                                             *   *        Primary Business: Queensland, Australia
11   *                                                                            *   *  Licensed under the Open Software License version 3.0
12   ******************************************************************************   *     http://www.opensource.org/licenses/osl-3.0.php
13  */   *
14     *******************************************************/
15    
16  #if !defined escript_DataBlocks2D_20040405_H  #if !defined escript_DataBlocks2D_20040405_H
17  #define escript_DataBlocks2D_20040405_H  #define escript_DataBlocks2D_20040405_H
18    #include "system_dep.h"
19    
20  #include "DataVector.h"  #include "DataVector.h"
21    
# Line 49  class DataBlocks2D { Line 51  class DataBlocks2D {
51       Default constructor for DataBlocks2D.       Default constructor for DataBlocks2D.
52       Creates an empty DataBlocks2D object.       Creates an empty DataBlocks2D object.
53    */    */
54      ESCRIPT_DLL_API
55    DataBlocks2D();    DataBlocks2D();
56    
57    /**    /**
# Line 58  class DataBlocks2D { Line 61  class DataBlocks2D {
61       Description:       Description:
62       Copy constructor for DataBlocks2D.       Copy constructor for DataBlocks2D.
63    */    */
64      ESCRIPT_DLL_API
65    DataBlocks2D(const DataBlocks2D& other);    DataBlocks2D(const DataBlocks2D& other);
66    
67    /**    /**
# Line 73  class DataBlocks2D { Line 77  class DataBlocks2D {
77    
78       All parameters must be >0, else an exception will be thrown.       All parameters must be >0, else an exception will be thrown.
79    */    */
80      ESCRIPT_DLL_API
81    DataBlocks2D(int numRows, int numCols, int blockSize);    DataBlocks2D(int numRows, int numCols, int blockSize);
82    
83    /**    /**
# Line 82  class DataBlocks2D { Line 87  class DataBlocks2D {
87       Description:       Description:
88       Default destructor for DataBlocks2D.       Default destructor for DataBlocks2D.
89    */    */
90      ESCRIPT_DLL_API
91    ~DataBlocks2D();    ~DataBlocks2D();
92    
93    /**    /**
# Line 89  class DataBlocks2D { Line 95  class DataBlocks2D {
95       Return the size of the underlying data array.       Return the size of the underlying data array.
96       ie: Number of rows * Number of columns * Number of elements per data point.       ie: Number of rows * Number of columns * Number of elements per data point.
97    */    */
98      ESCRIPT_DLL_API
99    inline    inline
100    ValueType::size_type    ValueType::size_type
101    size() const;    size() const;
# Line 97  class DataBlocks2D { Line 104  class DataBlocks2D {
104       \brief       \brief
105       Return the number of rows in this DataBlocks2D array.       Return the number of rows in this DataBlocks2D array.
106    */    */
107      ESCRIPT_DLL_API
108    inline    inline
109    ValueType::size_type    ValueType::size_type
110    getNumRows() const;    getNumRows() const;
# Line 105  class DataBlocks2D { Line 113  class DataBlocks2D {
113       \brief       \brief
114       Return the number of columns in this DataBlocks2D array.       Return the number of columns in this DataBlocks2D array.
115    */    */
116      ESCRIPT_DLL_API
117    inline    inline
118    ValueType::size_type    ValueType::size_type
119    getNumCols() const;    getNumCols() const;
# Line 113  class DataBlocks2D { Line 122  class DataBlocks2D {
122       \brief       \brief
123       Return the data point size for this DataBlocks2D array.       Return the data point size for this DataBlocks2D array.
124    */    */
125      ESCRIPT_DLL_API
126    inline    inline
127    ValueType::size_type    ValueType::size_type
128    getBlockSize() const;    getBlockSize() const;
# Line 128  class DataBlocks2D { Line 138  class DataBlocks2D {
138    
139       All parameters must be >0, else an exception will be thrown.       All parameters must be >0, else an exception will be thrown.
140    */    */
141      ESCRIPT_DLL_API
142    void    void
143    resize(int numRows, int numCols, int blockSize);    resize(int numRows, int numCols, int blockSize);
144    
# Line 136  class DataBlocks2D { Line 147  class DataBlocks2D {
147       DataBlocks2D assignment operator =       DataBlocks2D assignment operator =
148       Assign the given DataBlocks2D object to this one.       Assign the given DataBlocks2D object to this one.
149    */    */
150      ESCRIPT_DLL_API
151    DataBlocks2D&    DataBlocks2D&
152    operator=(const DataBlocks2D& other);    operator=(const DataBlocks2D& other);
153    
# Line 143  class DataBlocks2D { Line 155  class DataBlocks2D {
155       \brief       \brief
156       Swap all the values managed by the given DataBlocks2D objects.       Swap all the values managed by the given DataBlocks2D objects.
157    */    */
158      ESCRIPT_DLL_API
159    void    void
160    Swap(DataBlocks2D& other);    Swap(DataBlocks2D& other);
161    
# Line 154  class DataBlocks2D { Line 167  class DataBlocks2D {
167      Subsequent elements of this data point can be accessed by manually      Subsequent elements of this data point can be accessed by manually
168      incrementing the returned index value.      incrementing the returned index value.
169    */    */
170      ESCRIPT_DLL_API
171    inline    inline
172    ValueType::size_type    ValueType::size_type
173    index(int row, int col) const;    index(int row, int col) const;
# Line 163  class DataBlocks2D { Line 177  class DataBlocks2D {
177      Return a reference to the first element for the data-point with index i      Return a reference to the first element for the data-point with index i
178      within the underlying data array as determined by the index(i,j) method.      within the underlying data array as determined by the index(i,j) method.
179    */    */
180      ESCRIPT_DLL_API
181    inline    inline
182    ValueType::reference    ValueType::reference
183    operator[](ValueType::size_type i);    operator[](ValueType::size_type i);
184    
185      ESCRIPT_DLL_API
186    inline    inline
187    ValueType::const_reference    ValueType::const_reference
188    operator[](ValueType::size_type i) const;    operator[](ValueType::size_type i) const;
# Line 175  class DataBlocks2D { Line 191  class DataBlocks2D {
191      \brief      \brief
192      Return a reference to the first element for the data-point (i,j).      Return a reference to the first element for the data-point (i,j).
193    */    */
194      ESCRIPT_DLL_API
195    inline    inline
196    ValueType::reference    ValueType::reference
197    operator()(int row, int col);    operator()(int row, int col);
198    
199      ESCRIPT_DLL_API
200    inline    inline
201    ValueType::const_reference    ValueType::const_reference
202    operator()(int row, int col) const;    operator()(int row, int col) const;
# Line 189  class DataBlocks2D { Line 207  class DataBlocks2D {
207       Data returned is an array type object that can be indexed via indexes generated       Data returned is an array type object that can be indexed via indexes generated
208       by DataBlocks2D::index.       by DataBlocks2D::index.
209    */    */
210      ESCRIPT_DLL_API
211    inline    inline
212    ValueType&    ValueType&
213    getData();    getData();
214    
215      ESCRIPT_DLL_API
216    inline    inline
217    const ValueType&    const ValueType&
218    getData() const;    getData() const;
# Line 205  class DataBlocks2D { Line 225  class DataBlocks2D {
225    
226      The return value indicates success (0) or otherwise (1).      The return value indicates success (0) or otherwise (1).
227    */    */
228      ESCRIPT_DLL_API
229    int    int
230    archiveData(std::ofstream& archiveFile,    archiveData(std::ofstream& archiveFile,
231                const ValueType::size_type noValues) const;                const ValueType::size_type noValues) const;
# Line 216  class DataBlocks2D { Line 237  class DataBlocks2D {
237    
238      The return value indicates success (0) or otherwise (1).      The return value indicates success (0) or otherwise (1).
239    */    */
240      ESCRIPT_DLL_API
241    int    int
242    extractData(std::ifstream& archiveFile,    extractData(std::ifstream& archiveFile,
243                const ValueType::size_type noValues);                const ValueType::size_type noValues);

Legend:
Removed from v.478  
changed lines
  Added in v.1312

  ViewVC Help
Powered by ViewVC 1.1.26