OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
Loading...
Searching...
No Matches
ATable.h
Go to the documentation of this file.
1#ifndef OPAL_ATable_HH
2#define OPAL_ATable_HH
3
4// ------------------------------------------------------------------------
5// $RCSfile: ATable.h,v $
6// ------------------------------------------------------------------------
7// $Revision: 1.1.1.1 $
8// ------------------------------------------------------------------------
9// Copyright: see Copyright.readme
10// ------------------------------------------------------------------------
11//
12// Class: ATable
13//
14// ------------------------------------------------------------------------
15//
16// $Date: 2000/03/27 09:33:42 $
17// $Author: Andreas Adelmann $
18//
19// ------------------------------------------------------------------------
20
21#include <iosfwd>
22#include <vector>
24
25namespace Expressions {
26
27 // Class ATable.
28 // ----------------------------------------------------------------------
30 // This expression uses one or more AHash objects to represent
31 // the current index in the TABLE expression. These may retrieve
32 // the index from the ATable object by calling getHash().
33 // The result is computed by setting ``#'' to each index value in
34 // turn, evaluating the scalar expression for this value, and storing
35 // it in the proper place.
36
37 class ATable : public OArray<double> {
38 public:
40 // Use the three index arguments from the TABLE() function.
41 // The expression is assigned later by [tt]defineExpression()[/tt].
42 ATable(int n1, int n2, int n3);
43
44 ATable(const ATable&);
45 ~ATable();
46
48 virtual OArray<double>* clone() const;
49
51 // A representation of the expression read in the TABLE() function.
53
55 virtual std::vector<double> evaluate() const;
56
58 double getHash() const;
59
61 virtual void print(std::ostream& os, int precedence = 99) const;
62
63 private:
64 // Not implemented.
66 const ATable& operator=(const ATable&);
67
68 // Column name.
70
71 // The range specification.
73
74 // The current value of '#'.
75 mutable int itsHash;
76 };
77
78} // namespace Expressions
79
80#endif // OPAL_ATable_HH
An array expression generated from a TABLE() function.
Definition ATable.h:37
virtual OArray< double > * clone() const
Make clone.
Definition ATable.cpp:40
const ATable & operator=(const ATable &)
void defineExpression(PtrToScalar< double >)
Store the generating expression.
Definition ATable.cpp:42
virtual std::vector< double > evaluate() const
Evaluate.
Definition ATable.cpp:44
virtual void print(std::ostream &os, int precedence=99) const
Print expression.
Definition ATable.cpp:56
PtrToScalar< double > itsExpr
Definition ATable.h:69
double getHash() const
Return the current value of '#'.
Definition ATable.cpp:54
A pointer to a scalar expression.
Representation objects and parsers for attribute expressions.