Skip to content

Commit

Permalink
Merge pull request #530 from iglesias/fix-indent
Browse files Browse the repository at this point in the history
Minor fixes isolated
  • Loading branch information
Soeren Sonnenburg committed May 16, 2012
2 parents 2730c73 + f586c7e commit 6051a71
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 21 deletions.
24 changes: 12 additions & 12 deletions src/shogun/features/DotFeatures.cpp
Expand Up @@ -284,34 +284,34 @@ void* CDotFeatures::dense_dot_range_helper(void* p)
SGMatrix<float64_t> CDotFeatures::get_computed_dot_feature_matrix()
{

int64_t offs=0;
int64_t offs=0;
int32_t num=get_num_vectors();
int32_t dim=get_dim_feature_space();
ASSERT(num>0);
ASSERT(dim>0);
int32_t dim=get_dim_feature_space();
ASSERT(num>0);
ASSERT(dim>0);

SGMatrix<float64_t> m(dim, num);
m.zero();

for (int32_t i=0; i<num; i++)
{
for (int32_t i=0; i<num; i++)
{
add_to_dense_vec(1.0, i, &(m.matrix[offs]), dim);
offs+=dim;
}
offs+=dim;
}

return m;
}

SGVector<float64_t> CDotFeatures::get_computed_dot_feature_vector(int32_t num)
{

int32_t dim=get_dim_feature_space();
ASSERT(num>=0 && num<=get_num_vectors());
ASSERT(dim>0);
int32_t dim=get_dim_feature_space();
ASSERT(num>=0 && num<=get_num_vectors());
ASSERT(dim>0);

SGVector<float64_t> v(dim);
v.zero();
add_to_dense_vec(1.0, num, v.vector, dim);
add_to_dense_vec(1.0, num, v.vector, dim);
return v;
}

Expand Down
8 changes: 4 additions & 4 deletions src/shogun/machine/KernelMulticlassMachine.h
Expand Up @@ -80,10 +80,10 @@ class CKernelMulticlassMachine : public CMulticlassMachine
}

/** Stores feature data of underlying model.
*
* Need to store the SVs for all sub-machines. We make a union of the
* SVs for all sub-machines, store the union and adjust the
* sub-machines to index into the union.
*
* Need to store the SVs for all sub-machines. We make a union of the
* SVs for all sub-machines, store the union and adjust the
* sub-machines to index into the union.
*/
virtual void store_model_features();

Expand Down
2 changes: 1 addition & 1 deletion src/shogun/machine/LinearMulticlassMachine.h
Expand Up @@ -73,7 +73,7 @@ class CLinearMulticlassMachine : public CMulticlassMachine

/** get features
*
* @return kernel
* @return features
*/
CDotFeatures* get_features() const
{
Expand Down
4 changes: 2 additions & 2 deletions src/shogun/machine/MulticlassMachine.cpp
Expand Up @@ -36,8 +36,8 @@ CMulticlassMachine::CMulticlassMachine(
m_machine = machine;
register_parameters();

if (labs)
init_strategy();
if (labs)
init_strategy();
}

CMulticlassMachine::~CMulticlassMachine()
Expand Down
4 changes: 2 additions & 2 deletions src/shogun/machine/MulticlassMachine.h
Expand Up @@ -116,8 +116,8 @@ class CMulticlassMachine : public CMachine
}

protected:
/** init strategy */
void init_strategy();
/** init strategy */
void init_strategy();

/** clear machines */
void clear_machines();
Expand Down

0 comments on commit 6051a71

Please sign in to comment.