The following example in the scala shell worked as expected:

import org.apache.flink.graph.library.LabelPropagation

val verticesWithCommunity = graph.run(new LabelPropagation(30))

// print the result
verticesWithCommunity.print


I tried to extend the example to use CommunityDetection:

import org.apache.flink.graph.library.CommunityDetection

val verticesWithCommunity = graph.run(new CommunityDetection(30, 0.5))

// print the result
verticesWithCommunity.print


And meant the following error:
error: polymorphic expression cannot be instantiated to expected type;
found : [K]org.apache.flink.graph.library.CommunityDetection[K]
required: org.apache.flink.graph.GraphAlgorithm[Long,String,Double,?]
val verticesWithCommunity = graph.run(new CommunityDetection(30, 0.5))
^

I haven't been able to come up with a hack to make this work. Any
advice/bug?

I invtestigated the code base a little, seems to be an issue with what
Graph.run expects to see vs. what LabelPropagation returns vs. what
CommunityDetection returns.



Trevor Grant
Data Scientist
https://github.com/rawkintrevo
http://stackexchange.com/users/3002022/rawkintrevo
http://trevorgrant.org

*"Fortunate is he, who is able to know the causes of things."  -Virgil*

Reply via email to