TripleGraph

scalation.database.triplegraph.TripleGraph
case class TripleGraph(label: Array[ValueType], triples: ArrayBuffer[Triple], name: String, schema: Array[String]) extends Cloneable

Value parameters

label

the array of vertex labels

name

the name of the triple-graph

schema

optional schema: map from label to label type

triples

the bag of triples in the triple-graph

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 buildElabelMap: Map[(Int, Int), Set[ValueType]]

Build a map from a vertex pair (u, v) to the set relations/edge-labels on edges connecting vertex u to v.

Build a map from a vertex pair (u, v) to the set relations/edge-labels on edges connecting vertex u to v.

Attributes

def buildIndices(): Unit

Build the indices. FIX - add edges to existing set

Build the indices. FIX - add edges to existing set

Attributes

def buildLabelMap: Map[ValueType, Set[Int]]

Build a map from vertex labels to the sets of vertices containing those labels.

Build a map from vertex labels to the sets of vertices containing those labels.

Attributes

def ch(h: Int): Set[Int]

Return the tail vertices in the triples (h, *, ?).

Return the tail vertices in the triples (h, *, ?).

Value parameters

h

the head vertex

Attributes

def children(h: Int, r: ValueType): Set[Int]

Return the tail vertices in the triples (h, r, ?).

Return the tail vertices in the triples (h, r, ?).

Value parameters

h

the head vertex

r

the relation/edge label

Attributes

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
def parents(t: Int, r: ValueType): Set[Int]

Return the head vertices in the triples (?, r, t).

Return the head vertices in the triples (?, r, t).

Value parameters

r

the relation/edge label

t

the tail vertex

Attributes

def printG(clip: Boolean): Unit

Print this triple-graph in a deep sense with all the information.

Print this triple-graph in a deep sense with all the information.

Value parameters

clip

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

Attributes

def size: Int

Return the size in terms of the vertices.

Return the size in terms of the vertices.

Attributes

override def toString: String

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

Convert this triple-graph 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 elabelMap: Map[(Int, Int), Set[ValueType]]
val hindex: Map[Int, Set[Triple]]
val labelMap: Map[ValueType, Set[Int]]
val tindex: Map[Int, Set[Triple]]