Skip to content

Commit

Permalink
SGVector to const SGVector&
Browse files Browse the repository at this point in the history
  • Loading branch information
karlnapf committed Apr 22, 2012
1 parent 676e28c commit 0922c49
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/shogun/features/Features.cpp
Expand Up @@ -349,7 +349,7 @@ void CFeatures::unset_property(EFeatureProperty p)
properties &= (properties | p) ^ p;
}

void CFeatures::add_subset(SGVector<index_t> subset)
void CFeatures::add_subset(const SGVector<index_t>& subset)
{
m_subset_stack->add_subset(subset);
subset_changed_post();
Expand All @@ -367,7 +367,7 @@ void CFeatures::remove_all_subsets()
subset_changed_post();
}

CFeatures* CFeatures::copy_subset(SGVector<index_t> indices)
CFeatures* CFeatures::copy_subset(const SGVector<index_t>& indices)
{
SG_ERROR("copy_subset and therefore model storage of CMachine "
"(required for cross-validation and model-selection is ",
Expand Down
2 changes: 1 addition & 1 deletion src/shogun/features/Features.h
Expand Up @@ -228,7 +228,7 @@ class CFeatures : public CSGObject
*
* @param subset subset of indices to add
* */
virtual void add_subset(SGVector<index_t> subset);
virtual void add_subset(const SGVector<index_t>& subset);

/** removes that last added subset from subset stack, if existing
* Calls subset_changed_post() afterwards */
Expand Down
2 changes: 1 addition & 1 deletion src/shogun/features/Labels.h
Expand Up @@ -206,7 +206,7 @@ class CLabels : public CSGObject
*
* @param subset subset of indices to add
* */
virtual void add_subset(SGVector<index_t> subset);
virtual void add_subset(const SGVector<index_t>& subset);

/** removes that last added subset from subset stack, if existing
* Calls subset_changed_post() afterwards */
Expand Down
2 changes: 1 addition & 1 deletion src/shogun/features/Subset.cpp
Expand Up @@ -18,7 +18,7 @@ CSubset::CSubset()
init();
}

CSubset::CSubset(SGVector<index_t> subset_idx)
CSubset::CSubset(const SGVector<index_t>& subset_idx)
{
init();

Expand Down
4 changes: 2 additions & 2 deletions src/shogun/machine/MulticlassMachine.h
Expand Up @@ -185,9 +185,9 @@ class CMulticlassMachine : public CMachine

/** set subset to the features of the machine, deletes old one
*
* @param subset subset instance to set
* @param subset subset indices to set
*/
virtual void set_machine_subset(CSubset* subset) = 0;
virtual void add_machine_subset(const SGVector<index_t>& subset) = 0;

/** deletes any subset set to the features of the machine */
virtual void remove_machine_subset() = 0;
Expand Down

0 comments on commit 0922c49

Please sign in to comment.