How do I do that in this piece of code??
modularity.execute(graphModel);
//Partition with 'modularity_class', just created by Modularity algorithm
Column modColumn = graphModel.getNodeTable().getColumn(Modularity.MODULARITY_CLASS);
Function func2 = appearanceModel.getNodeFunction(graph, modColumn, PartitionElementColorTransformer.class);
Partition partition2 = ((PartitionFunction) func2).getPartition();
Ranking modularity Java.lang.NullPointerException
- eduramiba
- Gephi Code Manager
- Posts:1064
- Joined:22 Mar 2010 15:30
- Location:Madrid, Spain [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
Re: Ranking modularity Java.lang.NullPointerException
Maybe with the force functions for https://gephi.org/gephi-toolkit/0.9.1/a ... oller.html but I am not sure how to use them.
-
- Posts:8
- Joined:28 Aug 2016 12:21 [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
Re: Ranking modularity Java.lang.NullPointerException
I tried to force the function to be partition and it changes from ranking to partition but when I try to get the partitions later I get a pointer to Null.
So it seems that is not possible to do the casting like that. Any other idea??
Why does it work with the GUI and not with the toolkit??
Ivan
So it seems that is not possible to do the casting like that. Any other idea??
Why does it work with the GUI and not with the toolkit??
Ivan
- eduramiba
- Gephi Code Manager
- Posts:1064
- Joined:22 Mar 2010 15:30
- Location:Madrid, Spain [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
Re: Ranking modularity Java.lang.NullPointerException
You can check the UI code here https://github.com/gephi/gephi/blob/mas ... .java#L401 so maybe you can obtain the same behaviour.