28 class DataOp:
public ItemT<DataOp, Operation<minsky::OperationType::data>>,
34 void draw(cairo_t* cairo)
const override {
46 std::map<double, double>
data;
47 void readData(
const std::string& fileName);
49 void initRandom(
double xmin,
double xmax,
unsigned numSamples);
55 double deriv(
double)
const;
58 void pack(classdesc::pack_t&
x,
const std::string& d)
const override;
59 void unpack(classdesc::unpack_t&
x,
const std::string& d)
override;
void draw(cairo_t *) const override
draw this item into a cairo context
void readData(const std::string &fileName)
void drawUserFunction(cairo_t *cairo) const
double interpolate(double) const
interpolates y data between x values bounding the argument
base class for operations that have names
BoundingBox bb
canvas bounding box.
void update(const Item &x)
Creation and access to the minskyTCL_obj object, which has code to record whenever Minsky's state cha...
void pack(classdesc::pack_t &x, const std::string &d) const override
void initRandom(double xmin, double xmax, unsigned numSamples)
initialise with uniform random numbers
represents the units (in sense of dimensional analysis) of a variable.
virtual std::string description() const
name of the associated data operation
void unpack(classdesc::unpack_t &x, const std::string &d) override
const DataOp & operator=(const DataOp &x)
std::map< double, double > data
Units units(bool check) const override
compute the dimensional units
void draw(cairo_t *cairo) const override
draw this item into a cairo context
legacy data importer object
double deriv(double) const
derivative of the interpolate function. At the data points, the derivative is defined as the weighted...