An Rcpp interface class that defines the RealVector class.
More...
#include <rcpp_interface_base.hpp>
|
|
| 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 | set_values (const Rcpp::NumericVector &orig) |
| |
| Rcpp::NumericVector | get_values () |
| |
| 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.
|
| |
|
RealVector | deep_copy () const |
| | Create a deep copy with a new RealVector ID.
|
| |
|
|
std::shared_ptr< std::vector< double > > | storage_m |
| | real storage.
|
| |
|
uint32_t | id_m |
| | The local ID of the RealVector object.
|
| |
|
|
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.
◆ RealVector() [1/2]
| RealVector::RealVector |
( |
Rcpp::NumericVector |
x, |
|
|
size_t |
size |
|
) |
| |
|
inline |
The constructor for initializing a real vector.
- Parameters
-
| x | A numeric vector. |
| size | The number of elements to copy over. |
◆ RealVector() [2/2]
The constructor for initializing a real vector.
- Parameters
-
◆ at()
| SEXP RealVector::at |
( |
R_xlen_t |
pos | ) |
|
|
inline |
The accessor where the first index starts at one. This function is for calling accessing from R.
- Parameters
-
◆ fill()
| void RealVector::fill |
( |
double |
value | ) |
|
|
inline |
Sets the value of all elements in the RealVector to the provided value.
- Parameters
-
| value | A double specifying the value to set all elements to within the RealVector. |
◆ get()
| double & RealVector::get |
( |
size_t |
pos | ) |
|
|
inline |
An internal accessor for calling a position of a RealVector from R.
- Parameters
-
| 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. |
◆ get_values()
| Rcpp::NumericVector RealVector::get_values |
( |
| ) |
|
|
inline |
- Returns
- Rcpp::NumericVector
◆ operator=()
| RealVector & RealVector::operator= |
( |
const Rcpp::NumericVector & |
v | ) |
|
|
inline |
◆ operator[]()
| double & RealVector::operator[] |
( |
size_t |
pos | ) |
|
|
inline |
The accessor where the first index starts is zero.
- Parameters
-
| pos | The position of the RealVector that you want returned. |
◆ resize()
| void RealVector::resize |
( |
size_t |
size | ) |
|
|
inline |
Resizes a RealVector to the desired length.
- Parameters
-
| size | An integer specifying the desired length for the RealVector to be resized to. |
◆ set()
| void RealVector::set |
( |
size_t |
pos, |
|
|
const double & |
p |
|
) |
| |
|
inline |
An internal setter for setting a position of a RealVector from R.
- Parameters
-
| 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. |
◆ set_values()
| void RealVector::set_values |
( |
const Rcpp::NumericVector & |
orig | ) |
|
|
inline |
The documentation for this class was generated from the following files: