Skip to content

Lattice Generator

Vidhi Jain edited this page Jul 13, 2017 · 14 revisions

Source Code

Method generate()

Input

Connection: con to _BN database

Output

Integer: max number of members

Calls

  1. readFirstSets() read first sest from RFunctors
  2. init() init createdSet + truncate tables + add first sets to db
  3. generateTree generate lattice tree

Called at

In BayesBaseCT_SortMerge.buildCT()

  • after transfer.sql
  • before metadata_2.sql (deprecated) ** i.e. functorNode.sql, contingencyTables.sql, bayesNetLearnin.sql

Method readFirstSets()

  • Executes SQL select rnid from RNodes;
  • Adds each rnid to an ArrayList firstSets

Method init()

  • Assigns maxNumberofMembers to size of firstSets
  • Create and insert in tables lattice_membership, lattice_rel , and lattice_set . (NOTE: Here the parent column in lattice_rel is populated with default EmptySet)

Method generateTree()

  • Executes SQL select name from lattice_set where length = " + setLength + "; on _BN database
  • Adds each name in table lattice_set to a local ArrayList sets

Calls

createNewSets() @param ArrayList: sets

Clone this wiki locally