Skip to content
This repository was archived by the owner on Dec 10, 2018. It is now read-only.

Fix docs in conv and cmat128.Conjugate.At#334

Merged
vladimir-ch merged 2 commits intomasterfrom
doc-fixes
Feb 12, 2016
Merged

Fix docs in conv and cmat128.Conjugate.At#334
vladimir-ch merged 2 commits intomasterfrom
doc-fixes

Conversation

@vladimir-ch
Copy link
Member

No description provided.

// matrix, that is, row j and column i of the Matrix field.
func (t Conjugate) At(i, j int) complex128 {
return t.Matrix.At(j, i) * complex(1, -1)
return cmplx.Conj(t.Matrix.At(j, i))
Copy link
Member

Choose a reason for hiding this comment

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

I don't this this is worth the import, but it could be more sensibly written as

v := t.Matrix.At(j, i)
return complex(real(v), -imag(v)) 

which is just what cmplx.Conj does.

Copy link
Member Author

Choose a reason for hiding this comment

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

In fact this is what I originally had there but then I noticed that cmplx.Conj exists without checking what it does internally. Done.

Copy link
Member

Choose a reason for hiding this comment

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

@kortschak
Copy link
Member

LGTM after change to Conjugate.At body. Thank you.

@vladimir-ch vladimir-ch merged commit 203bc76 into master Feb 12, 2016
@vladimir-ch vladimir-ch deleted the doc-fixes branch March 10, 2016 13:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants