Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix spacing when casting
  • Loading branch information
vigsterkr committed Jul 22, 2012
1 parent 5b8915d commit 924dc20
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions examples/undocumented/libshogun/classifier_latent_svm.cpp
Expand Up @@ -45,8 +45,8 @@ class CObjectDetector: public CLatentModel

virtual SGVector<float64_t> get_psi_feature_vector(index_t idx)
{
CHOGFeatures* hf = (CHOGFeatures*)m_features->get_sample(idx);
CBoundingBox* bb = (CBoundingBox*)m_labels->get_latent_label(idx);
CHOGFeatures* hf = (CHOGFeatures*) m_features->get_sample(idx);
CBoundingBox* bb = (CBoundingBox*) m_labels->get_latent_label(idx);
SGVector<float64_t> psi_v(get_dim());
for (int i = 0; i < psi_v.vlen; ++i)
{
Expand All @@ -60,7 +60,7 @@ class CObjectDetector: public CLatentModel
int32_t pos_x = 0, pos_y = 0;
float64_t max_score;

CHOGFeatures* hf = (CHOGFeatures*)m_features->get_sample(idx);
CHOGFeatures* hf = (CHOGFeatures*) m_features->get_sample(idx);
for (int i = 0; i < hf->width; ++i)
{
for (int j = 0; j < hf->height; ++j)
Expand Down
4 changes: 2 additions & 2 deletions src/shogun/classifier/svm/LatentLinearMachine.cpp
Expand Up @@ -35,7 +35,7 @@ CLatentLinearMachine::CLatentLinearMachine(CLatentModel* model, float64_t C)

/* create the temporal storage for PSI features */
SGMatrix<float64_t> psi_m(feat_dim, m_model->get_num_vectors());
((CDenseFeatures<float64_t>*)features)->set_feature_matrix(psi_m);
((CDenseFeatures<float64_t>*) features)->set_feature_matrix(psi_m);
}

CLatentLinearMachine::~CLatentLinearMachine()
Expand Down Expand Up @@ -171,6 +171,6 @@ void CLatentLinearMachine::init()
m_parameters->add(&m_C2, "C2", "Cost constant 2.");
m_parameters->add(&m_epsilon, "epsilon", "Convergence precision.");
m_parameters->add(&m_max_iter, "max_iter", "Maximum iterations.");
m_parameters->add((CSGObject**)&m_model, "latent_model", "Latent Model.");
m_parameters->add((CSGObject**) &m_model, "latent_model", "Latent Model.");
}

0 comments on commit 924dc20

Please sign in to comment.