Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ptype complex64_t added #1140

Merged
merged 1 commit into from
Jun 3, 2013
Merged

ptype complex64_t added #1140

merged 1 commit into from
Jun 3, 2013

Conversation

lambday
Copy link
Member

@lambday lambday commented Jun 3, 2013

  • complex64_t datatype added, with (only required) support for Math, SGVector, SGMatrix, SGSparseVector, SGSparseMatrix
  • two methods added in SGVector, get_real() and get_imag(), for complex64_t
  • two unit tests added, for Math complex functions and SGVector complex

sonney2k pushed a commit that referenced this pull request Jun 3, 2013
@sonney2k sonney2k merged commit bc4689c into shogun-toolbox:develop Jun 3, 2013
@@ -1738,6 +1817,11 @@ void Parameter::add(SGMatrix<SGSparseVector<floatmax_t> >* param,
SG_FREE(*(SGString<float64_t>**) m_parameter); break;
case PT_FLOATMAX:
SG_FREE(*(SGString<floatmax_t>**) m_parameter); break;
case PT_COMPLEX64:
SG_SERROR("TParameter::delete_cont(): Implementation "
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this supposed to do?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@karlnapf I haven't added support for SGString<complex64_t>, that's why kept anything related to SGString<complex64_t> this way. Shall I add it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No you dont have to add it, but please change the error message to "Parameters of strings of complex64_t are not supported"

@karlnapf
Copy link
Member

karlnapf commented Jun 4, 2013

wow, nice patch and a lot of stuff

The parameter things should be carefully unit-tested (best with serialisation)

@lambday
Copy link
Member Author

lambday commented Jun 5, 2013

@karlnapf thanks. I'm working on the parameter unit-tests for complex. Will add soon.

static inline float64_t sinh(float64_t x)
{
return ::asinh(x);
return ::asinh(x); //TODO is this correct?
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@karlnapf @sonney2k shouldn't it be sinh(x) instead?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ouch!
Unit-tests! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants