public class EuclideanGraphWeighing extends Object implements ProgramDescription
Graph.getTriplets()
and
Graph.joinWithEdges(DataSet, EdgeJoinFunction)
methods.
Given a directed, unweighted graph, with vertex values representing points in a plain, return a weighted graph where the edge weights are equal to the Euclidean distance between the src and the trg vertex values.
Input files are plain text files and must be formatted as follows:
1,1.0,1.0\n2,2.0,2.0\n3,3.0,3.0\n
defines a data set of three vertices
1,2\n1,3\n
defines two edges 1-2 and 1-3.
Usage EuclideanGraphWeighing <vertex path> <edge path> <result path>
If no parameters are provided, the program is run with default data from
EuclideanGraphData
Modifier and Type | Class and Description |
---|---|
static class |
EuclideanGraphWeighing.Point
A simple two-dimensional point.
|
Constructor and Description |
---|
EuclideanGraphWeighing() |
Modifier and Type | Method and Description |
---|---|
String |
getDescription()
Returns a description of the plan that is generated by the assembler and
also of the arguments if they are available.
|
static void |
main(String[] args) |
public String getDescription()
ProgramDescription
getDescription
in interface ProgramDescription
Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.