PPCKO: Principal Predictive Components for Estimating an Autoregressive Operator
 
Loading...
Searching...
No Matches
removing_nan_cleaner_imp.hpp File Reference

Implementation of dummy NaNs removal. More...

#include "removing_nan.hpp"
#include <RcppEigen.h>

Go to the source code of this file.

Functions

bool is_row_all_nan (const Rcpp::NumericMatrix::ConstRow &row, int tot_cols)
 Function checking if a row is entirely made by NaNs.
 
std::set< int > rows_entire_NaNs (const Rcpp::NumericMatrix &x)
 Identifying rows of only NaNs.
 
Rcpp::NumericMatrix removing_NaNS_entire_rows (const Rcpp::NumericMatrix &x, const std::set< int > &rows_to_be_kept)
 Removing rows of only NaNs.
 

Detailed Description

Implementation of dummy NaNs removal.

Author
Andrea Enrico Franzoni

Function Documentation

◆ is_row_all_nan()

bool is_row_all_nan ( const Rcpp::NumericMatrix::ConstRow & row,
int tot_cols )
inline

Function checking if a row is entirely made by NaNs.

Parameters
rowrow to be checked
tot_colstotal number of columns of the row
Returns
true if all NaNs in the row, false otherwise

◆ removing_NaNS_entire_rows()

Rcpp::NumericMatrix removing_NaNS_entire_rows ( const Rcpp::NumericMatrix & x,
const std::set< int > & rows_to_be_kept )

Removing rows of only NaNs.

Parameters
xRcpp::NumericMatrix
rows_to_be_keptposition, wrt to 'x', of the rows to be kept
Returns
a Rcpp::NumericMatrix without the rows of only NaNs
Note
Depends on RcppEigen for interfacing with R containers

◆ rows_entire_NaNs()

std::set< int > rows_entire_NaNs ( const Rcpp::NumericMatrix & x)

Identifying rows of only NaNs.

Parameters
xRcpp::NumericMatrix
Returns
a std::set containing the position, with respect to the original matrix, of the to be retained rows
Note
Depends on RcppEigen for interfacing with R containers