Package moss
Class GraphWriter
java.lang.Object
java.io.Writer
java.io.BufferedWriter
moss.TableWriter
moss.GraphWriter
- All Implemented Interfaces:
Closeable
,Flushable
,Serializable
,Appendable
,AutoCloseable
- Direct Known Subclasses:
LineWriter
,NEListWriter
,SDfileWriter
Class for a writer for graph data sets.
- Since:
- 2007.02.24
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected int
the absolute support in the complementprotected float
the relative support in the complementprotected String
the description of the current graphstatic final int
read mode: whether graphs/substructures are directedprotected int
the number of edges of the current graphstatic final int
write mode mask: table input formatsprotected Graph
the current graphstatic final int
write mode: graphsprotected int
the write modeprotected String
the name of the current graphprotected int
the number of nodes of the current graphprotected Notation
the notation for the graphsprotected int
the absolute support in the focusprotected float
the relative support in the focusstatic final int
write mode: substructuresprotected float
the value associated with the current graphFields inherited from class moss.TableWriter
fldsep, HEADER, recsep
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
GraphWriter
(Writer writer, int mode) Create a writer for a graph data set. -
Method Summary
Modifier and TypeMethodDescriptionstatic GraphWriter
createWriter
(Writer writer, int mode, String format) Create a graph writer for a given format and mode.int
getMode()
Get the mode of the graph writer.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
Set the current graph or substructure.void
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
Write the current graph description.abstract void
Write a header.Methods inherited from class moss.TableWriter
setChars, writeField, writeField, writeField
-
Field Details
-
GRAPHS
public static final int GRAPHSwrite mode: graphs- See Also:
-
SUBS
public static final int SUBSwrite mode: substructures- See Also:
-
DIRECTED
public static final int DIRECTEDread mode: whether graphs/substructures are directed- See Also:
-
FMTMASK
public static final int FMTMASKwrite mode mask: table input formats- See Also:
-
mode
protected int modethe write mode -
ntn
the notation for the graphs -
name
the name of the current graph -
desc
the description of the current graph -
graph
the current graph -
value
protected float valuethe value associated with the current graph -
nodes
protected int nodesthe number of nodes of the current graph -
edges
protected int edgesthe number of edges of the current graph -
sabs
protected int sabsthe absolute support in the focus -
srel
protected float srelthe relative support in the focus -
cabs
protected int cabsthe absolute support in the complement -
crel
protected float crelthe relative support in the complement
-
-
Constructor Details
-
GraphWriter
Create a writer for a graph data set.- Parameters:
writer
- the writer to write tomode
- the write mode- Since:
- 2007.06.29 (Christian Borgelt)
-
-
Method Details
-
getMode
public int getMode()Get the mode of the graph writer.- Returns:
- the mode of the graph writer
- Since:
- 2007.03.04 (Christian Borgelt)
-
getNotation
Get the notation of the graph writer.- Returns:
- the notation of the graph writer
- Since:
- 2007.03.04 (Christian Borgelt)
-
setName
Set the name of the current graph.- Parameters:
name
- the name of the current graph- Since:
- 2007.03.04 (Christian Borgelt)
-
setGraph
Set the current graph or substructure.- Parameters:
graph
- the graph or substructure to set- Since:
- 2007.03.04 (Christian Borgelt)
-
setValue
public void setValue(float value) Set the value associated with the current graph.- Parameters:
value
- the value associated with the current graph- Since:
- 2007.03.04 (Christian Borgelt)
-
setAbsSupp
public void setAbsSupp(int supp) Set the absolute focus support of the current substructure.- Parameters:
supp
- the absolute focus support- Since:
- 2007.03.04 (Christian Borgelt)
-
setRelSupp
public void setRelSupp(float supp) Set the relative focus support of the current substructure.- Parameters:
supp
- the relative focus support- Since:
- 2007.03.04 (Christian Borgelt)
-
setAbsCompl
public void setAbsCompl(int supp) Set the absolute complement support of the current substructure.- Parameters:
supp
- the absolute complement support- Since:
- 2007.03.04 (Christian Borgelt)
-
setRelCompl
public void setRelCompl(float supp) Set the relative complement support of the current substructure.- Parameters:
supp
- the relative complement support- Since:
- 2007.03.04 (Christian Borgelt)
-
writeHeader
Write a header.- Throws:
IOException
- if an i/o error occurs- Since:
- 2007.03.04 (Christian Borgelt)
-
writeGraph
Write the current graph description.- Throws:
IOException
- if an i/o error occurs- Since:
- 2007.03.04 (Christian Borgelt)
-
createWriter
Create a graph writer for a given format and mode.- Parameters:
writer
- the writer to write tomode
- the write modeformat
- the name of the format- Returns:
- the created input/output format
- Since:
- 2007.03.04 (Christian Borgelt)
-