Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

add scalar and tensor products #239

Merged
merged 1 commit into from
Nov 22, 2015

Conversation

CarloLucibello
Copy link
Contributor

partially addresses #199

@codecov-io
Copy link

Current coverage is 99.94%

Merging #239 into master will not affect coverage as of 61d26b2

Powered by Codecov. Updated on successful CI builds.

"""
function tensor_product{G<:SimpleGraph}(g::G, h::G)
z = G(nv(g)*nv(h))
id(i, j) = (i-1)*nv(h) + j
Copy link
Owner

Choose a reason for hiding this comment

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

Does putting a function inside another function do something to efficiency/dispatch? That is, see JuliaLang/julia#4428

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just did the benchmak against the same code without closures, and thhe version with closures seems to be slightly faster (don't ask me why).

Copy link
Owner

Choose a reason for hiding this comment

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

OK, works for me :)

sbromberger added a commit that referenced this pull request Nov 22, 2015
@sbromberger sbromberger merged commit 865ba19 into sbromberger:master Nov 22, 2015
@CarloLucibello CarloLucibello deleted the products4 branch November 23, 2015 13:52
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.

3 participants