![]() |
slope 0.29.0
|
Various utility functions. More...
#include <Eigen/Core>
#include <Eigen/SparseCore>
#include <algorithm>
#include <numeric>
#include <set>
#include <string>
#include <unordered_set>
#include <vector>
Go to the source code of this file.
Namespaces | |
namespace | slope |
Namespace containing SLOPE regression implementation. | |
Functions | |
template<typename T > | |
void | slope::sort (T &v, const bool descending=false) |
template<typename T > | |
std::vector< int > | slope::which (const T &x) |
template<typename T > | |
std::vector< int > | slope::sortIndex (T &v, const bool descending=false) |
template<typename T > | |
void | slope::permute (T &values, const std::vector< int > &ind) |
template<typename T > | |
void | slope::inversePermute (T &values, const std::vector< int > &ind) |
template<typename T > | |
void | slope::move_elements (std::vector< T > &v, const int from, const int to, const int size) |
void | slope::validateOption (const std::string &value, const std::set< std::string > &valid_options, const std::string ¶meter_name) |
Validates if a given value exists in a set of valid options. | |
Eigen::MatrixXd | slope::subset (const Eigen::MatrixXd &x, const std::vector< int > &indices) |
Extract a subset of rows from an Eigen matrix. | |
Eigen::SparseMatrix< double > | slope::subset (const Eigen::SparseMatrix< double > &x, const std::vector< int > &indices) |
Extract a subset of rows from a sparse Eigen matrix. | |
Eigen::MatrixXd | slope::subsetCols (const Eigen::MatrixXd &x, const std::vector< int > &indices) |
Extract specified columns from a dense matrix. | |
Eigen::SparseMatrix< double > | slope::subsetCols (const Eigen::SparseMatrix< double > &x, const std::vector< int > &indices) |
Extract specified columns from a sparse matrix. | |
std::unordered_set< double > | slope::unique (const Eigen::MatrixXd &x) |
Create a set of unique values from an Eigen matrix. | |
Various utility functions.
Definition in file utils.h.