public class EdgeListReader extends GraphReaderAdapter implements GraphReader
Constructor and Description |
---|
EdgeListReader() |
Modifier and Type | Method and Description |
---|---|
DirectedGraph<DirectedEdge> |
readDirected(File f)
Reads in the directed graph from the provided file
|
DirectedGraph<DirectedEdge> |
readDirected(File f,
Indexer<String> vertexIndexer)
Reads in the directed graph from the provided file, using the specified
Indexer to decide how vertex labels in the file are mapped to
numeric vertices. |
DirectedMultigraph<String> |
readDirectedMultigraph(File f)
Reads in the directed multigraph from the provided file.
|
DirectedMultigraph<String> |
readDirectedMultigraph(File f,
Indexer<String> vertexIndexer)
Reads in the graph from the provided file, using the specified
Indexer to decide how vertex labels in the file are mapped to numeric
vertices. |
Graph<Edge> |
readUndirected(File f)
Reads in the graph from the provided file
|
Graph<Edge> |
readUndirected(File f,
Indexer<String> vertexIndexer)
Reads in the graph from the provided file, using the specified
Indexer to decide how vertex labels in the file are mapped to numeric
vertices. |
Graph<Edge> |
readUndirectedFromWeighted(File f,
Indexer<String> vertexIndexer,
double minWeight)
Reads in an undirected network from a file containing weighted edges,
only keeping those undirected edges whose weight was above the specified
threshold
|
UndirectedMultigraph<String> |
readUndirectedMultigraph(File f)
Reads in the multigraph from the provided file
|
UndirectedMultigraph<String> |
readUndirectedMultigraph(File f,
Indexer<String> vertexIndexer)
Reads in the multigraph from the provided file, using the specified
Indexer to decide how vertex labels in the file are mapped to
numeric vertices. |
WeightedGraph<WeightedEdge> |
readWeighted(File f)
Reads in the weighted graph from the provided file.
|
WeightedGraph<WeightedEdge> |
readWeighted(File f,
Indexer<String> vertexIndexer)
Reads in the weighted graph from the provided file, using the specified
Indexer to decide how vertex labels in the file are mapped to
numeric vertices. |
WeightedGraph<WeightedEdge> |
readWeighted(File f,
Indexer<String> vertexIndexer,
double minWeight)
Reads in the graph from the provided file, using the specified
Indexer to decide how vertex labels in the file are mapped to numeric
vertices, and keeping only those weights above the specified value. |
public Graph<Edge> readUndirected(File f) throws IOException
GraphReaderAdapter
readUndirected
in interface GraphReader
readUndirected
in class GraphReaderAdapter
IOException
- if any error occurs while reading the filepublic Graph<Edge> readUndirected(File f, Indexer<String> vertexIndexer) throws IOException
GraphReaderAdapter
Indexer
to decide how vertex labels in the file are mapped to numeric
vertices. The state of the indexer may be updated as a result of this
call. Providing an initially-empty Indexer
allows the caller to
identify which labels were present in the file initially.readUndirected
in interface GraphReader
readUndirected
in class GraphReaderAdapter
vertexIndexer
- the mapping to use when converting form label to
vertex ordinalIOException
- if any error occurs while reading the filepublic WeightedGraph<WeightedEdge> readWeighted(File f) throws IOException
GraphReaderAdapter
readWeighted
in interface GraphReader
readWeighted
in class GraphReaderAdapter
IOException
- if any error occurs while reading the filepublic WeightedGraph<WeightedEdge> readWeighted(File f, Indexer<String> vertexIndexer) throws IOException
GraphReaderAdapter
Indexer
to decide how vertex labels in the file are mapped to
numeric vertices. The state of the indexer may be updated as a result of
this call. Providing an initially-empty Indexer
allows the
caller to identify which labels were present in the file initially.readWeighted
in interface GraphReader
readWeighted
in class GraphReaderAdapter
vertexIndexer
- the mapping to use when converting form label to
vertex ordinalIOException
- if any error occurs while reading the filepublic WeightedGraph<WeightedEdge> readWeighted(File f, Indexer<String> vertexIndexer, double minWeight) throws IOException
GraphReaderAdapter
Indexer
to decide how vertex labels in the file are mapped to numeric
vertices, and keeping only those weights above the specified value. The
state of the indexer may be updated as a result of this call. Providing
an initially-empty Indexer
allows the caller to identify which
labels were present in the file initially.readWeighted
in interface GraphReader
readWeighted
in class GraphReaderAdapter
vertexIndexer
- the mapping to use when converting form label to
vertex ordinalminWeight
- the minimum weight for any edge in f
to have if
it is to be added to the returned weighted graph.IOException
- if any error occurs while reading the filepublic Graph<Edge> readUndirectedFromWeighted(File f, Indexer<String> vertexIndexer, double minWeight) throws IOException
readUndirectedFromWeighted
in interface GraphReader
readUndirectedFromWeighted
in class GraphReaderAdapter
vertexIndexer
- the mapping to use when converting form label to
vertex ordinalminWeight
- the minimum weight for any edge in f
to have if
it is to be added to the returned graph.IOException
- if any error occurs while reading the filepublic DirectedGraph<DirectedEdge> readDirected(File f) throws IOException
GraphReaderAdapter
readDirected
in interface GraphReader
readDirected
in class GraphReaderAdapter
IOException
- if any error occurs while reading the filepublic DirectedGraph<DirectedEdge> readDirected(File f, Indexer<String> vertexIndexer) throws IOException
GraphReaderAdapter
Indexer
to decide how vertex labels in the file are mapped to
numeric vertices. The state of the indexer may be updated as a result of
this call. Providing an initially-empty Indexer
allows the
caller to identify which labels were present in the file initially.readDirected
in interface GraphReader
readDirected
in class GraphReaderAdapter
vertexIndexer
- the mapping to use when converting form label to
vertex ordinalIOException
- if any error occurs while reading the filepublic DirectedMultigraph<String> readDirectedMultigraph(File f) throws IOException
GraphReaderAdapter
readDirectedMultigraph
in interface GraphReader
readDirectedMultigraph
in class GraphReaderAdapter
IOException
- if any error occurs while reading the filepublic DirectedMultigraph<String> readDirectedMultigraph(File f, Indexer<String> vertexIndexer) throws IOException
GraphReaderAdapter
Indexer
to decide how vertex labels in the file are mapped to numeric
vertices. The state of the indexer may be updated as a result of this
call. Providing an initially-empty Indexer
allows the caller to
identify which labels were present in the file initially.readDirectedMultigraph
in interface GraphReader
readDirectedMultigraph
in class GraphReaderAdapter
vertexIndexer
- the mapping to use when converting form label to
vertex ordinalIOException
- if any error occurs while reading the filepublic UndirectedMultigraph<String> readUndirectedMultigraph(File f) throws IOException
GraphReaderAdapter
readUndirectedMultigraph
in interface GraphReader
readUndirectedMultigraph
in class GraphReaderAdapter
IOException
- if any error occurs while reading the filepublic UndirectedMultigraph<String> readUndirectedMultigraph(File f, Indexer<String> vertexIndexer) throws IOException
GraphReader
Indexer
to decide how vertex labels in the file are mapped to
numeric vertices. The state of the indexer may be updated as a result of
this call. Providing an initially-empty Indexer
allows the
caller to identify which labels were present in the file initially.readUndirectedMultigraph
in interface GraphReader
readUndirectedMultigraph
in class GraphReaderAdapter
vertexIndexer
- the mapping to use when converting form label to
vertex ordinalIOException
- if any error occurs while reading the fileCopyright © 2012. All Rights Reserved.