FIMS  v0.8.0
Loading...
Searching...
No Matches
ParameterVector Class Reference

An Rcpp interface class that defines the ParameterVector class. More...

#include <rcpp_interface_base.hpp>

Public Member Functions

 ParameterVector ()
 The constructor.
 
 ParameterVector (const ParameterVector &other)
 The constructor.
 
 ParameterVector (size_t size)
 The constructor.
 
 ParameterVector (Rcpp::NumericVector x, size_t size)
 The constructor for initializing a parameter vector.
 
 ParameterVector (const fims::Vector< double > &v)
 The constructor for initializing a parameter vector.
 
virtual ~ParameterVector ()
 Destroy the Parameter Vector object.
 
virtual uint32_t get_id ()
 Gets the ID of the ParameterVector object.
 
Parameteroperator[] (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.
 
Parameterget (size_t pos)
 An internal accessor for calling a position of a ParameterVector from R.
 
void set (size_t pos, const Parameter &p)
 An internal setter for setting a position of a ParameterVector from R.
 
size_t size ()
 Returns the size of a ParameterVector.
 
void resize (size_t size)
 Resizes a ParameterVector to the desired length.
 
void set_all_estimable (bool estimable)
 Sets all Parameters within a ParameterVector as estimable.
 
void set_all_random (bool random)
 Sets all Parameters within a ParameterVector as random effects.
 
void fill (double value)
 Sets the value of all Parameters in the ParameterVector to the provided value.
 
void fill_min (double value)
 Assigns the given values to the minimum value of all elements in the vector.
 
void fill_max (double value)
 Assigns the given values to the maximum value of all elements in the vector.
 
void show ()
 The printing methods for a ParameterVector.
 

Public Attributes

std::shared_ptr< std::vector< Parameter > > storage_m
 Parameter storage.
 
uint32_t id_m
 The local ID of the Parameter object.
 

Static Public Attributes

static uint32_t id_g = 0
 The static ID of the Parameter object.
 

Detailed Description

An Rcpp interface class that defines the ParameterVector class.

An Rcpp interface class that defines the interface between R and C++ for a parameter vector type.

Constructor & Destructor Documentation

◆ ParameterVector() [1/2]

ParameterVector::ParameterVector ( Rcpp::NumericVector  x,
size_t  size 
)
inline

The constructor for initializing a parameter vector.

Parameters
xA numeric vector.
sizeThe number of elements to copy over.

◆ ParameterVector() [2/2]

ParameterVector::ParameterVector ( const fims::Vector< double > &  v)
inline

The constructor for initializing a parameter vector.

Parameters
vA vector of doubles.

Member Function Documentation

◆ at()

SEXP ParameterVector::at ( R_xlen_t  pos)
inline

The accessor where the first index starts at one. This function is for calling accessing from R.

Parameters
posThe position of the ParameterVector that you want returned.

◆ fill()

void ParameterVector::fill ( double  value)
inline

Sets the value of all Parameters in the ParameterVector to the provided value.

Parameters
valueA double specifying the value to set all Parameters to within the ParameterVector.

◆ fill_max()

void ParameterVector::fill_max ( double  value)
inline

Assigns the given values to the maximum value of all elements in the vector.

Parameters
valueThe value to be assigned.

◆ fill_min()

void ParameterVector::fill_min ( double  value)
inline

Assigns the given values to the minimum value of all elements in the vector.

Parameters
valueThe value to be assigned.

◆ get()

Parameter & ParameterVector::get ( size_t  pos)
inline

An internal accessor for calling a position of a ParameterVector from R.

Parameters
posAn integer specifying the position of the ParameterVector you want returned. The first position is one and the last position is the same as the size of the ParameterVector.

◆ operator[]()

Parameter & ParameterVector::operator[] ( size_t  pos)
inline

The accessor where the first index starts is zero.

Parameters
posThe position of the ParameterVector that you want returned.

◆ resize()

void ParameterVector::resize ( size_t  size)
inline

Resizes a ParameterVector to the desired length.

Parameters
sizeAn integer specifying the desired length for the ParameterVector to be resized to.

◆ set()

void ParameterVector::set ( size_t  pos,
const Parameter p 
)
inline

An internal setter for setting a position of a ParameterVector from R.

Parameters
posAn integer specifying the position of the ParameterVector you want to set. The first position is one and the last position is the same as the size of the ParameterVector.
pA numeric value specifying the value to set position pos to in the ParameterVector.

◆ set_all_estimable()

void ParameterVector::set_all_estimable ( bool  estimable)
inline

Sets all Parameters within a ParameterVector as estimable.

Parameters
estimableA boolean specifying if all Parameters within the ParameterVector should be estimated within the model. A value of true leads to all Parameters being estimated.

◆ set_all_random()

void ParameterVector::set_all_random ( bool  random)
inline

Sets all Parameters within a ParameterVector as random effects.

Parameters
randomA boolean specifying if all Parameters within the ParameterVector should be designated as random effects. A value of true leads to all Parameters being random effects.

The documentation for this class was generated from the following file: