Package es.uam.eps.ir.relison.io.graph
Interface GraphWriter<V>
- Type Parameters:
V
- type of the vertices.
- All Known Implementing Classes:
BinaryGraphWriter
,PajekGraphWriter
,TextGraphWriter
public interface GraphWriter<V>
Interface for graph writers.
-
Method Summary
Modifier and Type Method Description boolean
write(Graph<V> graph, java.io.OutputStream file)
Writes a graph into an output stream.boolean
write(Graph<V> graph, java.io.OutputStream file, boolean writeWeights, boolean writeTypes)
Writes a graph into a output stream.boolean
write(Graph<V> graph, java.lang.String file)
Writes a graph into a file.boolean
write(Graph<V> graph, java.lang.String file, boolean writeWeights, boolean writeTypes)
Writes a graph into a file.
-
Method Details
-
write
Writes a graph into a file. It writes the weights, but not the types- Parameters:
graph
- The graph we want to write.file
- The file.- Returns:
- true if everything went OK, false otherwise.
-
write
Writes a graph into an output stream. It writes the weights, but not the types.- Parameters:
graph
- The graph we want to write.file
- The output stream.- Returns:
- true if everything went OK, false otherwise.
-
write
Writes a graph into a file. Simple graphs types are written, while multigraph types are not.- Parameters:
graph
- The graph we want to write.file
- The file.writeWeights
- Indicates if weights have to be written.writeTypes
- Indicates if types have to be written.- Returns:
- true if everything is ok, false otherwise.
-
write
Writes a graph into a output stream. Simple graphs types are written, while multigraph types are not.- Parameters:
graph
- The graph we want to write.file
- The file.writeWeights
- Indicates if weights have to be written.writeTypes
- Indicates if types have to be written.- Returns:
- true if everything is ok, false otherwise.
-