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

atoms

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

cutset

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

id

public int id

numAtoms

public int numAtoms

numClauses

public int numClauses

numCutClauses

public int numCutClauses

numPins

public int numPins

parts

public java.util.ArrayList<Partition> parts

ramSize

public double ramSize

rep

public int rep

totalCutWeight

public double totalCutWeight

totalWeight

public double totalWeight
Constructor Detail

Component

public Component()
Method Detail

addAtom

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

Parameters:
a - the atom

compareTo

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

discard

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


numParts

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


showStats

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


size

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