Skip to content

Commit

Permalink
convert functions in PLif to use sgvector
Browse files Browse the repository at this point in the history
  • Loading branch information
Soeren Sonnenburg committed Aug 1, 2013
1 parent 4ab4174 commit 129254b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/shogun/structure/HMSVMModel.cpp
Expand Up @@ -115,7 +115,7 @@ SGVector< float64_t > CHMSVMModel::get_joint_feature_vector(
for ( int32_t j = 0 ; j < state_seq.vlen ; ++j )
{
CPlif* plif = (CPlif*) m_plif_matrix->get_element(S*f + state_seq[j]);
float64_t* limits = plif->get_plif_limits();
SGVector<float64_t> limits = plif->get_plif_limits();
// The number of supporting points smaller or equal than value
int32_t count = 0;
// The observation value
Expand Down
8 changes: 4 additions & 4 deletions src/shogun/structure/Plif.h
Expand Up @@ -308,18 +308,18 @@ class CPlif: public CPlifBase
*
* @return limits
*/
float64_t* get_plif_limits()
SGVector<float64_t> get_plif_limits()
{
return limits.vector;
return limits;
}

/** get plif penalty
*
* @return plif penalty
*/
float64_t* get_plif_penalties()
SGVector<float64_t> get_plif_penalties()
{
return penalties.vector;
return penalties;
}

/** set maximum value
Expand Down
4 changes: 2 additions & 2 deletions src/shogun/ui/SGInterface.cpp
Expand Up @@ -6302,8 +6302,8 @@ bool CSGInterface::cmd_get_plif_struct()
ids[i]=PEN[i]->get_id();
names[i].string = PEN[i]->get_plif_name();
names[i].slen = strlen(PEN[i]->get_plif_name());
float64_t* limits = PEN[i]->get_plif_limits();
float64_t* penalties = PEN[i]->get_plif_penalties();
SGVector<float64_t> limits = PEN[i]->get_plif_limits();
SGVector<float64_t> penalties = PEN[i]->get_plif_penalties();
for (int32_t j=0;j<M;j++)
{
all_limits[i*M+j]=limits[j];
Expand Down

0 comments on commit 129254b

Please sign in to comment.