public abstract class GraphReader
extends java.io.PushbackReader
Modifier and Type | Field and Description |
---|---|
protected int |
cabs
the absolute support in the complement
|
protected float |
crel
the relative support in the complement
|
protected java.lang.String |
desc
the description of the current graph
|
protected int |
edges
the number of edges of the current graph
|
protected Graph |
graph
the current graph
|
static int |
GRAPHS
read mode: graphs
|
protected int |
mode
the read mode
|
protected java.lang.String |
name
the name/identifier of the current graph
|
protected int |
nodes
the number of nodes of the current graph
|
protected Notation |
ntn
the notation for parsing graph descriptions
|
protected int |
sabs
the absolute support in the focus
|
protected float |
srel
the relative support in the focus
|
static int |
SUBS
read mode: substructures
|
protected float |
value
the value associated with the current graph
|
Modifier | Constructor and Description |
---|---|
protected |
GraphReader(java.io.Reader reader,
int mode)
Create a reader for a graph data set.
|
Modifier and Type | Method and Description |
---|---|
static GraphReader |
createReader(java.io.Reader reader,
int mode,
java.lang.String format)
Create a graph reader for a given format and mode.
|
int |
getAbsCompl()
Get the absolute complement support of the current substructure.
|
int |
getAbsSupp()
Get the absolute focus support of the current substructure.
|
java.lang.String |
getDesc()
Get a line description of the current graph.
|
int |
getEdgeCount()
Get the number of edges of the current graph.
|
Graph |
getGraph()
Get the current graph or substructure.
|
int |
getMode()
Get the mode of the graph reader.
|
java.lang.String |
getName()
Get the name of the current graph.
|
int |
getNodeCount()
Get the number of nodes of the current graph.
|
Notation |
getNotation()
Get the notation of the graph reader.
|
float |
getRelCompl()
Get the relative support of the current substructure.
|
float |
getRelSupp()
Get the relative focus support of the current substructure.
|
float |
getValue()
Get the value associated with the current graph.
|
abstract boolean |
readGraph()
Read a graph.
|
abstract boolean |
readHeader()
Read an (optional) header.
|
public static final int GRAPHS
public static final int SUBS
protected int mode
protected Notation ntn
protected java.lang.String name
protected java.lang.String desc
protected Graph graph
protected float value
protected int nodes
protected int edges
protected int sabs
protected float srel
protected int cabs
protected float crel
protected GraphReader(java.io.Reader reader, int mode)
reader
- the reader to read frommode
- the read modepublic int getMode()
public Notation getNotation()
public abstract boolean readHeader() throws java.io.IOException
java.io.IOException
- if an i/o error occurspublic abstract boolean readGraph() throws java.io.IOException
The next graph description is read and split into the graph
name/identifier, the graph description, the associated value
(only in mode GRAPHS
), and the support information
(only in mode SUBS
).
getName(), getDesc()
,
getValue()
etc.
java.io.IOException
- if an i/o error or a parse error occurspublic java.lang.String getName()
public java.lang.String getDesc()
public Graph getGraph() throws java.io.IOException
java.io.IOException
- if a parse error occurspublic int getNodeCount()
public int getEdgeCount()
public float getValue()
public int getAbsSupp()
public float getRelSupp()
public int getAbsCompl()
public float getRelCompl()
public static GraphReader createReader(java.io.Reader reader, int mode, java.lang.String format)
reader
- the reader to read frommode
- the read modeformat
- the name of the format/notation