|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectinfer.MZone
public class MZone
An memory area that stores part or the whole of the MRF. May contain either 1) one or multiple components in whole; or 2) one or multiple partitions of one component.
Nested Class Summary | |
---|---|
static class |
MZone.CompThread
A worker thread that runs inference on one component at a time. |
Constructor Summary | |
---|---|
MZone(RDB db,
PartMap pmap,
java.util.ArrayList<Component> comps)
Construct a memory zone to hold a number of components. |
|
MZone(RDB db,
PartMap pmap,
boolean wholeComps)
Construct an initially empty memory zone. |
|
MZone(RDB db,
PartMap pmap,
Component comp,
java.util.ArrayList<Partition> parts)
Construct a memory zone to hold a number of partitions in a certain component. |
Method Summary | |
---|---|
void |
addComponent(Component c)
Add a component to this zone. |
void |
addCost(double c)
Add up the cost. |
void |
addPart(Partition p)
Add a partition to this zone. |
void |
discard()
Discard all data structues to facilitate GC. |
void |
dumpTruth()
Flush the truth table to the DB. |
double |
getCost()
Get the cost after inference. |
Component |
getTask()
Get next unprocessed task (i.e., component) |
void |
load()
Load the set of components or partitions. |
void |
runInfer(int ntries,
int nflips)
Solve the set of components/partitions in this zone. |
long |
size()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MZone(RDB db, PartMap pmap, java.util.ArrayList<Component> comps)
db
- pmap
- the partitioning schemecomps
- the components to be loadedpublic MZone(RDB db, PartMap pmap, boolean wholeComps)
db
- pmap
- wholeComps
- indicates whether this zone will hold a set of components
or a set of partitions.addComponent(Component)
,
addPart(Partition)
public MZone(RDB db, PartMap pmap, Component comp, java.util.ArrayList<Partition> parts)
db
- pmap
- comp
- the (usually big) componentparts
- the partitions to be loadedMethod Detail |
---|
public void addComponent(Component c)
c
- MZone(RDB, PartMap, boolean)
public void addCost(double c)
c
- MZone.CompThread.run()
public void addPart(Partition p)
MZone(RDB, PartMap, boolean)
public void discard()
public void dumpTruth()
public double getCost()
public Component getTask()
MZone.CompThread.run()
public void load()
public void runInfer(int ntries, int nflips)
ntries
- nflips
- public long size()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |