flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-1633) Add getTriplets() Gelly method
Date Mon, 16 Mar 2015 14:17:39 GMT

    [ https://issues.apache.org/jira/browse/FLINK-1633?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14363235#comment-14363235
] 

ASF GitHub Bot commented on FLINK-1633:
---------------------------------------

Github user andralungu commented on a diff in the pull request:

    https://github.com/apache/flink/pull/452#discussion_r26487168
  
    --- Diff: flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/example/EuclideanGraphExample.java
---
    @@ -0,0 +1,231 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *     http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +package org.apache.flink.graph.example;
    +
    +import org.apache.flink.api.common.ProgramDescription;
    +import org.apache.flink.api.common.functions.MapFunction;
    +import org.apache.flink.api.java.DataSet;
    +import org.apache.flink.api.java.ExecutionEnvironment;
    +import org.apache.flink.api.java.tuple.Tuple3;
    +import org.apache.flink.graph.Edge;
    +import org.apache.flink.graph.Graph;
    +import org.apache.flink.graph.Triplet;
    +import org.apache.flink.graph.Vertex;
    +import org.apache.flink.graph.example.utils.EuclideanGraphData;
    +
    +import java.io.Serializable;
    +
    +/**
    + * Given a directed, unweighted graph, with vertex values representing points in a plan,
    + * return a weighted graph where the edge weights are equal to the Euclidean distance
between the
    + * src and the trg vertex values.
    + *
    + * <p>
    + * Input files are plain text files and must be formatted as follows:
    + * <ul>
    + * 	<li> Vertices are represented by their vertexIds and vertex values and are
separated by newlines,
    + * 	the value being formed of two doubles separated by a comma.
    + * 	For example: <code>1,1.0,1.0\n2,2.0,2.0\n3,3.0,3.0\n</code> defines a
data set of three vertices
    + * 	<li> Edges are represented by triples of srcVertexId, srcEdgeId, weight which
are
    + * 	separated by commas. Edges themselves are separated by newlines. The initial edge
value will be overwritten.
    + * 	For example: <code>1,2,13.0\n1,3,6.0\n</code> defines two edges 1-2 and
1-3 having
    + * 	weights 13 and 6 respectively.
    + * </ul>
    + * </p>
    + *
    + * Usage <code>EuclideanDistanceExample &lt;vertex path&gt; &lt;edge
path&gt; &lt;result path&gt;</code><br>
    + * If no parameters are provided, the program is ran with default data from
    --- End diff --
    
    I know that's how it's written in the other examples, but according to my English, it's
"is ran".
    It's either
    "If no parameters are provided, run the program..." or "the program is ran with default
data" 
    
    But I can change it if it's a problem... 


> Add getTriplets() Gelly method
> ------------------------------
>
>                 Key: FLINK-1633
>                 URL: https://issues.apache.org/jira/browse/FLINK-1633
>             Project: Flink
>          Issue Type: New Feature
>          Components: Gelly
>    Affects Versions: 0.9
>            Reporter: Vasia Kalavri
>            Assignee: Andra Lungu
>            Priority: Minor
>              Labels: starter
>
> In some graph algorithms, it is required to access the graph edges together with the
vertex values of the source and target vertices. For example, several graph weighting schemes
compute some kind of similarity weights for edges, based on the attributes of the source and
target vertices. This issue proposes adding a convenience Gelly method that generates a DataSet
of <srcVertex, Edge, TrgVertex> triplets from the input graph.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message