Skip to content

Heatmap Tool Sometimes Doesn't Work #472

emeeks opened this Issue Nov 13, 2011 · 8 comments

2 participants

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:

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.

Gephi member

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

Gephi member

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

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

Yeah the Dijsktra implementation was weird. I looked at this article (, 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 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(
at org.gephi.ranking.plugin.AbstractRanking.getMin(
at org.gephi.ranking.plugin.AbstractRanking.refreshMinMax(
at org.gephi.ranking.plugin.AttributeRankingBuilder$AttributeRanking.getMinimumValue(
at org.gephi.desktop.ranking.RankingChooser.refreshTransformerPanel(
at org.gephi.desktop.ranking.RankingChooser.propertyChange(
at org.gephi.desktop.ranking.RankingUIModel.firePropertyChangeEvent(
at org.gephi.desktop.ranking.RankingUIModel.setCurrentRanking(
at org.gephi.desktop.ranking.RankingChooser$1.itemStateChanged(
at javax.swing.JComboBox.fireItemStateChanged(
at javax.swing.JComboBox.selectedItemChanged(
at javax.swing.JComboBox.contentsChanged(
at javax.swing.AbstractListModel.fireContentsChanged(
at javax.swing.DefaultComboBoxModel.setSelectedItem(
at javax.swing.JComboBox.setSelectedItem(
at javax.swing.JComboBox.setSelectedIndex(
at javax.swing.plaf.basic.BasicComboPopup$Handler.mouseReleased(
at java.awt.AWTEventMulticaster.mouseReleased(
at java.awt.Component.processMouseEvent(
at javax.swing.JComponent.processMouseEvent(
at javax.swing.plaf.basic.BasicComboPopup$1.processMouseEvent(
at java.awt.Component.processEvent(
at java.awt.Container.processEvent(
at java.awt.Component.dispatchEventImpl(
at java.awt.Container.dispatchEventImpl(
at java.awt.Component.dispatchEvent(
at java.awt.LightweightDispatcher.retargetMouseEvent(
at java.awt.LightweightDispatcher.processMouseEvent(
at java.awt.LightweightDispatcher.dispatchEvent(
at java.awt.Container.dispatchEventImpl(
at java.awt.Component.dispatchEvent(
at java.awt.EventQueue.dispatchEvent(
at org.netbeans.core.TimableEventQueue.dispatchEvent(
[catch] at java.awt.EventDispatchThread.pumpOneEventForFilters(
at java.awt.EventDispatchThread.pumpEventsForFilter(
at java.awt.EventDispatchThread.pumpEventsForHierarchy(
at java.awt.EventDispatchThread.pumpEvents(
at java.awt.EventDispatchThread.pumpEvents(

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.