Class DLMatrixReader
- java.lang.Object
-
- repast.simphony.context.space.graph.DLMatrixReader
-
- All Implemented Interfaces:
NetworkMatrixReader
public class DLMatrixReader extends Object implements NetworkMatrixReader
Matrix reader for UCINET dl format files. This will only read square matrices whose rows and columns refer to the same nodes.- Version:
- $Revision: 1.5 $ $Date: 2004/11/03 19:51:00 $
- Author:
- Nick Collier
-
-
Constructor Summary
Constructors Constructor Description DLMatrixReader(InputStream stream)
Creates a DlRedaer to read from the specified InputStream.DLMatrixReader(String filename)
Creates a DlReader to read the specified file.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Closes the reader.List<AdjacencyMatrix>
getMatrices()
Returns a list of the read AdjacencyMatrices.
-
-
-
Constructor Detail
-
DLMatrixReader
public DLMatrixReader(String filename) throws IOException
Creates a DlReader to read the specified file.- Parameters:
filename
- the name of the file to read (in dl format)- Throws:
IOException
- if the file cannot be read.
-
DLMatrixReader
public DLMatrixReader(InputStream stream)
Creates a DlRedaer to read from the specified InputStream.- Parameters:
stream
- the InputStream to read from.
-
-
Method Detail
-
getMatrices
public List<AdjacencyMatrix> getMatrices() throws IOException
Returns a list of the read AdjacencyMatrices.- Specified by:
getMatrices
in interfaceNetworkMatrixReader
- Returns:
- a list of the read AdjacencyMatrices.
- Throws:
IOException
- if there is an error while attempting to read the matrices
-
close
public void close()
Closes the reader.- Specified by:
close
in interfaceNetworkMatrixReader
-
-