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

Add initial graph layout algorithm #398

Merged
merged 8 commits into from
Jul 12, 2017
Merged

Conversation

jbcrail
Copy link
Contributor

@jbcrail jbcrail commented Jul 5, 2017

No description provided.


# This comes from the sparse FR layout in NetworkX
A = nx.to_scipy_sparse_matrix(graph, dtype='f')
nnodes, _ = A.shape
Copy link
Member

Choose a reason for hiding this comment

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

Is this just a temporary implementation for testing? We can't depend on networkx in general.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was meant as temporary until I could switch over to using dataframes for input. The original implementation relied on NetworkX.

nodes.
dim : int
Coordinate dimensions of each node.

Copy link
Member

Choose a reason for hiding this comment

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

If this is a ParameterizedFunction, it should have parameters, i.e. declare iterations = param.Integer(10,doc="Number of iterations") at the class level, with __call__ set up as other ParameterizedFunctions are (no explicit named arguments like that) and no docstring like this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks. I updated the class.

# this is the largest step allowed in the dynamics.
t = 0.1

# simple cooling scheme.
Copy link
Member

Choose a reason for hiding this comment

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

Should the meat of this function be in a separate Numba-ized function?

@jbcrail
Copy link
Contributor Author

jbcrail commented Jul 12, 2017

@jbednar Thanks for the feedback. The initial algorithm is now fully parameterized, uses only dataframes for both input and output, and uses Numba as appropriate.

I'm going to merge this so that I can work on a simple demo and then create a new dev release.

@jbcrail jbcrail merged commit 30c5d15 into holoviz:master Jul 12, 2017
@jbcrail jbcrail deleted the graph-layout branch July 12, 2017 03:46
@jbednar
Copy link
Member

jbednar commented Jul 14, 2017

Looks good, thanks!

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.

2 participants