|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuchicago.src.sim.network.ASCIIFormatter
public class ASCIIFormatter
Formats AdjacencyMatrices into a comma delimited plain text format. This
can be used by a NetworkRecorder to record network in a
plain text format. In this format network data looks like:
If a network has no label names, comma-delimited empty strings will be used.
For example,
matrix label: _label_
,node_label_0, node_label_1, ...
node_label_0, data_00, data_01, ...
node_label_1, data_10, data_11, ...
...
matrix label: mLabel
,,,,,
,0,1,0,0,0
,0,0,1,0,0
,0,0,0,1,0
,0,0,0,0,1
,0,0,0,0,0
This format intended as a substitute for the excel format given the
exceedingly long time it takes to write to an excel file. Data in this
format is easily imported into excel such that the actual matrix will begin
in cell B:2.
| Constructor Summary | |
|---|---|
ASCIIFormatter()
|
|
| Method Summary | |
|---|---|
void |
format(java.util.List matrixLabels,
java.util.Vector matrices,
java.lang.String comment)
Formats the specified matrices together with the labels, and comment |
java.lang.String |
getHeader()
Returns the block header for the matrices formatter in comment. |
java.util.Vector |
getMatrices()
Returns a Vector of appropriately Strings representing the matrices. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ASCIIFormatter()
| Method Detail |
|---|
public void format(java.util.List matrixLabels,
java.util.Vector matrices,
java.lang.String comment)
format in interface NetworkMatrixFormattermatrixLabels - the labels of the matricesmatrices - a Vector of AdjacencyMatricescomment - an optional commentpublic java.lang.String getHeader()
getHeader in interface NetworkMatrixFormatterpublic java.util.Vector getMatrices()
getMatrices in interface NetworkMatrixFormatter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||