public abstract class GraphWriter
extends java.io.BufferedWriter
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
write mode: graphs
|
protected int |
mode
the write mode
|
protected java.lang.String |
name
the name of the current graph
|
protected int |
nodes
the number of nodes of the current graph
|
protected Notation |
ntn
the notation for the graphs
|
protected int |
sabs
the absolute support in the focus
|
protected float |
srel
the relative support in the focus
|
static int |
SUBS
write mode: substructures
|
protected float |
value
the value associated with the current graph
|
Modifier | Constructor and Description |
---|---|
protected |
GraphWriter(java.io.Writer writer,
int mode)
Create a writer for a graph data set.
|
Modifier and Type | Method and Description |
---|---|
static GraphWriter |
createWriter(java.io.Writer writer,
int mode,
java.lang.String format)
Create a graph writer for a given format and mode.
|
int |
getMode()
Get the mode of the graph writer.
|
Notation |
getNotation()
Get the notation of the graph writer.
|
void |
setAbsCompl(int supp)
Set the absolute complement support of the current substructure.
|
void |
setAbsSupp(int supp)
Set the absolute focus support of the current substructure.
|
void |
setGraph(Graph graph)
Set the current graph or substructure.
|
void |
setName(java.lang.String name)
Set the name of the current graph.
|
void |
setRelCompl(float supp)
Set the relative complement support of the current substructure.
|
void |
setRelSupp(float supp)
Set the relative focus support of the current substructure.
|
void |
setValue(float value)
Set the value associated with the current graph.
|
abstract void |
writeGraph()
Write the current graph description.
|
abstract void |
writeHeader()
Write a 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 GraphWriter(java.io.Writer writer, int mode)
writer
- the writer to write tomode
- the write modepublic int getMode()
public Notation getNotation()
public void setName(java.lang.String name)
name
- the name of the current graphpublic void setGraph(Graph graph)
graph
- the graph or substructure to setpublic void setValue(float value)
value
- the value associated with the current graphpublic void setAbsSupp(int supp)
supp
- the absolute focus supportpublic void setRelSupp(float supp)
supp
- the relative focus supportpublic void setAbsCompl(int supp)
supp
- the absolute complement supportpublic void setRelCompl(float supp)
supp
- the relative complement supportpublic abstract void writeHeader() throws java.io.IOException
java.io.IOException
- if an i/o error occurspublic abstract void writeGraph() throws java.io.IOException
java.io.IOException
- if an i/o error occurspublic static GraphWriter createWriter(java.io.Writer writer, int mode, java.lang.String format)
writer
- the writer to write tomode
- the write modeformat
- the name of the format