Go to the documentation of this file.
38 D(d),I1(i1),I2(i2),I3(i3),I4(i4),I5(i5),C(0),stochastic(s) {}
80 for (
int i=0; i<
size(); i++) {
93 S1(s1),S2(s2),S3(s3),S4(s4),S5(s5),
94 v(new double[
size()]), manageData(true)
109 S1(s1),S2(s2),S3(s3),S4(s4),S5(s5),
110 v(
value), manageData(false)
115 if (manageData ==
true)
delete[] v;
125 for (
int i=0; i<
size(); i++) {
139 double&
operator()(
int lcli1,
int lcli2=0,
int lcli3=0,
int lcli4=0,
int lcli5=0) {
140 lcli1 = S1.
check(lcli1);
141 lcli2 = S2.
check(lcli2);
142 lcli3 = S3.
check(lcli3);
143 lcli4 = S4.
check(lcli4);
144 lcli5 = S5.
check(lcli5);
145 int i =
f(lcli1,lcli2,lcli3,lcli4,lcli5);
148 return outOfBoundData;
165 myrefs.push_back(
new DataRef(
this, lcli1, lcli2, lcli3, lcli4, lcli5));
178 static double outOfBoundData;
195 using flopc::MP_data::operator();
203 myrefs.push_back(
new DataRef(
this, lcli1, lcli2, lcli3, lcli4, lcli5, 1));
Internal representation of a "set".
Utility class to flatten multidimensional information into single dimentional offset information.
Reference counted class for all "constant" types of data.
const int outOfBound
Distinct return value on conditions where an index goes out of bounds.
const DataRef & operator=(const DataRef &r)
void display(std::string s="")
For displaying data in a human readable format.
Symantic representation of a variable.
Reference to a set of data.
void evaluate_lhs(double v) const
MP_data(double *value, const MP_set_base &s1=MP_set::getEmpty(), const MP_set_base &s2=MP_set::getEmpty(), const MP_set_base &s3=MP_set::getEmpty(), const MP_set_base &s4=MP_set::getEmpty(), const MP_set_base &s5=MP_set::getEmpty())
Construct the object, and uses the data in the original array (shallow copy)
Reference counted class for all "boolean" types of data.
static MP_set & getEmpty()
gets the distinct 'empty' MP_set.
DataRef & such_that(const MP_boolean &b)
double & operator()(int lcli1, int lcli2=0, int lcli3=0, int lcli4=0, int lcli5=0)
Looks up the data based on the index values passed in.
DataRef(MP_data *d, const MP_index_exp &i1, const MP_index_exp &i2, const MP_index_exp &i3, const MP_index_exp &i4, const MP_index_exp &i5, int s=0)
const DataRef & operator=(const Constant &c)
std::vector< DataRef * > myrefs
MP_stochastic_data(const MP_set_base &s1=MP_set::getEmpty(), const MP_set_base &s2=MP_set::getEmpty(), const MP_set_base &s3=MP_set::getEmpty(), const MP_set_base &s4=MP_set::getEmpty(), const MP_set_base &s5=MP_set::getEmpty())
void value(const double *d)
Used to bind and deep copy data into the MP_data data structure.
All flopc++ code is contained within the flopc namespace.
static const MP_index_exp & getEmpty()
Return the unique empty expression.
Utility interface class for adding a string name onto a structure.
void initialize(double d)
similar to value() but copies the same value to all entries.
int f(int i1=0, int i2=0, int i3=0, int i4=0, int i5=0) const
Representation of an expression involving an index.
Representation of an index.
This is the anchor point for all constructs in a FlopC++ model.
Base class for all "constant" types of data.
MP_data(const MP_set_base &s1=MP_set::getEmpty(), const MP_set_base &s2=MP_set::getEmpty(), const MP_set_base &s3=MP_set::getEmpty(), const MP_set_base &s4=MP_set::getEmpty(), const MP_set_base &s5=MP_set::getEmpty())
Constructs the MP_data object, and allocates space for data, but does not initialize the data.