spo.src.Generator
Class Relation

java.lang.Object
  |
  +--spo.src.Generator.Relation

public class Relation
extends java.lang.Object

A class that generates SPO relations for the SPO data management system Overall Constraints: # of random variables: 200 # of elements in context: <= 6 # of elements in conditional: <= 3 random variables: CS100 ~ CS299 context elements: year, semester, major, college, instructor, comments


Field Summary
(package private)  char CHAR_START
           
(package private)  int cond
           
(package private)  int cont
           
(package private)  int CONTEXT_LEN
           
(package private)  int m
           
(package private)  int n
           
(package private) static float PERCENT
           
(package private)  int size
           
(package private) static char TYPE
           
(package private)  int VAR_LEN
           
(package private)  int VAR_RATIO
           
(package private)  int VAR_START
           
(package private)  int YEAR_START
           
 
Constructor Summary
Relation(int m, int n, int size, int cont, int cond)
          Initialize an instance for the class
 
Method Summary
 java.lang.String getConditional()
          Generate the conditional element for the SPOs in XML format random variables: CS100 ~ CS149
 java.lang.String getContext()
          Generate the context element for the SPO in XML format context elements: year, semester, major, college, instructor, comments year: 1976 ~ 2001 semester: "AA" ~ "ZZ" major: "AA" ~ "ZZ" college: "AA" ~ "ZZ" instructor: "AA" ~ "ZZ" comments: "AA" ~ "ZZ"
 java.lang.String[] getJVariables()
           
 java.lang.String[] getOVariables()
           
 java.lang.String getOXJConditional()
           
 float[] getProbabilities()
          Generate the probability for each row in the table element of the SPO
 java.lang.String getSPOs()
          Generate SPOs in XML format for testing
 java.lang.String getTable()
          Generate the table element for the SPO in XML format
 char[] getValues(int k)
          Generate value set of the participating random variables for the SPO
 java.lang.String[] getVariables()
          Generate participating random variable set for the SPO
 java.lang.String[] getXVariables()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m

int m

n

int n

size

int size

cont

int cont

cond

int cond

YEAR_START

final int YEAR_START
See Also:
Constant Field Values

CHAR_START

final char CHAR_START
See Also:
Constant Field Values

CONTEXT_LEN

final int CONTEXT_LEN
See Also:
Constant Field Values

VAR_START

final int VAR_START
See Also:
Constant Field Values

VAR_LEN

final int VAR_LEN
See Also:
Constant Field Values

VAR_RATIO

final int VAR_RATIO
See Also:
Constant Field Values

TYPE

static char TYPE

PERCENT

static float PERCENT
Constructor Detail

Relation

public Relation(int m,
                int n,
                int size,
                int cont,
                int cond)
Initialize an instance for the class

Parameters:
m - number of SPO in the relation
n - number of participating variables in each SPO
size - size of domain for participating variables
cont - max number of elements in context element
cond - max number of elements in conditional element
Method Detail

getSPOs

public java.lang.String getSPOs()
Generate SPOs in XML format for testing


getContext

public java.lang.String getContext()
Generate the context element for the SPO in XML format context elements: year, semester, major, college, instructor, comments year: 1976 ~ 2001 semester: "AA" ~ "ZZ" major: "AA" ~ "ZZ" college: "AA" ~ "ZZ" instructor: "AA" ~ "ZZ" comments: "AA" ~ "ZZ"


getTable

public java.lang.String getTable()
Generate the table element for the SPO in XML format


getConditional

public java.lang.String getConditional()
Generate the conditional element for the SPOs in XML format random variables: CS100 ~ CS149


getOXJConditional

public java.lang.String getOXJConditional()

getVariables

public java.lang.String[] getVariables()
Generate participating random variable set for the SPO


getOVariables

public java.lang.String[] getOVariables()

getXVariables

public java.lang.String[] getXVariables()

getJVariables

public java.lang.String[] getJVariables()

getValues

public char[] getValues(int k)
Generate value set of the participating random variables for the SPO

Parameters:
k - the kth row of the table element

getProbabilities

public float[] getProbabilities()
Generate the probability for each row in the table element of the SPO



Copyright © 2003 UKCS. All Rights Reserved.