GraphIO

scalation.database.graph_pm.GraphIO
See theGraphIO companion class
object GraphIO

The GraphIO object is the companion object to the GraphIO class and is used for reading graphs from files or graph databases.

Attributes

Companion
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
GraphIO.type

Members list

Value members

Concrete methods

def apply(name: String, base: String, ext: String, sep: Char): Graph

Read a digraph from a file based on the format used by 'print' and 'write': Graph ( , , ,

Read a digraph from a file based on the format used by 'print' and 'write': Graph ( , , ,

Value parameters

base

the base sub-directory for storing graphs

ext

the standard file extension for graph

name

the file-name containing the graph's vertex, edge and label information

sep

the character separating the values (e.g., ',', ' ', '\t')

Attributes

def makeSet(strArr: Array[String]): Set[Int]

Make a set of child vertices '(v_0, v_1, ...)' from a string array.

Make a set of child vertices '(v_0, v_1, ...)' from a string array.

Value parameters

strArr

the string array

Attributes

def makeTuple(strArr: Array[String]): (Int, Int)

Make an edge tuple '(u, v)' from a string array.

Make an edge tuple '(u, v)' from a string array.

Value parameters

strArr

the string array

Attributes

def read2Files(lFile: String, eFile: String, inverse: Boolean): Graph

Read a graph from TWO files: 'lFile' is a file with one label per line, where each line represents the vertex with id . 'eFile' is a file with each line representing the vertex with id , and each line contains a space-separated list of vertices to which the current vertex is adjacent.

Read a graph from TWO files: 'lFile' is a file with one label per line, where each line represents the vertex with id . 'eFile' is a file with each line representing the vertex with id , and each line contains a space-separated list of vertices to which the current vertex is adjacent.

Value parameters

eFile

the file the edges (to create adjacency sets)

inverse

whether to store inverse adjacency sets (parents)

lFile

the file containing the graph labels

Attributes

def read2PajekFile(lFile: String, eFile: String, inverse: Boolean): Graph

Read a graph from TWO specially formatted Pajek files.

Read a graph from TWO specially formatted Pajek files.

Value parameters

eFile

the file the edges (to create adjacency sets)

inverse

whether to store inverse adjacency sets (parents)

lFile

the file containing the graph labels

Attributes

def toLabel(s: String, typeSel: Char): ValueType

Convert a string into a label according to the type selector.

Convert a string into a label according to the type selector.

Value parameters

s

the string to convert

typeSel

the type selector

Attributes

Concrete fields

val EXT: String