Tabnine Logo
VertexMetrics
Code IndexAdd Tabnine to your IDE (free)

How to use
VertexMetrics
in
org.apache.flink.graph.library.metric.directed

Best Java code snippets using org.apache.flink.graph.library.metric.directed.VertexMetrics (Showing top 6 results out of 315)

origin: apache/flink

@Override
public GlobalClusteringCoefficient<K, VV, EV> run(Graph<K, VV, EV> input)
    throws Exception {
  super.run(input);
  triangleCount = new Count<>();
  DataSet<TriangleListing.Result<K>> triangles = input
    .run(new TriangleListing<K, VV, EV>()
      .setSortTriangleVertices(false)
      .setParallelism(parallelism));
  triangleCount.run(triangles);
  vertexMetrics = new VertexMetrics<K, VV, EV>()
    .setParallelism(parallelism);
  input.run(vertexMetrics);
  return this;
}
origin: org.apache.flink/flink-gelly_2.10

@Override
public Result getResult() {
  // each triangle must be counted from each of the three vertices
  // as each triplet is counted in this manner
  long numberOfTriangles = 3 * triangleCount.getResult();
  return new Result(vertexMetrics.getResult().getNumberOfTriplets(), numberOfTriangles);
}
origin: apache/flink

@Override
public DataSet plan(Graph<K, VV, EV> graph) throws Exception {
  switch (order.getValue()) {
    case DIRECTED:
      vertexMetrics = graph
        .run(new org.apache.flink.graph.library.metric.directed.VertexMetrics<K, VV, EV>()
          .setParallelism(parallelism.getValue().intValue()));
      edgeMetrics = graph
        .run(new org.apache.flink.graph.library.metric.directed.EdgeMetrics<K, VV, EV>()
          .setParallelism(parallelism.getValue().intValue()));
      break;
    case UNDIRECTED:
      vertexMetrics = graph
        .run(new org.apache.flink.graph.library.metric.undirected.VertexMetrics<K, VV, EV>()
          .setParallelism(parallelism.getValue().intValue()));
      edgeMetrics = graph
        .run(new org.apache.flink.graph.library.metric.undirected.EdgeMetrics<K, VV, EV>()
          .setParallelism(parallelism.getValue().intValue()));
      break;
  }
  return null;
}
origin: org.apache.flink/flink-gelly_2.11

@Override
public GlobalClusteringCoefficient<K, VV, EV> run(Graph<K, VV, EV> input)
    throws Exception {
  super.run(input);
  triangleCount = new Count<>();
  DataSet<TriangleListing.Result<K>> triangles = input
    .run(new TriangleListing<K, VV, EV>()
      .setSortTriangleVertices(false)
      .setParallelism(parallelism));
  triangleCount.run(triangles);
  vertexMetrics = new VertexMetrics<K, VV, EV>()
    .setParallelism(parallelism);
  input.run(vertexMetrics);
  return this;
}
origin: org.apache.flink/flink-gelly_2.10

@Override
public GlobalClusteringCoefficient<K, VV, EV> run(Graph<K, VV, EV> input)
    throws Exception {
  super.run(input);
  triangleCount = new Count<>();
  DataSet<TriangleListing.Result<K>> triangles = input
    .run(new TriangleListing<K, VV, EV>()
      .setSortTriangleVertices(false)
      .setLittleParallelism(littleParallelism));
  triangleCount.run(triangles);
  vertexMetrics = new VertexMetrics<K, VV, EV>()
    .setParallelism(littleParallelism);
  input.run(vertexMetrics);
  return this;
}
origin: com.alibaba.blink/flink-gelly

@Override
public GlobalClusteringCoefficient<K, VV, EV> run(Graph<K, VV, EV> input)
    throws Exception {
  super.run(input);
  triangleCount = new Count<>();
  DataSet<TriangleListing.Result<K>> triangles = input
    .run(new TriangleListing<K, VV, EV>()
      .setSortTriangleVertices(false)
      .setParallelism(parallelism));
  triangleCount.run(triangles);
  vertexMetrics = new VertexMetrics<K, VV, EV>()
    .setParallelism(parallelism);
  input.run(vertexMetrics);
  return this;
}
org.apache.flink.graph.library.metric.directedVertexMetrics

Javadoc

Compute the following vertex metrics in a directed graph. - number of vertices - number of edges - number of unidirectional edges - number of bidirectional edges - average degree - number of triplets - maximum degree - maximum out degree - maximum in degree - maximum number of triplets

Most used methods

  • <init>
  • setParallelism
    Override the operator parallelism.
  • getResult

Popular in Java

  • Reading from database using SQL prepared statement
  • setScale (BigDecimal)
  • setRequestProperty (URLConnection)
  • setContentView (Activity)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • ImageIO (javax.imageio)
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now