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

    https://github.com/apache/flink/pull/452#discussion_r26928420
  
    --- Diff: 
flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/example/EuclideanGraphExample.java
 ---
    @@ -0,0 +1,214 @@
    +/*
    + * 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.Tuple2;
    +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.
    --- End diff --
    
    Hey @andralungu! Sorry for not noticing this earlier, but why give a 
weighted edge as input if you're going to override the weight anyway?
    And in the beginning of the description, you refer to an unweighted graph.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to