PGraph

scalation.database.graph.PGraph
class PGraph(val name: String, val vt: ArrayBuffer[VertexType], val et: ArrayBuffer[EdgeType], animating: Boolean, aniRatio: Double, width: Int, height: Int) extends Serializable

The PGraph class is used to store property graphs.

Value parameters

aniRatio

the ratio of simulation speed vs. animation speed

animating

whether to animate the model (defaults to false)

et

the set of edge-types

height

the height of the drawing canvas

name

the name of the property graph

vt

the set of vertex-types

width

the width of the drawing canvas

Attributes

Graph
Supertypes
trait Serializable
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def add_aniQ(aniCmd: AnimateCommand): Unit
def display(stop: Double): Unit

Display this property graph in 2D.

Display this property graph in 2D.

Value parameters

stop

the time to stop the animation

Attributes

def expandBoth(froms: ArrayBuffer[VertexType], ets: ArrayBuffer[EdgeType], tos: ArrayBuffer[VertexType], newName: String): PGraph

Returns a graph with containing relationships (edge-types) starting from the given set of vertex-types and ending at the given set of vertex-types { vt_from } - { et } -> { vt_to } FIX - complete implementation

Returns a graph with containing relationships (edge-types) starting from the given set of vertex-types and ending at the given set of vertex-types { vt_from } - { et } -> { vt_to } FIX - complete implementation

Value parameters

ets

the edge-types to traverse/retain

froms

the set of vertex-types the relationships start from

newName

the new name for the expanded graph

tos

the set of vertex-types the edges end at

Attributes

def expandIn(froms: ArrayBuffer[VertexType], ets: ArrayBuffer[EdgeType], to: VertexType, newName: String): PGraph

Returns a graph containing relationships (edge-types) starting from the given set of vertex-types and ending at the given vertex-type { vt_from } - { et } -> vt_to

Returns a graph containing relationships (edge-types) starting from the given set of vertex-types and ending at the given vertex-type { vt_from } - { et } -> vt_to

Value parameters

ets

the edge-types to traverse/retain

froms

the set of vertex-type the relationship is expanding into

newName

the new name for the expanded graph

to

the ending vertex-type

Attributes

def expandOut(from: VertexType, ets: ArrayBuffer[EdgeType], tos: ArrayBuffer[VertexType], newName: String): PGraph

Returns a graph containing relationships (edge-types) starting from the given vertex-type and ending at the given set of vertex-types vt_from - { et } -> { vt_to }

Returns a graph containing relationships (edge-types) starting from the given vertex-type and ending at the given set of vertex-types vt_from - { et } -> { vt_to }

Value parameters

ets

the edge-types to traverse/retain

from

the starting vertex-type

newName

the new name for the expanded graph

tos

the set of vertex-types the edges end at

Attributes

def join(g2: PGraph, vt1: VertexType, vt2: VertexType, newName: String): PGraph

Join two subgraphs on the specified vertex-types It combines the two graphs such that all vertices are from both the graphs exist in the new graph but with only unique vertices from specified vertex-types we are joining on. All the edges-types from the two subgraphs are present in the new graph. The edge-types from the other graph, that join the vertex-type that we are joining on are updated to relate new joined vertex-type starting from the given vertex-type and ending at the given set of vertex-types

Join two subgraphs on the specified vertex-types It combines the two graphs such that all vertices are from both the graphs exist in the new graph but with only unique vertices from specified vertex-types we are joining on. All the edges-types from the two subgraphs are present in the new graph. The edge-types from the other graph, that join the vertex-type that we are joining on are updated to relate new joined vertex-type starting from the given vertex-type and ending at the given set of vertex-types

Value parameters

g2

the other (sub)graph to join this graph with

newName

the new name for the joined graph

vt1

the vertex-type in this graph that we are joining on

vt2

the vertex-type in the other graph that we are joining on

Attributes

def setAniDone(): Unit

Set the animation flag (that is private) to done.

Set the animation flag (that is private) to done.

Attributes

def show(): Unit

SHOW/print this property graph.

SHOW/print this property graph.

Attributes

override def toString: String

Convert this property graph to a string.

Convert this property graph to a string.

Attributes

Definition Classes
Any
def updateNameMaps(): Unit

Update the name maps, vmap and emap, after constructing this property graph.

Update the name maps, vmap and emap, after constructing this property graph.

Attributes

Concrete fields

val emap: Map[String, EdgeType]
val et: ArrayBuffer[EdgeType]
val name: String
val vmap: Map[String, VertexType]
val vt: ArrayBuffer[VertexType]