/[escript]/branches/intelc_win32/escript/src/DataTagged.h
ViewVC logotype

Diff of /branches/intelc_win32/escript/src/DataTagged.h

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

trunk/escript/src/DataTagged.h revision 734 by elspeth, Wed Mar 22 02:12:00 2006 UTC branches/intelc_win32/escript/src/DataTagged.h revision 742 by woo409, Sat Jun 24 11:27:16 2006 UTC
# Line 14  Line 14 
14    
15  #if !defined escript_DataTagged_20040615_H  #if !defined escript_DataTagged_20040615_H
16  #define escript_DataTagged_20040615_H  #define escript_DataTagged_20040615_H
17    #include "system_dep.h"
18    
19  #include "DataAbstract.h"  #include "DataAbstract.h"
20  #include "DataArrayView.h"  #include "DataArrayView.h"
# Line 60  class DataTagged : public DataAbstract { Line 61  class DataTagged : public DataAbstract {
61       tag values are stored.       tag values are stored.
62      T      T
63    */    */
64      ESCRIPT_DLL_API
65    DataTagged();    DataTagged();
66    
67    /**    /**
# Line 80  class DataTagged : public DataAbstract { Line 82  class DataTagged : public DataAbstract {
82       \param what - Input - A description of what this data represents.       \param what - Input - A description of what this data represents.
83      T      T
84    */    */
85      ESCRIPT_DLL_API
86    DataTagged(const TagListType& tagKeys,    DataTagged(const TagListType& tagKeys,
87               const ValueListType& values,               const ValueListType& values,
88           const DataArrayView& defaultValue,           const DataArrayView& defaultValue,
# Line 97  class DataTagged : public DataAbstract { Line 100  class DataTagged : public DataAbstract {
100       \param data - The data values for each tag.       \param data - The data values for each tag.
101      NB: no unit testing yet      NB: no unit testing yet
102    */    */
103      ESCRIPT_DLL_API
104    DataTagged(const FunctionSpace& what,    DataTagged(const FunctionSpace& what,
105               const DataArrayView::ShapeType &shape,               const DataArrayView::ShapeType &shape,
106               const int tags[],               const int tags[],
# Line 104  class DataTagged : public DataAbstract { Line 108  class DataTagged : public DataAbstract {
108    
109    /**    /**
110       \brief       \brief
111         Alternative Constructor for DataTagged.
112    
113         Description:
114         Alternative Constructor for DataTagged.
115         \param what - Input - A description of what this data object represents.
116         \param shape - Input - The shape of each data-point.
117         \param tags - Input - An vector of tags, one for each sample number.
118         \param data - The data values for each tag.
119        NB: no unit testing yet
120      */
121      ESCRIPT_DLL_API
122      DataTagged(const FunctionSpace& what,
123                 const DataArrayView::ShapeType &shape,
124                 const TagListType& tags,
125                 const ValueType& data);
126    
127      /**
128         \brief
129       Copy Constructor for DataTagged.       Copy Constructor for DataTagged.
130       Performs a deep copy from the given DataTagged object.       Performs a deep copy from the given DataTagged object.
131      T      T
132    */    */
133      ESCRIPT_DLL_API
134    DataTagged(const DataTagged& other);    DataTagged(const DataTagged& other);
135    
136    /**    /**
# Line 117  class DataTagged : public DataAbstract { Line 140  class DataTagged : public DataAbstract {
140       The default value will be the value of the DataConstant object.       The default value will be the value of the DataConstant object.
141      T      T
142    */    */
143      ESCRIPT_DLL_API
144    DataTagged(const DataConstant& other);    DataTagged(const DataConstant& other);
145    
146    /**    /**
# Line 131  class DataTagged : public DataAbstract { Line 155  class DataTagged : public DataAbstract {
155       ** NB: need to do array bounds checking when accessing returned value!       ** NB: need to do array bounds checking when accessing returned value!
156      T      T
157    */    */
158      ESCRIPT_DLL_API
159    virtual    virtual
160    double*    double*
161    getSampleDataByTag(int tag);    getSampleDataByTag(int tag);
# Line 142  class DataTagged : public DataAbstract { Line 167  class DataTagged : public DataAbstract {
167       associated with each tag.       associated with each tag.
168      T      T
169    */    */
170      ESCRIPT_DLL_API
171    virtual    virtual
172    std::string    std::string
173    toString() const;    toString() const;
# Line 152  class DataTagged : public DataAbstract { Line 178  class DataTagged : public DataAbstract {
178       according to the associated function space.       according to the associated function space.
179      T      T
180    */    */
181      ESCRIPT_DLL_API
182    virtual    virtual
183    int    int
184    getTagNumber(int dpno);    getTagNumber(int dpno);
# Line 168  class DataTagged : public DataAbstract { Line 195  class DataTagged : public DataAbstract {
195       \param dataPointNo - Input - data-point number.       \param dataPointNo - Input - data-point number.
196      T      T
197    */    */
198      ESCRIPT_DLL_API
199    virtual    virtual
200    ValueType::size_type    ValueType::size_type
201    getPointOffset(int sampleNo,    getPointOffset(int sampleNo,
# Line 189  class DataTagged : public DataAbstract { Line 217  class DataTagged : public DataAbstract {
217               will be generated.               will be generated.
218      T      T
219    */    */
220      ESCRIPT_DLL_API
221    void    void
222    addTaggedValues(const TagListType& tagKeys,    addTaggedValues(const TagListType& tagKeys,
223                    const ValueListType& values);                      const ValueListType& values);  
# Line 204  class DataTagged : public DataAbstract { Line 233  class DataTagged : public DataAbstract {
233       \param value - Input - Single DataArrayView value to be assigned to the tag.       \param value - Input - Single DataArrayView value to be assigned to the tag.
234      T      T
235    */    */
236      ESCRIPT_DLL_API
237    void    void
238    addTaggedValue(int tagKey,    addTaggedValue(int tagKey,
239                   const DataArrayView& value);                   const DataArrayView& value);
# Line 224  class DataTagged : public DataAbstract { Line 254  class DataTagged : public DataAbstract {
254               will be generated.               will be generated.
255      T      T
256    */    */
257      ESCRIPT_DLL_API
258    void    void
259    setTaggedValues(const TagListType& tagKeys,    setTaggedValues(const TagListType& tagKeys,
260                    const ValueListType& values);                    const ValueListType& values);
# Line 238  class DataTagged : public DataAbstract { Line 269  class DataTagged : public DataAbstract {
269       \param value - Input - Single DataArrayView value to be assigned to the tag.       \param value - Input - Single DataArrayView value to be assigned to the tag.
270      T      T
271    */    */
272      ESCRIPT_DLL_API
273    virtual    virtual
274    void    void
275    setTaggedValue(int tagKey,    setTaggedValue(int tagKey,
# Line 252  class DataTagged : public DataAbstract { Line 284  class DataTagged : public DataAbstract {
284       \param tag - Input - Integer key.       \param tag - Input - Integer key.
285      T      T
286    */    */
287      ESCRIPT_DLL_API
288    DataArrayView    DataArrayView
289    getDataPointByTag(int tag) const;    getDataPointByTag(int tag) const;
290    
# Line 266  class DataTagged : public DataAbstract { Line 299  class DataTagged : public DataAbstract {
299       \param dataPointNo - Input.       \param dataPointNo - Input.
300      T      T
301    */    */
302      ESCRIPT_DLL_API
303    virtual    virtual
304    DataArrayView    DataArrayView
305    getDataPoint(int sampleNo,    getDataPoint(int sampleNo,
# Line 279  class DataTagged : public DataAbstract { Line 313  class DataTagged : public DataAbstract {
313       Return a reference to the tag offset lookup table.       Return a reference to the tag offset lookup table.
314      T      T
315    */    */
316      ESCRIPT_DLL_API
317    const DataMapType&    const DataMapType&
318    getTagLookup() const;    getTagLookup() const;
319    
# Line 293  class DataTagged : public DataAbstract { Line 328  class DataTagged : public DataAbstract {
328       keys in the associated function space.       keys in the associated function space.
329      T      T
330    */    */
331      ESCRIPT_DLL_API
332    bool    bool
333    isCurrentTag(int tag) const;    isCurrentTag(int tag) const;
334    
# Line 305  class DataTagged : public DataAbstract { Line 341  class DataTagged : public DataAbstract {
341       is not explicitly recorded in this DataTagged object's tag map.       is not explicitly recorded in this DataTagged object's tag map.
342      T      T
343    */    */
344      ESCRIPT_DLL_API
345    DataArrayView&    DataArrayView&
346    getDefaultValue();    getDefaultValue();
347    
348      ESCRIPT_DLL_API
349    const DataArrayView&    const DataArrayView&
350    getDefaultValue() const;    getDefaultValue() const;
351    
# Line 319  class DataTagged : public DataAbstract { Line 357  class DataTagged : public DataAbstract {
357       Return the total number of doubles stored for this DataTagged object.       Return the total number of doubles stored for this DataTagged object.
358      T      T
359    */    */
360      ESCRIPT_DLL_API
361    virtual    virtual
362    ValueType::size_type    ValueType::size_type
363    getLength() const;    getLength() const;
# Line 333  class DataTagged : public DataAbstract { Line 372  class DataTagged : public DataAbstract {
372       The caller is reponsible for managing the returned object.       The caller is reponsible for managing the returned object.
373      T      T
374    */    */
375      ESCRIPT_DLL_API
376    virtual    virtual
377    DataAbstract*    DataAbstract*
378    getSlice(const DataArrayView::RegionType& region) const;    getSlice(const DataArrayView::RegionType& region) const;
# Line 348  class DataTagged : public DataAbstract { Line 388  class DataTagged : public DataAbstract {
388       \param region - Input - Region to slice.       \param region - Input - Region to slice.
389      T      T
390    */    */
391      ESCRIPT_DLL_API
392    DataTagged(const DataTagged& other,    DataTagged(const DataTagged& other,
393           const DataArrayView::RegionType& region);           const DataArrayView::RegionType& region);
394    
# Line 361  class DataTagged : public DataAbstract { Line 402  class DataTagged : public DataAbstract {
402       \param region - Input - Region to copy into (NB: must have same shape as other!).       \param region - Input - Region to copy into (NB: must have same shape as other!).
403      T      T
404    */    */
405      ESCRIPT_DLL_API
406    virtual    virtual
407    void    void
408    setSlice(const DataAbstract* other,    setSlice(const DataAbstract* other,
# Line 378  class DataTagged : public DataAbstract { Line 420  class DataTagged : public DataAbstract {
420       of the new data-points.       of the new data-points.
421      T      T
422    */    */
423      ESCRIPT_DLL_API
424    void    void
425    reshapeDataPoint(const DataArrayView::ShapeType& shape);    reshapeDataPoint(const DataArrayView::ShapeType& shape);
426    
# Line 389  class DataTagged : public DataAbstract { Line 432  class DataTagged : public DataAbstract {
432    
433       The return value indicates success (0) or otherwise (1).       The return value indicates success (0) or otherwise (1).
434    */    */
435      ESCRIPT_DLL_API
436    int    int
437    archiveData(std::ofstream& archiveFile,    archiveData(std::ofstream& archiveFile,
438                const DataArrayView::ValueType::size_type noValues) const;                const DataArrayView::ValueType::size_type noValues) const;
# Line 400  class DataTagged : public DataAbstract { Line 444  class DataTagged : public DataAbstract {
444    
445       The return value indicates success (0) or otherwise (1).       The return value indicates success (0) or otherwise (1).
446    */    */
447      ESCRIPT_DLL_API
448    int    int
449    extractData(std::ifstream& archiveFile,    extractData(std::ifstream& archiveFile,
450                const DataArrayView::ValueType::size_type noValues);                const DataArrayView::ValueType::size_type noValues);
# Line 411  class DataTagged : public DataAbstract { Line 456  class DataTagged : public DataAbstract {
456       \param ev - Output - eigenvalues in increasing order at each data point       \param ev - Output - eigenvalues in increasing order at each data point
457    
458    */    */
459      ESCRIPT_DLL_API
460    virtual void    virtual void
461    eigenvalues(DataAbstract* ev);    eigenvalues(DataAbstract* ev);
462    
# Line 425  class DataTagged : public DataAbstract { Line 471  class DataTagged : public DataAbstract {
471    
472    */    */
473    
474      ESCRIPT_DLL_API
475    virtual void    virtual void
476    eigenvalues_and_eigenvectors(DataAbstract* ev,DataAbstract* V,const double tol=1.e-13);    eigenvalues_and_eigenvectors(DataAbstract* ev,DataAbstract* V,const double tol=1.e-13);
477    

Legend:
Removed from v.734  
changed lines
  Added in v.742

  ViewVC Help
Powered by ViewVC 1.1.26