tuffy.ground.partition
Class Component

java.lang.Object
  extended by tuffy.ground.partition.Component
All Implemented Interfaces:
java.lang.Comparable<Component>

public class Component
extends java.lang.Object
implements java.lang.Comparable<Component>

A component in the MRF.


Field Summary
 java.util.HashMap<java.lang.Integer,GAtom> atoms
           
 java.util.HashSet<java.lang.Integer> cutset
           
 int id
           
 int numAtoms
           
 int numClauses
           
 int numCutClauses
           
 int numPins
           
 java.util.ArrayList<Partition> parts
           
 double ramSize
           
 int rep
           
 double totalCutWeight
           
 double totalWeight
           
 
Constructor Summary
Component()
           
 
Method Summary
 void addAtom(GAtom a)
          Add a new atom into this component.
 int compareTo(Component c)
           
 void discard()
          Discard all data structures to reclaim the RAM.
 int numParts()
          Get the number of partitions in this component.
 void showStats()
          Show basic stats of this component.
 double size()
          The size of this component estimated in the number fo bytes consumed to store this component in RAM.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

public int id

rep

public int rep

numAtoms

public int numAtoms

numClauses

public int numClauses

numCutClauses

public int numCutClauses

numPins

public int numPins

totalWeight

public double totalWeight

totalCutWeight

public double totalCutWeight

ramSize

public double ramSize

parts

public java.util.ArrayList<Partition> parts

cutset

public java.util.HashSet<java.lang.Integer> cutset

atoms

public java.util.HashMap<java.lang.Integer,GAtom> atoms
Constructor Detail

Component

public Component()
Method Detail

addAtom

public void addAtom(GAtom a)
Add a new atom into this component.

Parameters:
a - the atom

discard

public void discard()
Discard all data structures to reclaim the RAM.


showStats

public void showStats()
Show basic stats of this component.


compareTo

public int compareTo(Component c)
Specified by:
compareTo in interface java.lang.Comparable<Component>

size

public double size()
The size of this component estimated in the number fo bytes consumed to store this component in RAM.


numParts

public int numParts()
Get the number of partitions in this component.