Class IntegerLabelFilter

java.lang.Object
it.unimi.dsi.webgraph.labelling.IntegerLabelFilter
All Implemented Interfaces:
Transform.LabelledArcFilter

public class IntegerLabelFilter
extends Object
implements Transform.LabelledArcFilter
A filter for labelled graphs preserving those arcs whose integer labels are in a specified set.
Author:
Sebastiano Vigna
  • Constructor Details

    • IntegerLabelFilter

      public IntegerLabelFilter​(String key, int... value)
      Creates a new integer-label filter.
      Parameters:
      key - the key to be queried to filter an arc, or the empty string to query the well-known attribute.
      value - a list of values that will be preserved.
    • IntegerLabelFilter

      public IntegerLabelFilter​(String... keyAndvalues)
      Creates a new integer-label filter.
      Parameters:
      keyAndvalues - the key to be queried to filter an arc, or the empty string to query the well-known attribute, followed by a list of values that will be preserved.
  • Method Details

    • accept

      public boolean accept​(int i, int j, Label label)
      Description copied from interface: Transform.LabelledArcFilter
      Tells if the arc (i,j) with label label has to be accepted or not.
      Specified by:
      accept in interface Transform.LabelledArcFilter
      Parameters:
      i - the source of the arc.
      j - the destination of the arc.
      label - the label of the arc.
      Returns:
      if the arc has to be accepted.