![]() |
FIMS
v0.8.1
|
An Rcpp interface class that defines the RealVector class. More...
#include <rcpp_interface_base.hpp>
Public Member Functions | |
| RealVector () | |
| The constructor. | |
| RealVector (const RealVector &other) | |
| The constructor. | |
| RealVector (size_t size) | |
| The constructor. | |
| RealVector (Rcpp::NumericVector x, size_t size) | |
| The constructor for initializing a real vector. | |
| RealVector (const fims::Vector< double > &v) | |
| The constructor for initializing a real vector. | |
| virtual | ~RealVector () |
| Destroy the real Vector object. | |
| RealVector & | operator= (const Rcpp::NumericVector &v) |
| virtual uint32_t | get_id () |
| Gets the ID of the RealVector object. | |
| void | fromRVector (const Rcpp::NumericVector &orig) |
| Rcpp::NumericVector | toRVector () |
| double & | operator[] (size_t pos) |
| The accessor where the first index starts is zero. | |
| SEXP | at (R_xlen_t pos) |
| The accessor where the first index starts at one. This function is for calling accessing from R. | |
| double & | get (size_t pos) |
| An internal accessor for calling a position of a RealVector from R. | |
| void | set (size_t pos, const double &p) |
| An internal setter for setting a position of a RealVector from R. | |
| size_t | size () |
| Returns the size of a RealVector. | |
| void | resize (size_t size) |
| Resizes a RealVector to the desired length. | |
| void | fill (double value) |
| Sets the value of all elements in the RealVector to the provided value. | |
| void | show () |
| The printing methods for a RealVector. | |
Public Attributes | |
| std::shared_ptr< std::vector< double > > | storage_m |
| real storage. | |
| uint32_t | id_m |
| The local ID of the RealVector object. | |
Static Public Attributes | |
| static uint32_t | id_g = 0 |
| The static ID of the RealVector object. | |
An Rcpp interface class that defines the RealVector class.
An Rcpp interface class that defines the interface between R and C++ for a real vector type. Underlying values are held in a shared pointer and are carried over to any copies of this vector.
|
inline |
The constructor for initializing a real vector.
| x | A numeric vector. |
| size | The number of elements to copy over. |
|
inline |
The constructor for initializing a real vector.
| v | A vector of doubles. |
The accessor where the first index starts at one. This function is for calling accessing from R.
| pos | The position of the ParameterVector that you want returned. |
Sets the value of all elements in the RealVector to the provided value.
| value | A double specifying the value to set all elements to within the RealVector. |
An internal accessor for calling a position of a RealVector from R.
| pos | An integer specifying the position of the RealVector you want returned. The first position is one and the last position is the same as the size of the RealVector. |
|
inline |
| v |
The accessor where the first index starts is zero.
| pos | The position of the RealVector that you want returned. |
Resizes a RealVector to the desired length.
| size | An integer specifying the desired length for the RealVector to be resized to. |
An internal setter for setting a position of a RealVector from R.
| pos | An integer specifying the position of the RealVector you want to set. The first position is one and the last position is the same as the size of the RealVector. |
| p | A numeric value specifying the value to set position pos to in the RealVector. |
|
inline |