|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
dstruct.StatOperator
public abstract class StatOperator
Abstract class of a statistical operator (e.g., Tuffy, Coref, CRF etc. ). A valid Felix operator should extend this class and implement methods like run(), prepare(), etc.
Nested Class Summary | |
---|---|
static class |
StatOperator.OPType
Type of StatOperator. |
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
protected java.util.List<DataMovementOperator> |
allDMOs
All DataMovementOperator s used in this statistical operator. |
java.util.HashSet<FelixClause> |
allRelevantFelixClause
Set of clauses assigned to this operator. |
ConcurrentOperatorsBucket |
belongsToBucket
The ConcurrentOperatorsBucket this StatOperator belongs to. |
java.util.HashMap<FelixClause,java.util.HashSet<mln.Expression>> |
clauseConstraints
Map from clauses to expressions partitioning the data. |
(package private) int |
currentRunTime
How many times this operator has run. |
java.lang.String |
dataCrackerSignature
The human-readable representation of data partitions. |
db.RDB |
db
Database connection. |
FelixQuery |
fq
Felix query. |
(package private) int |
id
ID of this operator. |
(package private) static int |
idCounter
Global counter of StatOperators ID. |
java.util.HashSet<FelixPredicate> |
inputPredicates
Set of predicates whose values are used by this operator as inputs. |
boolean |
isMarginal
Whether this operator works in marginal or MAP mode. |
(package private) int |
maxRunTime
Max time this operator can run. |
protected parser.CommandOptions |
options
Options parsed from command line or configuration file. |
java.util.HashSet<FelixPredicate> |
outputPredicates
Set of predicates whose values are output by this operator. |
int |
partitionedInto
Parameter assigning the degree of data partitioning. |
protected int |
precedence
The precedence of this operator. |
StatOperator.OPType |
type
Type of this operator. |
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
StatOperator(FelixQuery _fq,
java.util.HashSet<FelixPredicate> _goalPredicates,
parser.CommandOptions _opt)
the constructor. |
Method Summary | |
---|---|
StatOperator |
clone()
|
abstract java.lang.String |
explain()
Human-readable representation of the logic plan. |
java.util.List<DataMovementOperator> |
getAllDMOs()
Get all DMOs used by this operator. |
int |
getPrecedence()
Get the precedence of this operator. |
FelixPredicate |
getTargetPredicateIfHasOnlyOne()
Get the target predicate of this StatOperator if this operator is CRF, LR or COREF. |
abstract void |
prepare()
Generate the operator-specified logic plan, i.e., all data movement operators that will be used for inference. |
abstract void |
run()
Method that executes this operator. |
java.lang.String |
toString()
|
java.util.HashSet<mln.ConjunctiveQuery> |
translateFelixClasesIntoFactorGraphEdgeQueries(FelixPredicate target,
boolean forceRecursive,
FelixPredicate.FPProperty... props)
Given a first order logic clause and a target predicate, translate it into a conjunctive query with properly assigned weight. |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, yield |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public int partitionedInto
public java.lang.String dataCrackerSignature
public java.util.HashMap<FelixClause,java.util.HashSet<mln.Expression>> clauseConstraints
public ConcurrentOperatorsBucket belongsToBucket
public boolean isMarginal
protected parser.CommandOptions options
int maxRunTime
int currentRunTime
static int idCounter
int id
public StatOperator.OPType type
public java.util.HashSet<FelixPredicate> inputPredicates
public java.util.HashSet<FelixPredicate> outputPredicates
public java.util.HashSet<FelixClause> allRelevantFelixClause
public db.RDB db
public FelixQuery fq
protected int precedence
protected java.util.List<DataMovementOperator> allDMOs
DataMovementOperator
s used in this statistical operator.
Constructor Detail |
---|
public StatOperator(FelixQuery _fq, java.util.HashSet<FelixPredicate> _goalPredicates, parser.CommandOptions _opt)
_oriMLN
- _opt
- Method Detail |
---|
public StatOperator clone()
clone
in class java.lang.Object
public abstract void prepare()
public abstract void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public abstract java.lang.String explain()
public FelixPredicate getTargetPredicateIfHasOnlyOne()
public java.util.HashSet<mln.ConjunctiveQuery> translateFelixClasesIntoFactorGraphEdgeQueries(FelixPredicate target, boolean forceRecursive, FelixPredicate.FPProperty... props)
target
- forceRecursive
- If there are multiple literals of the given predicate,
this parameter specifies whether the generated conjunctive queries are recursive.
CRF will set this parameter as FALSE, while COREF will set it as TRUE.props
- The property selected for the target predicate.
public java.util.List<DataMovementOperator> getAllDMOs()
public int getPrecedence()
public java.lang.String toString()
toString
in class java.lang.Thread
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |