|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.unimi.dsi.webgraph.Transform.NodeClassFilter
public static final class Transform.NodeClassFilter
An arc filter that only accepts arcs whose endpoints belong to the same
(if the parameter keepOnlySame
is true) or to
different (if keepOnlySame
is false) classes.
Classes are specified by one integer per node, read from a given file in DataInput
format.
Constructor Summary | |
---|---|
Transform.NodeClassFilter(String classFile,
boolean keepOnlySame)
Creates a new instance. |
|
Transform.NodeClassFilter(String classFile,
String keepOnlySame)
Creates a new instance. |
Method Summary | |
---|---|
boolean |
accept(int i,
int j)
Tells if the arc (i,j) has to be accepted or not. |
boolean |
accept(int i,
int j,
Label label)
Tells if the arc (i,j) with label label has to be accepted or not. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Transform.NodeClassFilter(String classFile, boolean keepOnlySame)
classFile
- name of the class file.keepOnlySame
- whether to keep nodes in the same class.public Transform.NodeClassFilter(String classFile, String keepOnlySame)
This constructor has the same arguments as #NodeClassFilter(String,boolean)
,
but it can be used with an ObjectParser
.
classFile
- name of the class file.keepOnlySame
- whether to keep nodes in the same class.Method Detail |
---|
public boolean accept(int i, int j)
Transform.ArcFilter
(i,j)
has to be accepted or not.
accept
in interface Transform.ArcFilter
i
- the source of the arc.j
- the destination of the arc.
public boolean accept(int i, int j, Label label)
Transform.LabelledArcFilter
(i,j)
with label label
has to be accepted or not.
accept
in interface Transform.LabelledArcFilter
i
- the source of the arc.j
- the destination of the arc.label
- the label of the arc.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |