Skip to content

Commit

Permalink
Merge pull request #1095 from karlnapf/develop
Browse files Browse the repository at this point in the history
added another num_elements check and changed print to debug print
  • Loading branch information
karlnapf committed May 14, 2013
2 parents 3105db8 + f230b69 commit a4bbf79
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/shogun/base/SGObject.cpp
Expand Up @@ -1245,7 +1245,7 @@ bool CSGObject::equals(CSGObject* other, float64_t accuracy)
return false;
}

SG_SPRINT("comparing \"%s\" to \"%s\"\n", get_name(), other->get_name());
SG_DEBUG("comparing \"%s\" to \"%s\"\n", get_name(), other->get_name());

/* a crude type check based on the get_name */
if (strcmp(other->get_name(), get_name()))
Expand Down Expand Up @@ -1301,6 +1301,15 @@ bool CSGObject::equals(CSGObject* other, float64_t accuracy)
continue;
}

/* hard-wired exception for DynamicArray parameter num_elements */
if (!strcmp("DynamicArray", get_name()) &&
!strcmp(this_param->m_name, "num_elements") &&
!strcmp(other_param->m_name, "num_elements"))
{
SG_DEBUG("Ignoring DynamicArray::num_elements field\n");
continue;
}

/* use equals method of TParameter from here */
if (!this_param->equals(other_param, accuracy))
{
Expand Down

0 comments on commit a4bbf79

Please sign in to comment.