Problem with types in jython console
Posted: 04 Jan 2013 15:50
Hi,
I am trying to run a graph metric algorithm in the jython console. Unfortunately I cannot call the method 'execute' in a GraphDistance object.
This is the class of statistics object I need to use:
The type of the graph class is this:
That is actually a subclass of HierarchicalGraph:
I also have the 'attributes' object as requested:
But the execute states that the required type is not correct:
This does not make much sense for me since the class of the graph object I am using is derived from the class that is required.
Any ideas?
I am trying to run a graph metric algorithm in the jython console. Unfortunately I cannot call the method 'execute' in a GraphDistance object.
This is the class of statistics object I need to use:
Code: Select all
>>> type(gd)
<type 'org.gephi.statistics.plugin.GraphDistance'>
Code: Select all
>>> type(gu)
<type 'org.gephi.graph.dhns.graph.HierarchicalUndirectedGraphImpl'>
Code: Select all
>>> gu.class.__bases__[0].__bases__[0]
<type 'org.gephi.graph.api.HierarchicalGraph'>
Code: Select all
>>> type(ga)
<type 'org.gephi.data.attributes.AttributeRowImpl'>
Code: Select all
>>> gd.execute(gu,ga)
Traceback (most recent call last):
File "<input>", line 1, in <module>
TypeError: execute(): 1st arg can't be coerced to org.gephi.graph.api.HierarchicalGraph, org.gephi.graph.api.GraphModel
Any ideas?