Skip to content

Heatmap Tool Sometimes Doesn't Work #472

Closed
emeeks opened this Issue Nov 13, 2011 · 8 comments

2 participants

@emeeks
emeeks commented Nov 13, 2011

If you load this network as an undirected network, the heatmap tool doesn't do anything when you click on the nodes:

https://dhs.stanford.edu/dh/gephi/dh_processed.gexf

@emeeks
emeeks commented Nov 13, 2011

The problem, I think, is in the DijkstraShortestPathAlgorithm method, as this seems to be related to the Node Cannot Be Null problem I'm running into with my TubeMap layout which works fine with a directed graph using BellmanFordShortestPathAlgorithm.

@mbastian
Gephi member

Is it on the main view or you're filtering at the same time?

@emeeks
@mbastian
Gephi member

Ok, I'm able to reproduce this issue. I'll make a patch. Thanks.

@emeeks
@mbastian mbastian added a commit to mbastian/gephi that referenced this issue Nov 13, 2011
@mbastian mbastian Fix issue #472 112353d
@mbastian
Gephi member

Yeah the Dijsktra implementation was weird. I looked at this article (http://www.vogella.de/articles/JavaAlgorithmsDijkstra/article.html), which has a clear pseudo-code and fixed our implementation.

The other problem was that the exception was not propagated so the tool was failing silently.

Let me know the fix works.

@emeeks
emeeks commented Nov 14, 2011

The fix works for running the algorithm on an undirected network, but something strange is happening with regard to the TubeMap usage of it. When I run TubeMap, it calculates network distance fine and lays out the network fine, but when I try to select the Network Distance column to apply a color ranking, it gives me the error below. If I copy the column to an Integer column and rank by color according to the new Integer column, it seems to be fine. It could be something I'm doing with TubeMap--maybe I need to explicitly cast the values as doubles when they have 0 decimal places? I'll take a look at that.

java.lang.ClassCastException: java.lang.Double cannot be cast to java.lang.Integer
at java.lang.Integer.compareTo(Integer.java:37)
at org.gephi.ranking.plugin.AbstractRanking.getMin(AbstractRanking.java:149)
at org.gephi.ranking.plugin.AbstractRanking.refreshMinMax(AbstractRanking.java:116)
at org.gephi.ranking.plugin.AttributeRankingBuilder$AttributeRanking.getMinimumValue(AttributeRankingBuilder.java:229)
at org.gephi.desktop.ranking.RankingChooser.refreshTransformerPanel(RankingChooser.java:177)
at org.gephi.desktop.ranking.RankingChooser.propertyChange(RankingChooser.java:160)
at org.gephi.desktop.ranking.RankingUIModel.firePropertyChangeEvent(RankingUIModel.java:260)
at org.gephi.desktop.ranking.RankingUIModel.setCurrentRanking(RankingUIModel.java:135)
at org.gephi.desktop.ranking.RankingChooser$1.itemStateChanged(RankingChooser.java:97)
at javax.swing.JComboBox.fireItemStateChanged(JComboBox.java:1205)
at javax.swing.JComboBox.selectedItemChanged(JComboBox.java:1253)
at javax.swing.JComboBox.contentsChanged(JComboBox.java:1309)
at javax.swing.AbstractListModel.fireContentsChanged(AbstractListModel.java:100)
at javax.swing.DefaultComboBoxModel.setSelectedItem(DefaultComboBoxModel.java:88)
at javax.swing.JComboBox.setSelectedItem(JComboBox.java:557)
at javax.swing.JComboBox.setSelectedIndex(JComboBox.java:603)
at javax.swing.plaf.basic.BasicComboPopup$Handler.mouseReleased(BasicComboPopup.java:817)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:273)
at java.awt.Component.processMouseEvent(Component.java:6267)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at javax.swing.plaf.basic.BasicComboPopup$1.processMouseEvent(BasicComboPopup.java:481)
at java.awt.Component.processEvent(Component.java:6032)
at java.awt.Container.processEvent(Container.java:2041)
at java.awt.Component.dispatchEventImpl(Component.java:4630)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Component.dispatchEvent(Component.java:4460)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
at java.awt.Container.dispatchEventImpl(Container.java:2085)
at java.awt.Component.dispatchEvent(Component.java:4460)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:148)
[catch] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

@emeeks
emeeks commented Nov 14, 2011

I just changed TubeMapLayout so that it explicitly writes doubles for its values and that seems to have fixed the problem above. Looks like everything is working fine, as far as I can tell.

@mbastian mbastian was assigned Nov 14, 2011
@mbastian mbastian closed this Nov 14, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.