tuffy.ground.partition
Class Bucket

java.lang.Object
  extended by tuffy.ground.partition.Bucket

public class Bucket
extends java.lang.Object

A partition bucket is either 1) one or multiple components in whole; or 2) one or multiple partitions of one component. Partitions are grouped into buckets and solved bucket by bucket.


Field Summary
private  java.util.HashSet<Component> comps
           
private  RDB db
           
private static int guid
           
private  int id
           
private  java.util.HashSet<Partition> parts
           
private  PartitionScheme pmap
           
private  long size
          Estimated size in bytes.
 
Constructor Summary
Bucket(RDB db, PartitionScheme pmap)
          Construct an initially empty memory zone.
 
Method Summary
 void addComponent(Component c)
          Add a component to this bucket.
 void addPart(Partition p)
          Add a partition to this bucket.
 void discard()
          Discard all data structues to facilitate GC.
 java.util.Set<Component> getComponents()
           
 java.util.Set<Partition> getPartitions()
           
 void load(MarkovLogicNetwork mln)
          Load the set of partitions from DB to RAM.
 long size()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

guid

private static int guid

db

private RDB db

pmap

private PartitionScheme pmap

id

private int id

comps

private java.util.HashSet<Component> comps

parts

private java.util.HashSet<Partition> parts

size

private long size
Estimated size in bytes.

Constructor Detail

Bucket

public Bucket(RDB db,
              PartitionScheme pmap)
Construct an initially empty memory zone.

See Also:
addComponent(Component), addPart(Partition)
Method Detail

getComponents

public java.util.Set<Component> getComponents()

getPartitions

public java.util.Set<Partition> getPartitions()

discard

public void discard()
Discard all data structues to facilitate GC.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

size

public long size()

addComponent

public void addComponent(Component c)
Add a component to this bucket.


addPart

public void addPart(Partition p)
Add a partition to this bucket.


load

public void load(MarkovLogicNetwork mln)
Load the set of partitions from DB to RAM.