Class PajekGraphWriter<U extends java.io.Serializable>

java.lang.Object
es.uam.eps.ir.relison.io.graph.PajekGraphWriter<U>
Type Parameters:
U - Type of the users
All Implemented Interfaces:
GraphWriter<U>

public class PajekGraphWriter<U extends java.io.Serializable>
extends java.lang.Object
implements GraphWriter<U>
Writes the graph in the Pajek format. Note: this format does support
  • Constructor Summary

    Constructors 
    Constructor Description
    PajekGraphWriter()  
  • Method Summary

    Modifier and Type Method Description
    boolean write​(Graph<U> graph, java.io.OutputStream file)
    Writes a graph into an output stream.
    boolean write​(Graph<U> graph, java.io.OutputStream file, boolean writeWeights, boolean writeTypes)
    Writes a graph into a output stream.
    boolean write​(Graph<U> graph, java.lang.String file)
    Writes a graph into a file.
    boolean write​(Graph<U> graph, java.lang.String file, boolean writeWeights, boolean writeTypes)
    Writes a graph into a file.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • write

      public boolean write​(Graph<U> graph, java.lang.String file)
      Description copied from interface: GraphWriter
      Writes a graph into a file. It writes the weights, but not the types
      Specified by:
      write in interface GraphWriter<U extends java.io.Serializable>
      Parameters:
      graph - The graph we want to write.
      file - The file.
      Returns:
      true if everything went OK, false otherwise.
    • write

      public boolean write​(Graph<U> graph, java.io.OutputStream file)
      Description copied from interface: GraphWriter
      Writes a graph into an output stream. It writes the weights, but not the types.
      Specified by:
      write in interface GraphWriter<U extends java.io.Serializable>
      Parameters:
      graph - The graph we want to write.
      file - The output stream.
      Returns:
      true if everything went OK, false otherwise.
    • write

      public boolean write​(Graph<U> graph, java.lang.String file, boolean writeWeights, boolean writeTypes)
      Description copied from interface: GraphWriter
      Writes a graph into a file. Simple graphs types are written, while multigraph types are not.
      Specified by:
      write in interface GraphWriter<U extends java.io.Serializable>
      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

      public boolean write​(Graph<U> graph, java.io.OutputStream file, boolean writeWeights, boolean writeTypes)
      Description copied from interface: GraphWriter
      Writes a graph into a output stream. Simple graphs types are written, while multigraph types are not.
      Specified by:
      write in interface GraphWriter<U extends java.io.Serializable>
      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.