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

inline SubPluggedObject()

Default Constructor.

inline 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)

inline SubPluggedObject(const SubPluggedObject &SPO)

Copy constructor.

Parameters:

SPO – a PluggedObject we are going to copy

inline ~SubPluggedObject()

destructor

inline 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

inline void setIndex(unsigned int newIndx)#
inline unsigned int getIndex() const#
inline unsigned int getp() const

Get the number of row.

Returns:

the number of row

inline void *getParentfPtr() const

Get the user defined plugin.

Returns:

the user defined plugin

inline const SiconosMatrix &getTmpMat() const

Get the user defined plugin.

Returns:

the user defined plugin

Private Functions

ACCEPT_SERIALIZATION(SubPluggedObject)#

Private Members

void *_parentfPtr#

function pointer to the parent PluggedObject

SP::SiconosMatrix _tmpMat#

Matrix to temporary storage of the output.

unsigned int _indx#

Column index.

unsigned int _p#

Number of columns.