|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectinfer.Component
public class Component
A component in the MRF.
Field Summary | |
---|---|
static java.util.ArrayList<java.lang.Double> |
alphas
|
MRF |
cutMRF
|
java.util.HashSet<java.lang.Integer> |
cutset
|
static RDB |
db
|
int |
id
|
static int |
maxDegree
|
static java.util.ArrayList<java.lang.Integer> |
maxDegrees
|
static double |
minAlpha
|
int |
numAtoms
|
int |
numClauses
|
int |
numCutClauses
|
int |
numPins
|
java.util.ArrayList<Partition> |
parts
|
double |
ramSize
|
int |
rep
|
double |
totalCutWeight
|
static int |
totalPosLowComps
Fields for research experiments. |
static int |
totalPosLowStrictComps
|
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 |
getNumCriticalAtomsInCut()
|
void |
infer(int ntries,
int nflips)
Run partition-aware MAP inference with the Gauss-Seidel scheme. |
double |
inferGaussSeidel(int rounds,
int ntries,
int nflips)
Gauss-Seidel MAP inference scheme. |
boolean |
isCut()
Test if this component contains multiple partitions. |
java.util.HashMap<java.lang.Integer,java.lang.Boolean> |
loadTruthTable()
Load the truth table of atoms from the database. |
int |
numParts()
Get the number of partitions in this component. |
double |
recalcCostFromDB()
Recalculate the cost by reading the state from the DB. |
void |
showStats()
Show basic stats of this component. |
double |
size()
The size of this component as estimated by 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 |
---|
public static java.util.ArrayList<java.lang.Double> alphas
public MRF cutMRF
public java.util.HashSet<java.lang.Integer> cutset
public static RDB db
public int id
public static int maxDegree
public static java.util.ArrayList<java.lang.Integer> maxDegrees
public static double minAlpha
public int numAtoms
public int numClauses
public int numCutClauses
public int numPins
public java.util.ArrayList<Partition> parts
public double ramSize
public int rep
public double totalCutWeight
public static int totalPosLowComps
public static int totalPosLowStrictComps
public double totalWeight
Constructor Detail |
---|
public Component()
Method Detail |
---|
public void addAtom(GAtom a)
a
- the atompublic int compareTo(Component c)
compareTo
in interface java.lang.Comparable<Component>
public void discard()
public int getNumCriticalAtomsInCut()
public void infer(int ntries, int nflips)
ntries
- nflips
- public double inferGaussSeidel(int rounds, int ntries, int nflips)
rounds
- ntries
- nflips
- total number of flips per try in one round;
will be prorated for each partitionpublic boolean isCut()
public java.util.HashMap<java.lang.Integer,java.lang.Boolean> loadTruthTable()
public int numParts()
public double recalcCostFromDB()
public void showStats()
public double size()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |