Package it.unimi.dsi.webgraph.labelling
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 Summary
Constructors Constructor Description IntegerLabelFilter(String... keyAndvalues)
Creates a new integer-label filter.IntegerLabelFilter(String key, int... value)
Creates a new integer-label filter. -
Method Summary
-
Constructor Details
-
IntegerLabelFilter
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
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
Description copied from interface:Transform.LabelledArcFilter
Tells if the arc(i,j)
with labellabel
has to be accepted or not.- Specified by:
accept
in interfaceTransform.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.
-