moved accessor definitions for LARS from lars.cpp to lars.hpp

This commit is contained in:
tekhnofiend
2011-12-14 17:52:34 +00:00
parent 492cf7fda9
commit e52d9c83ef
2 changed files with 17 additions and 26 deletions
-21
View File
@@ -45,7 +45,6 @@ void LARS::SetGram(const mat& matGram) {
this->matGram = matGram;
}
void LARS::ComputeGram(const mat& matX)
{
if (elasticNet)
@@ -58,26 +57,6 @@ void LARS::ComputeGram(const mat& matX)
}
}
const std::vector<u32> LARS::ActiveSet()
{
return activeSet;
}
const std::vector<vec> LARS::BetaPath()
{
return betaPath;
}
const std::vector<double> LARS::LambdaPath()
{
return lambdaPath;
}
const mat LARS::MatUtriCholFactor()
{
return matUtriCholFactor;
}
void LARS::DoLARS(const mat& matX, const vec& y)
{
// compute Xty
+17 -5
View File
@@ -122,22 +122,34 @@ class LARS {
/*
* Accessor for activeSet
*/
const std::vector<arma::u32> ActiveSet();
const std::vector<arma::u32> ActiveSet()
{
return activeSet;
}
/*
* Accessor for betaPath
*/
const std::vector<arma::vec> BetaPath();
const std::vector<arma::vec> BetaPath()
{
return betaPath;
}
/*
* Accessor for lambdaPath
*/
const std::vector<double> LambdaPath();
const std::vector<double> LambdaPath()
{
return lambdaPath;
}
/*
* Accessor for matUtriCholFactor
*/
const arma::mat MatUtriCholFactor();
const arma::mat MatUtriCholFactor()
{
return matUtriCholFactor;
}
/* Run LARS
*