Interface Sampler<V>

Type Parameters:
V - type of the vertices

public interface Sampler<V>
Interface for all the classes that generate subsamples from a graph.
  • Method Summary

    Modifier and Type Method Description
    Graph<V> sample​(Graph<V> fullGraph, double percentage)
    Generates a subsample from a graph.
    Graph<V> sample​(Graph<V> fullGraph, int num)
    Generates a subsample from a graph.
  • Method Details

    • sample

      Graph<V> sample​(Graph<V> fullGraph, double percentage)
      Generates a subsample from a graph.
      Parameters:
      fullGraph - graph from which we extract the subsample.
      percentage - percentage of nodes/edges to extract (depending on the method).
      Returns:
      the required subsample, or null if an error ocurred.
    • sample

      Graph<V> sample​(Graph<V> fullGraph, int num)
      Generates a subsample from a graph.
      Parameters:
      fullGraph - graph from which we extract the subsample.
      num - the exact number of nodes/edges to extract.
      Returns:
      the required subsample, or null if an error ocurred.