File kernel/src/modelingTools/SubPluggedObject.hpp

Go to the source code of this file

utilities for plugin definition to compute extract a column from a matrix computed by an user-defined function.

Typedefs

typedef void (*matrixPlugin)(double, unsigned int, unsigned int, double *, unsigned int, double *)
class SubPluggedObject : public PluggedObject

Public Functions

SubPluggedObject()

Default Constructor.

SubPluggedObject(const PluggedObject &PO, const unsigned int n, const unsigned int p, const unsigned int indx = 0)

Constructor with the plugin name.

Parameters
  • PO: a PluggedObject
  • n: the number of rows of the matrix
  • p: the number of column of the matrix
  • indx: the column index (optional)

SubPluggedObject(const SubPluggedObject &SPO)

Copy constructor.

Parameters

~SubPluggedObject()

destructor

void computeAndExtract(double time, unsigned int n, double *M, unsigned int sizez, double *z)

Intermediate function to compute the column of a plugged matrix.

Parameters
  • time: current time
  • n: the length of the vector
  • M: the vector used for storage
  • sizez: the size of z
  • z: a vector used as a parameter

unsigned int getIndex() const
unsigned int getp() const

Get the number of row.

Return
the number of row

void *getParentfPtr() const

Get the user defined plugin.

Return
the user defined plugin

const SiconosMatrix &getTmpMat() const

Get the user defined plugin.

Return
the user defined plugin

void setIndex(unsigned int newIndx)

Private Functions

ACCEPT_SERIALIZATION(SubPluggedObject)

serialization hooks

Private Members

unsigned int _indx

Column index.

unsigned int _p

Number of columns.

void *_parentfPtr

function pointer to the parent PluggedObject

SP::SiconosMatrix _tmpMat

Matrix to temporary storage of the output.