MLPACK
1.0.8
|
Public Member Functions | |
CosineTree (arma::mat data, arma::rowvec centroid, arma::vec probabilities) | |
So other classes can use TreeType::Mat. More... | |
CosineTree () | |
Create an empty tree node. More... | |
~CosineTree () | |
Deletes this node, deallocating the memory for the children and calling their destructors in turn. More... | |
arma::rowvec | Centroid () |
Returns a reference to the centroid. More... | |
void | Centroid (arma::rowvec ¢r) |
Sets the centroid. More... | |
CosineTree & | Child (const size_t child) const |
Return the specified child (0 will be left, 1 will be right). More... | |
arma::mat | Data () |
Returns a reference to the data. More... | |
void | Data (arma::mat &d) |
Sets a reference to the data. More... | |
CosineTree * | Left () const |
Gets the left child of this node. More... | |
void | Left (CosineTree *child) |
Sets the Left child of this node. More... | |
size_t | NumPoints () const |
Return the number of points in this node (0 if not a leaf). More... | |
arma::vec | Probabilities () |
Returns a reference to Sample Probabilites. More... | |
void | Probabilities (arma::vec &prob) |
Sets a reference to Sample Probabilites. More... | |
CosineTree * | Right () const |
Gets the right child of this node. More... | |
void | Right (CosineTree *child) |
Sets the Right child of this node. More... | |
Private Attributes | |
arma::rowvec | centroid |
Centroid. More... | |
arma::mat | data |
Data. More... | |
CosineTree * | left |
The left child node. More... | |
size_t | numPoints |
Number of points in the node. More... | |
arma::vec | probabilities |
Sampling Probabilities. More... | |
CosineTree * | right |
The right child node. More... | |
Definition at line 31 of file cosine_tree.hpp.
mlpack::tree::CosineTree::CosineTree | ( | arma::mat | data, |
arma::rowvec | centroid, | ||
arma::vec | probabilities | ||
) |
So other classes can use TreeType::Mat.
Constructor
data | Dataset to create tree from. |
centroid | Centroid of the matrix. |
probabilities | Sampling 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.
arma::rowvec mlpack::tree::CosineTree::Centroid | ( | ) |
Returns a reference to the centroid.
void mlpack::tree::CosineTree::Centroid | ( | arma::rowvec & | centr | ) |
Sets 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. |
arma::mat mlpack::tree::CosineTree::Data | ( | ) |
Returns a reference to the data.
void mlpack::tree::CosineTree::Data | ( | arma::mat & | d | ) |
Sets a reference to the data.
CosineTree* mlpack::tree::CosineTree::Left | ( | ) | const |
Gets the left child of this node.
void mlpack::tree::CosineTree::Left | ( | CosineTree * | child | ) |
Sets 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).
arma::vec mlpack::tree::CosineTree::Probabilities | ( | ) |
Returns a reference to Sample Probabilites.
void mlpack::tree::CosineTree::Probabilities | ( | arma::vec & | prob | ) |
Sets a reference to Sample Probabilites.
CosineTree* mlpack::tree::CosineTree::Right | ( | ) | const |
Gets the right child of this node.
void mlpack::tree::CosineTree::Right | ( | CosineTree * | child | ) |
Sets the Right child of this node.
|
private |
Centroid.
Definition at line 37 of file cosine_tree.hpp.
|
private |
Data.
Definition at line 35 of file cosine_tree.hpp.
|
private |
The left child node.
Definition at line 41 of file cosine_tree.hpp.
|
private |
Number of points in the node.
Definition at line 45 of file cosine_tree.hpp.
|
private |
Sampling Probabilities.
Definition at line 39 of file cosine_tree.hpp.
|
private |
The right child node.
Definition at line 43 of file cosine_tree.hpp.