I've done some more work on connecting JUNG and Gremlin.
http://wiki.github.com/tinkerpop/gremlin/working-with-jung-algorithms
JUNG algorithms are intended for single-relational graphs (that is,
graphs with unlabeled edges). However, Gremlin was developed to
process multi-relational graphs (that is, graph with labeled edges).
Gremlin was intended to provide the expressibility of the path algebra
defined here http://arxiv.org/abs/0806.2274, but through graph
traversal techniques (not matrix techniques) (see http://arxiv.org/abs/0803.4355)
. While its possible to implement multi-relational graph algorithms in
Gremlin (as thats its intention), there is a wealth of existing
toolkits and packages that come with a rich set of algorithms (e.g.
JUNG).
Currently, I've been able to "trick" JUNG into ignoring certain edges
if desired. That is, for example, calculate PageRank over ONLY "knows"
edges (ignore all other edges). To be able to do more complicated path
expressions (e.g. calculate PageRank over "knows my friends friends"
"edges"), I think I have a technique to also "trick" JUNG into this.
Thus, when Pavel and I make functions and paths first class citizens
(a future release of Gremlin), I think it will be possible to
expression computations like this:
gremlin> $path := path co-developer
./outE[@label='created']/inV/inE[@label='created]/inV[g:except($_)]
end
gremlin> jung:pagerank($g, $path)
Take care,
Marko.
http://markorodriguez.com
http://gremlin.tinkerpop.com
P.S. Gremlin 0.2 is nearly ready for release. 0.2.x versions of
Gremlin will simply add more and more of the JUNG algorithms to Gremlin.
> expressibility of the path algebra defined here
> http://arxiv.org/abs/0806.2274, but through graph traversal techniques
> (not matrix techniques) (see http://arxiv.org/abs/0803.4355). While
> its possible to implement multi-relational graph algorithms in Gremlin
> (as thats its intention), there is a wealth of existing toolkits and
> packages that come with a rich set of algorithms (e.g. JUNG).
>
> Currently, I've been able to "trick" JUNG into ignoring certain edges
> if desired. That is, for example, calculate PageRank over ONLY "knows"
> edges (ignore all other edges). To be able to do more complicated path
> expressions (e.g. calculate PageRank over "knows my friends friends"
> "edges"), I think I have a technique to also "trick" JUNG into this.
> Thus, when
Can't you use the Edge Predicate parameter to PageRank?
I'm using JUNG for graphs with labeled edges: I use any type of object as my edge (making sure an effective hashCode() and proper equals()). Please clarify what you mean.
Can't you use the Edge Predicate parameter to PageRank?
PageRank(Hypergraph<V,E> graph,
org.apache.commons.collections15.Transformer<E,? extends Number> edge_weight,
double alpha)--
You received this message because you are subscribed to the Google Groups "Gremlin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/ba3406eb-620f-444c-a8db-9595c2e3882d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.