gplib  1.0.0
C++ Gaussian Process Library
Namespaces | Functions | Variables
basic.hpp File Reference
#include <cmath>
#include <map>
#include <vector>
Include dependency graph for basic.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 gplib
 

Functions

arma::mat gplib::upper_triangular_inverse (const arma::mat &upper_t)
 
arma::vec gplib::get_observed_only (const arma::vec &vec, const std::vector< bool > &observed)
 Takes a vector of real values and a boolean vector telling which dimensions are observed and returns a new vector with the observed dimensions only. More...
 
void gplib::split_indices (const std::vector< bool > &predicates, std::vector< arma::uword > &true_part, std::vector< arma::uword > &false_part)
 Splits the indices (zero indexed) on the ones where the pradicate is true and the part it is false. More...
 
bool gplib::all_true (const std::vector< bool > &vec)
 Return true if all the values in the boolean vector are true. More...
 
bool gplib::check_symmetric (const arma::mat &A)
 Checks if the matrix is symmetric. More...
 
arma::mat gplib::force_symmetric (const arma::mat &A)
 Returns a new matrix which is (A + A.t()) / 2.0 A must be square. More...
 
arma::mat gplib::force_diag (const arma::mat &A)
 Returns a new matrix with no zeroes in the diagonal. More...
 
arma::mat gplib::flatten (std::vector< arma::vec > &y)
 Returns a vector-like matrix with all the values contained in y concatenated. More...
 
std::vector< double > gplib::flatten (std::vector< arma::mat > &M)
 Returns a vector with all the values contained in M concatenated. More...
 
std::vector< arma::mat > gplib::unflatten (std::vector< double > &M_params, std::vector< arma::mat > &M)
 Returns a vector of matrices with all the values in M_params. More...
 
void gplib::split (const std::vector< double > &theta, std::vector< double > &kernel_params, std::vector< double > &M_params)
 Splits the params contained in 'theta' based on the size of kernel_params and M_params. More...
 

Variables

const double gplib::pi = std::acos(-1)