Public Member Functions | |
CosineTree () | |
Create an empty tree node. | |
CosineTree (arma::mat data, arma::rowvec centroid, arma::vec probabilities) | |
So other classes can use TreeType::Mat. | |
~CosineTree () | |
Deletes this node, deallocating the memory for the children and calling their destructors in turn. | |
void | Centroid (arma::rowvec ¢r) |
Sets the centroid. | |
arma::rowvec | Centroid () |
Returns a reference to the centroid. | |
CosineTree & | Child (const size_t child) const |
Return the specified child (0 will be left, 1 will be right). | |
void | Data (arma::mat &d) |
Sets a reference to the data. | |
arma::mat | Data () |
Returns a reference to the data. | |
void | Left (CosineTree *child) |
Sets the Left child of this node. | |
CosineTree * | Left () const |
Gets the left child of this node. | |
size_t | NumPoints () const |
Return the number of points in this node (0 if not a leaf). | |
void | Probabilities (arma::vec &prob) |
Sets a reference to Sample Probabilites. | |
arma::vec | Probabilities () |
Returns a reference to Sample Probabilites. | |
void | Right (CosineTree *child) |
Sets the Right child of this node. | |
CosineTree * | Right () const |
Gets the right child of this node. | |
Private Attributes | |
arma::rowvec | centroid |
Centroid. | |
arma::mat | data |
Data. | |
CosineTree * | left |
The left child node. | |
size_t | numPoints |
Number of points in the node. | |
arma::vec | probabilities |
Sampling Probabilities. | |
CosineTree * | right |
The right child node. |
Definition at line 31 of file cosine_tree.hpp.
mlpack::tree::CosineTree::CosineTree | ( | arma::mat | data, | |
arma::rowvec | centroid, | |||
arma::vec | probabilities | |||
) |
mlpack::tree::CosineTree::CosineTree | ( | ) |
Create an empty tree node.
mlpack::tree::CosineTree::~CosineTree | ( | ) |
Deletes this node, deallocating the memory for the children and calling their destructors in turn.
This will invalidate any pointers or references to any nodes which are children of this one.
void mlpack::tree::CosineTree::Centroid | ( | arma::rowvec & | centr | ) |
Sets the centroid.
arma::rowvec mlpack::tree::CosineTree::Centroid | ( | ) |
Returns a reference to the centroid.
CosineTree& mlpack::tree::CosineTree::Child | ( | const size_t | child | ) | const |
Return the specified child (0 will be left, 1 will be right).
If the index is greater than 1, this will return the right child.
child | Index of child to return. |
void mlpack::tree::CosineTree::Data | ( | arma::mat & | d | ) |
Sets a reference to the data.
arma::mat mlpack::tree::CosineTree::Data | ( | ) |
Returns a reference to the data.
void mlpack::tree::CosineTree::Left | ( | CosineTree * | child | ) |
Sets the Left child of this node.
CosineTree* mlpack::tree::CosineTree::Left | ( | ) | const |
Gets the left child of this node.
size_t mlpack::tree::CosineTree::NumPoints | ( | ) | const |
Return the number of points in this node (0 if not a leaf).
void mlpack::tree::CosineTree::Probabilities | ( | arma::vec & | prob | ) |
Sets a reference to Sample Probabilites.
arma::vec mlpack::tree::CosineTree::Probabilities | ( | ) |
Returns a reference to Sample Probabilites.
void mlpack::tree::CosineTree::Right | ( | CosineTree * | child | ) |
Sets the Right child of this node.
CosineTree* mlpack::tree::CosineTree::Right | ( | ) | const |
Gets the right child of this node.
arma::rowvec mlpack::tree::CosineTree::centroid [private] |
Centroid.
Definition at line 37 of file cosine_tree.hpp.
arma::mat mlpack::tree::CosineTree::data [private] |
Data.
Definition at line 35 of file cosine_tree.hpp.
CosineTree* mlpack::tree::CosineTree::left [private] |
The left child node.
Definition at line 41 of file cosine_tree.hpp.
size_t mlpack::tree::CosineTree::numPoints [private] |
Number of points in the node.
Definition at line 45 of file cosine_tree.hpp.
arma::vec mlpack::tree::CosineTree::probabilities [private] |
Sampling Probabilities.
Definition at line 39 of file cosine_tree.hpp.
CosineTree* mlpack::tree::CosineTree::right [private] |
The right child node.
Definition at line 43 of file cosine_tree.hpp.