-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Edge Weights #168
Comments
IMHO, edge weights are important for many applications and it is a key On Thu, Feb 26, 2015 at 8:49 AM, Ben McKown [email protected]
|
"IMHO, edge weights are important for many applications and it is a key trait WeightedDirectedGraph[+V <: Node] extends DirectedGraph[V] {
/**
* Labels on edges of this graph.
*/
var edgeLabels: Labels[(Int, Int)] = _
/**
* The label of an edge accessed by name. Label can be anything.
*/
def labelOfEdge[L : TypeTag](edgeId: (Int, Int), labelName: String): Option[L] = _
} |
Yes indeed. As an aside, there is a beginning of this feature in terms of Perhaps you can tell us a bit about what kind of edge labels will satisfy CC @szymonm On Wed, Dec 9, 2015 at 7:51 AM, Thomas [email protected] wrote:
|
I read that labels are suitable for nodes and edges so I used (Int, Int) keys and Long or True labels for my edges. I'm in the process of making it work but I think that I will a hard time querying labels with partial tuples (all labels with a given source node) In the end, it would be really useful to create an hash/id for each edge that would be used as key for the labels. |
Not sure I fully understand. May be make a class of these 7 labels and The best might be to point to your code if you can. On Wed, Dec 9, 2015 at 10:36 PM, Thomas [email protected] wrote:
|
How can I create an index by edge without using a tuple of (src.id, dst.id) ? By partial tuples, I meant that using (src.id, dst.id) as an index for edge, it's really tempting to try to the sum of incoming weights without using the graph representation itself. |
Everyone,
I wanted to find out the communal opinion on adding edge weights to cassovary. After having built out quite a few algorithms, it has become clear that these could be improved through the addition of edge weights to the graph structure. This may be as simple as adding a new Node type--maybe something like
and a new graph
class EdgeWeightedDirectedGraph extends DirectedGraph[EdgeWeightedNode]
Then I could update our algorithms to work with
EdgeWeightedDirectedGraph
s as well.I would love to hear some thoughts on this idea and see how we could best implement this. Thanks!
The text was updated successfully, but these errors were encountered: