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 java.lang.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(java.lang.String... keyAndvalues)Creates a new integer-label filter.IntegerLabelFilter(java.lang.String key, int... value)Creates a new integer-label filter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaccept(int i, int j, Label label)Tells if the arc(i,j)with labellabelhas to be accepted or not.
-
-
-
Constructor Detail
-
IntegerLabelFilter
public IntegerLabelFilter(java.lang.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(java.lang.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 Detail
-
accept
public boolean accept(int i, int j, Label label)Description copied from interface:Transform.LabelledArcFilterTells if the arc(i,j)with labellabelhas to be accepted or not.- Specified by:
acceptin 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.
-
-