-
Notifications
You must be signed in to change notification settings - Fork 6
Lattice Generator
Vidhi Jain edited this page Jul 13, 2017
·
14 revisions
Connection: con to _BN
database
Integer: max number of members
- readFirstSets() read first sest from RFunctors
- init() init createdSet + truncate tables + add first sets to db
- generateTree() generate lattice tree
In BayesBaseCT_SortMerge.buildCT()
- after transfer.sql
- before metadata_2.sql (deprecated) ** i.e. functorNode.sql, contingencyTables.sql, bayesNetLearnin.sql
- Executes SQL
select rnid from RNodes;
- Adds each rnid to an ArrayList
firstSets
- Assigns maxNumberofMembers to size of firstSets
- Create and insert in tables
lattice_membership
,lattice_rel
, andlattice_set
. (NOTE: Here theparent
column in lattice_rel is populated with defaultEmptySet
)
- Executes SQL
select name from lattice_set where length = " + setLength + ";
on_BN
database - Adds each name in table
lattice_set
to a local ArrayListsets
createNewSets()
ArrayList: sets
Uses static variable firstSets
- nodeSplit() split a lattice node into a list of relation nodes
- checkConstraints()
- nodeJoin() generate a new lattice node by join a list of relation nodes
- Executes SQL Inserts into tables
lattice_set
,lattice_rel
andlattice_membership
- Executes SQL Select on table
RNodes
- Adds the pvid1, pvid2 to HashSet
firstSetKeys
where rnid is firstSet. - Adds the pvid1, pvid2 to HashSet
secondSetKeys
where rnid is secondSet.
String Array: firstSet String Array: secondSetParts
boolean
HashSet: newSet
- Join each item in newSet in sorted order by String concatenation separated by comma
String: node
String Array: nodes
- Split nodes on the delimiter and starting ending apostrophe.