Graph0

scalation.database.graph_pm.Graph0
case class Graph0(ch: Array[Set[Int]], label: Array[ValueType], inverse: Boolean, name: String) extends Cloneable

Value parameters

ch

the array of child (adjacency) vertex sets (outgoing edges)

inverse

whether to store inverse adjacency sets (parents)

label

the array of vertex labels: v -> vertex label

name

the name of the digraph

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Cloneable
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def addPar(): Unit

Add the inverse adjacency sets for rapid accesses to parent vertices.

Add the inverse adjacency sets for rapid accesses to parent vertices.

Attributes

def addVertices(g: Graph, vset: Set[Int], makeMap: Boolean): (Array[ValueType], Map[Int, Int])

Create an array vertices from selected vertices from graph g, those in vset. If makeMap, record the mapping between g's vertices and the new vertices.

Create an array vertices from selected vertices from graph g, those in vset. If makeMap, record the mapping between g's vertices and the new vertices.

Value parameters

g

graph to be used for adding vertex labels

makeMap

whether to make a map from new vertex id's to old vertex id's

vset

selected vertices from graph g

Attributes

def buildId: Array[Int]

Create an array [1, 2, ..., size] for default values for id's.

Create an array [1, 2, ..., size] for default values for id's.

Attributes

def buildLabelMap(label: Array[ValueType]): Map[ValueType, Set[Int]]

Given an array of labels, return an index from labels to the sets of vertices containing those labels.

Given an array of labels, return an index from labels to the sets of vertices containing those labels.

Value parameters

label

the array of vertex labels

Attributes

def checkEdges: Boolean

Check whether the end-point vertex id of each edge is within bounds: 0 .. maxId.

Check whether the end-point vertex id of each edge is within bounds: 0 .. maxId.

Attributes

override def clone: Graph0

Clone (make a deep copy) of this digraph.

Clone (make a deep copy) of this digraph.

Attributes

Definition Classes
Object
override def equals(g2_: Any): Boolean

To check if two graphs are equal.

To check if two graphs are equal.

Value parameters

g2_

the graph to be compared with this graph

Attributes

Definition Classes
Equals -> Any

Make this directed graph work like an undirected graph by making sure that for every edge u -> v, there is a v -> u edge and that they have same edge label.

Make this directed graph work like an undirected graph by making sure that for every edge u -> v, there is a v -> u edge and that they have same edge label.

Attributes

def nEdges: Int

Return the number of edges in this digraph.

Return the number of edges in this digraph.

Attributes

def printG(clip: Boolean): Unit

Print this digraph in a deep sense with all the information.

Print this digraph in a deep sense with all the information.

Value parameters

clip

whether to clip out "Set(" and ")"

Attributes

def size: Int

Return the size of graph in terms of the number of vertices.

Return the size of graph in terms of the number of vertices.

Attributes

def toLine(i: Int): String

Convert the i'th row/line of this digraph to a string.

Convert the i'th row/line of this digraph to a string.

Value parameters

i

the i'th row/line

Attributes

override def toString: String

Convert this digraph to a string in a shallow sense. Large arrays are not converted. Use print to show all information.

Convert this digraph to a string in a shallow sense. Large arrays are not converted. Use print to show all information.

Attributes

Definition Classes
Any

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product

Concrete fields

val count: Map[(ValueType, ValueType, Int), Int]
val edgeMap: Map[ValueType, Set[(Int, Int)]]
val id: Array[Int]
val indexMap: Map[(ValueType, ValueType), Set[Int]]
val labelMap: Map[ValueType, Set[Int]]
val pa: Array[Set[Int]]