![]() |
slope 6.0.1
|
Representation of the clusters in SLOPE. More...
#include <clusters.h>
Public Member Functions | |
| Clusters ()=default | |
| Constructs an Clusters object. | |
| Clusters (const Eigen::VectorXd &beta) | |
| Constructs a Clusters object with the given beta vector. | |
| std::size_t | size () |
| Returns the number of clusters. | |
| std::vector< int >::iterator | begin (const int i) |
| Returns an iterator pointing to the beginning of the cluster with the given index. | |
| std::vector< int >::iterator | end (const int i) |
| Returns an iterator pointing to the end of the cluster with the given index. | |
| std::vector< int >::const_iterator | cbegin (const int i) const |
| Returns a constant iterator pointing to the beginning of the cluster with the given index. | |
| std::vector< int >::const_iterator | cend (const int i) const |
| Returns a constant iterator pointing to the end of the cluster with the given index. | |
| int | cluster_size (const int i) const |
| Returns the size of the cluster with the given index. | |
| int | pointer (const int i) const |
| Returns the pointer of the cluster with the given index. | |
| int | size () const |
| Returns the number of clusters. | |
| double | coeff (const int i) const |
| Returns the coefficient of the cluster with the given index. | |
| void | setCoeff (const int i, const double x) |
| Sets the coefficient of the cluster with the given index. | |
| const std::vector< double > & | coeffs () const |
| Returns a vector containing the coefficients of all clusters. | |
| const std::vector< int > & | indices () const |
| Returns a vector containing the indices of all clusters. | |
| const std::vector< int > & | pointers () const |
| Returns a vector containing the pointers of all clusters. | |
| void | update (const int old_index, const int new_index, const double c_new) |
| Updates the cluster structure when an index is changed. | |
| void | update (const Eigen::VectorXd &beta) |
| Updates the cluster structure with the given beta vector. | |
| std::vector< std::vector< int > > | getClusters () const |
| Returns the clusters as a vector of vectors. | |
Representation of the clusters in SLOPE.
Definition at line 17 of file clusters.h.
| slope::Clusters::Clusters | ( | const Eigen::VectorXd & | beta | ) |
Constructs a Clusters object with the given beta vector.
| beta | The beta vector. |
| std::vector< int >::iterator slope::Clusters::begin | ( | const int | i | ) |
Returns an iterator pointing to the beginning of the cluster with the given index.
| i | The index of the cluster. |
| std::vector< int >::const_iterator slope::Clusters::cbegin | ( | const int | i | ) | const |
Returns a constant iterator pointing to the beginning of the cluster with the given index.
| i | The index of the cluster. |
| std::vector< int >::const_iterator slope::Clusters::cend | ( | const int | i | ) | const |
Returns a constant iterator pointing to the end of the cluster with the given index.
| i | The index of the cluster. |
| int slope::Clusters::cluster_size | ( | const int | i | ) | const |
Returns the size of the cluster with the given index.
| i | The index of the cluster. |
| double slope::Clusters::coeff | ( | const int | i | ) | const |
Returns the coefficient of the cluster with the given index.
| i | The index of the cluster. |
| const std::vector< double > & slope::Clusters::coeffs | ( | ) | const |
Returns a vector containing the coefficients of all clusters.
| std::vector< int >::iterator slope::Clusters::end | ( | const int | i | ) |
Returns an iterator pointing to the end of the cluster with the given index.
| i | The index of the cluster. |
| std::vector< std::vector< int > > slope::Clusters::getClusters | ( | ) | const |
Returns the clusters as a vector of vectors.
| const std::vector< int > & slope::Clusters::indices | ( | ) | const |
Returns a vector containing the indices of all clusters.
| int slope::Clusters::pointer | ( | const int | i | ) | const |
Returns the pointer of the cluster with the given index.
| i | The index of the cluster. |
| const std::vector< int > & slope::Clusters::pointers | ( | ) | const |
Returns a vector containing the pointers of all clusters.
| void slope::Clusters::setCoeff | ( | const int | i, |
| const double | x | ||
| ) |
Sets the coefficient of the cluster with the given index.
| i | The index of the cluster. |
| x | The new coefficient value. |
|
inline |
Returns the number of clusters.
Definition at line 35 of file clusters.h.
| int slope::Clusters::size | ( | ) | const |
Returns the number of clusters.
| void slope::Clusters::update | ( | const Eigen::VectorXd & | beta | ) |
Updates the cluster structure with the given beta vector.
| beta | The beta vector. |
| void slope::Clusters::update | ( | const int | old_index, |
| const int | new_index, | ||
| const double | c_new | ||
| ) |
Updates the cluster structure when an index is changed.
| old_index | The old index. |
| new_index | The new index. |
| c_new | The new coefficient value. |