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

Contents of /trunk/escript/src/DataVariable.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 615 - (show annotations)
Wed Mar 22 02:12:00 2006 UTC (15 years, 7 months ago) by elspeth
File MIME type: text/plain
File size: 2864 byte(s)
More copyright information.

1 /*
2 ************************************************************
3 * Copyright 2006 by ACcESS MNRF *
4 * *
5 * http://www.access.edu.au *
6 * Primary Business: Queensland, Australia *
7 * Licensed under the Open Software License version 3.0 *
8 * http://www.opensource.org/licenses/osl-3.0.php *
9 * *
10 ************************************************************
11 */
12
13 #if !defined escript_DataVariable_20050422_H
14 #define escript_DataVariable_20050422_H
15
16 #include "Data.h"
17
18 namespace escript {
19
20 /**
21 \brief
22 Give a short description of what DataVariable does.
23
24 Description:
25 Give a detailed description of DataVariable
26
27 Template Parameters:
28 For templates describe any conditions that the parameters used in the
29 template must satisfy
30 */
31
32 class DataVariable {
33
34 public:
35
36 enum OpCode {nullop, idop, sumop, diffop};
37
38 /**
39 \brief
40 Default constructor for DataVariable
41
42 Description:
43 Default constructor for DataVariable
44
45 Preconditions:
46 Describe any preconditions
47
48 Throws:
49 Describe any exceptions thrown
50 */
51 DataVariable();
52
53 /**
54 \brief
55 Constructor for DataVariable
56
57 Description:
58 Constructor for DataVariable
59
60 Preconditions:
61 Describe any preconditions
62
63 Throws:
64 Describe any exceptions thrown
65 */
66 DataVariable(Data* data);
67
68 /**
69 \brief
70 Destructor for DataVariable
71
72 Description:
73 Destructor for DataVariable
74
75 Preconditions:
76 Describe any preconditions
77
78 Throws:
79 Describe any exceptions thrown
80 */
81 ~DataVariable();
82
83 /**
84 \brief
85 Evaluator for DataVariable
86
87 Description:
88 Evaluator for DataVariable
89
90 Preconditions:
91 Describe any preconditions
92
93 Throws:
94 Describe any exceptions thrown
95 */
96 Data evaluate();
97
98 /**
99 \brief
100 Evaluator by sampleNo for DataVariable
101
102 Description:
103 Evaluator by sampleNo for DataVariable
104
105 Preconditions:
106 Describe any preconditions
107
108 Throws:
109 Describe any exceptions thrown
110 */
111 double* evaluate_samp(int sampleNo);
112
113 /**
114 \brief
115 Addor for DataVariable
116
117 Description:
118 Addor for DataVariable
119
120 Preconditions:
121 Describe any preconditions
122
123 Throws:
124 Describe any exceptions thrown
125 */
126 void sum(DataVariable* right);
127
128 /**
129 \brief
130 Diffor for DataVariable
131
132 Description:
133 Diffor for DataVariable
134
135 Preconditions:
136 Describe any preconditions
137
138 Throws:
139 Describe any exceptions thrown
140 */
141 void diff(DataVariable* right);
142
143 protected:
144
145 private:
146
147 OpCode op;
148
149 Data* leftArg;
150
151 DataVariable* rightArg;
152
153 double* opBuffer;
154
155 };
156
157 } // end of namespace
158
159 #endif

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.26