public interface GraphReader
Graph
instances for a variety of
formats.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> vertexLabels)
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> vertexLabels)
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> vertexLabels)
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> vertexLabels,
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> vertexLabels)
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> vertexLabels)
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> vertexLabels,
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. |
Graph<Edge> readUndirected(File f) throws IOException
IOException
- if any error occurs while reading the fileGraph<Edge> readUndirected(File f, Indexer<String> vertexLabels) throws IOException
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.vertexLabels
- the mapping to use when converting form label to
vertex ordinalIOException
- if any error occurs while reading the fileWeightedGraph<WeightedEdge> readWeighted(File f) throws IOException
IOException
- if any error occurs while reading the fileWeightedGraph<WeightedEdge> readWeighted(File f, Indexer<String> vertexLabels) throws IOException
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.vertexLabels
- the mapping to use when converting form label to
vertex ordinalIOException
- if any error occurs while reading the fileWeightedGraph<WeightedEdge> readWeighted(File f, Indexer<String> vertexLabels, double minWeight) throws IOException
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.vertexLabels
- 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 fileGraph<Edge> readUndirectedFromWeighted(File f, Indexer<String> vertexLabels, double minWeight) throws IOException
vertexLabels
- 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 fileDirectedGraph<DirectedEdge> readDirected(File f) throws IOException
IOException
- if any error occurs while reading the fileDirectedGraph<DirectedEdge> readDirected(File f, Indexer<String> vertexLabels) throws IOException
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.vertexLabels
- the mapping to use when converting form label to
vertex ordinalIOException
- if any error occurs while reading the fileDirectedMultigraph<String> readDirectedMultigraph(File f) throws IOException
IOException
- if any error occurs while reading the fileDirectedMultigraph<String> readDirectedMultigraph(File f, Indexer<String> vertexLabels) throws IOException
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.vertexLabels
- the mapping to use when converting form label to
vertex ordinalIOException
- if any error occurs while reading the fileUndirectedMultigraph<String> readUndirectedMultigraph(File f) throws IOException
IOException
- if any error occurs while reading the fileUndirectedMultigraph<String> readUndirectedMultigraph(File f, Indexer<String> vertexLabels) throws IOException
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.vertexLabels
- the mapping to use when converting form label to
vertex ordinalIOException
- if any error occurs while reading the fileCopyright © 2012. All Rights Reserved.