1

I'm trying to extend a Gelly Graph into a Graph with edges with Tuple5 instead of Tuple 3. This is not possible by extending a gelly Graph since the constructor is private. I went ahead and made my own Edge class that extends Tuple5 instead of Tuple 3 but i'm unsure if i can easily make it into a gelly Graph at this point since the API points to tuple3 or tuple2 for edge sets.

The question is if this can be done more easily or if it's possible at all what i want to do

  • Can you explain your use case, i.e., why you would like to extend the edge to a Tuple5? Couldn't you use a `Tuple3` as type for the value field? – Fabian Hueske Oct 11 '16 at 08:44
  • Yes i can, I want to make a temporal graph, where every edge has 2 extra values, a starting time and ending time. I think using the Tuple3 field as a Value field could work as well, i didn't try that yet. Although for the algorithms that i plan on making using a Tuple5 would be more convenient – Wouter Ligtenberg Oct 11 '16 at 08:59
  • I see. I think most of the operators and algorithms expect `Tuple3` edges. So, I am not sure how much can be reused of Gelly if you extend edges to `Tuple5`. I would recommend to write to the Flink user mailing list to get in touch with the main contributors of Gelly who can help you better. – Fabian Hueske Oct 11 '16 at 10:02
  • Thank you for your input, where can i find tat flink user mailing list? – Wouter Ligtenberg Oct 11 '16 at 10:11
  • http://flink.apache.org/community.html#mailing-lists – Fabian Hueske Oct 11 '16 at 10:12

1 Answers1

0

Gelly algorithms won't be able to use information in the Tuple5 edge in any case. If you want to use them in your user-defined-functions, you can instead use a regular Edge class and store your data (of arbitrary type) in these edges:

Edge<Long, Double> e = new Edge<Long, Double>(1L, 2L, 0.5);

Here 1L and 2L are ids of vertices, and 0.5 is an arbitrary data associated with this edge.

If you want to graph algorithms to use use data in these Tuple5 edges you will have to implement your own graph algorithms.

Ivan Mushketyk
  • 8,107
  • 7
  • 50
  • 67