edu::tum::cs::srl::mln::MarkovLogicNetwork Class Reference

Inheritance diagram for edu::tum::cs::srl::mln::MarkovLogicNetwork:
Inheritance graph
[legend]

List of all members.

Public Member Functions

void addFormula (Formula f, double weight)
void addFunctionalDependency (String predicateName, Integer index)
void addGuaranteedDomainElements (String domain, String[] elements)
void addHardFormula (Formula f)
void addSignature (Signature sig)
double getdeltaMin ()
Set< FormulagetFormulas ()
Integer getFunctionallyDeterminedArgument (String predicateName)
Set< String > getFunctionalPreds ()
HashMap< String, String[]> getGuaranteedDomainElements ()
double getHardWeight ()
Collection< String > getPrologRules ()
Collection< RelationKeygetRelationKeys (String relation)
Signature getSignature (String predName)
Collection< SignaturegetSignatures ()
Taxonomy getTaxonomy ()
MarkovRandomField ground (Database db, boolean storeFormulasInMRF, GroundingCallback gc) throws Exception
MarkovRandomField ground (Database db) throws Exception
 MarkovLogicNetwork ()
 MarkovLogicNetwork (String mlnFileLoc) throws Exception
void read (File mlnFile) throws Exception
void replaceType (String oldType, String newType)
void write (File f) throws FileNotFoundException
void write (PrintStream out)

Protected Attributes

HashMap< Formula, Double > formula2weight
HashMap< String, Integer > functionalPreds
HashMap< String, String[]> guaranteedDomainElements
File mlnFile
HashMap< String, Signaturesignatures

Package Attributes

double sumAbsWeights = 0

Detailed Description

represents a Markov logic network

Author:
wernickr, jain

Definition at line 30 of file MarkovLogicNetwork.java.


Constructor & Destructor Documentation

edu::tum::cs::srl::mln::MarkovLogicNetwork::MarkovLogicNetwork ( String  mlnFileLoc  )  throws Exception [inline]

constructs a Markov logic network from an MLN file

Parameters:
mlnFileLoc location of the MLN-file
Exceptions:
Exception 

Definition at line 53 of file MarkovLogicNetwork.java.

edu::tum::cs::srl::mln::MarkovLogicNetwork::MarkovLogicNetwork (  )  [inline]

constructs an empty MLN

Definition at line 61 of file MarkovLogicNetwork.java.


Member Function Documentation

void edu::tum::cs::srl::mln::MarkovLogicNetwork::addFormula ( Formula  f,
double  weight 
) [inline]

Definition at line 77 of file MarkovLogicNetwork.java.

void edu::tum::cs::srl::mln::MarkovLogicNetwork::addFunctionalDependency ( String  predicateName,
Integer  index 
) [inline]

Definition at line 85 of file MarkovLogicNetwork.java.

void edu::tum::cs::srl::mln::MarkovLogicNetwork::addGuaranteedDomainElements ( String  domain,
String[]  elements 
) [inline]

Definition at line 89 of file MarkovLogicNetwork.java.

void edu::tum::cs::srl::mln::MarkovLogicNetwork::addHardFormula ( Formula  f  )  [inline]

Definition at line 81 of file MarkovLogicNetwork.java.

void edu::tum::cs::srl::mln::MarkovLogicNetwork::addSignature ( Signature  sig  )  [inline]

adds a predicate signature to this model

Parameters:
sig signature of this predicate

Definition at line 73 of file MarkovLogicNetwork.java.

double edu::tum::cs::srl::mln::MarkovLogicNetwork::getdeltaMin (  )  [inline]

Method calculates the minimum difference among all weights

Returns:
returns the minimum (delta) difference of all weights

Definition at line 265 of file MarkovLogicNetwork.java.

Set<Formula> edu::tum::cs::srl::mln::MarkovLogicNetwork::getFormulas (  )  [inline]

Definition at line 93 of file MarkovLogicNetwork.java.

Integer edu::tum::cs::srl::mln::MarkovLogicNetwork::getFunctionallyDeterminedArgument ( String  predicateName  )  [inline]

gets the functionally determined argument of a functional predicate

Returns:
the index of the argument that is functionally determined or null if there is no such argument

Definition at line 110 of file MarkovLogicNetwork.java.

Set<String> edu::tum::cs::srl::mln::MarkovLogicNetwork::getFunctionalPreds (  )  [inline]
Returns:
the set of functional predicates (i.e. their names)

Definition at line 316 of file MarkovLogicNetwork.java.

HashMap<String, String[]> edu::tum::cs::srl::mln::MarkovLogicNetwork::getGuaranteedDomainElements (  )  [inline]
Returns:
a mapping from domain names to arrays of elements

Implements edu::tum::cs::srl::RelationalModel.

Definition at line 299 of file MarkovLogicNetwork.java.

double edu::tum::cs::srl::mln::MarkovLogicNetwork::getHardWeight (  )  [inline]
Returns:
the weight used for hard constraints

Definition at line 257 of file MarkovLogicNetwork.java.

Collection<String> edu::tum::cs::srl::mln::MarkovLogicNetwork::getPrologRules (  )  [inline]

Implements edu::tum::cs::srl::RelationalModel.

Definition at line 362 of file MarkovLogicNetwork.java.

Collection<RelationKey> edu::tum::cs::srl::mln::MarkovLogicNetwork::getRelationKeys ( String  relation  )  [inline]
Parameters:
relation 
Returns:

Implements edu::tum::cs::srl::RelationalModel.

Definition at line 308 of file MarkovLogicNetwork.java.

Signature edu::tum::cs::srl::mln::MarkovLogicNetwork::getSignature ( String  predName  )  [inline]

returns the signature for the given predicate

Parameters:
predName name of predicate (signature for this predicate will be returned)
Returns:

Implements edu::tum::cs::srl::RelationalModel.

Definition at line 102 of file MarkovLogicNetwork.java.

Collection<Signature> edu::tum::cs::srl::mln::MarkovLogicNetwork::getSignatures (  )  [inline]

Implements edu::tum::cs::srl::RelationalModel.

Definition at line 320 of file MarkovLogicNetwork.java.

Taxonomy edu::tum::cs::srl::mln::MarkovLogicNetwork::getTaxonomy (  )  [inline]
Returns:
null because MLNs do not use a taxonomy

Implements edu::tum::cs::srl::RelationalModel.

Definition at line 327 of file MarkovLogicNetwork.java.

MarkovRandomField edu::tum::cs::srl::mln::MarkovLogicNetwork::ground ( Database  db,
boolean  storeFormulasInMRF,
GroundingCallback  gc 
) throws Exception [inline]

Definition at line 124 of file MarkovLogicNetwork.java.

MarkovRandomField edu::tum::cs::srl::mln::MarkovLogicNetwork::ground ( Database  db  )  throws Exception [inline]

Method that grounds MLN to a MarkovRandomField

Parameters:
dbFileLoc file location of evidence for this scenario
Returns:
returns a grounded MLN as a MarkovRandomField MRF
Exceptions:
Exception 

Definition at line 120 of file MarkovLogicNetwork.java.

void edu::tum::cs::srl::mln::MarkovLogicNetwork::read ( File  mlnFile  )  throws Exception [inline]

reads the contents of an MLN file

Exceptions:
Exception 

Definition at line 132 of file MarkovLogicNetwork.java.

void edu::tum::cs::srl::mln::MarkovLogicNetwork::replaceType ( String  oldType,
String  newType 
) [inline]

replace a type by a new type in all function signatures

Parameters:
oldType 
newType 

Implements edu::tum::cs::srl::RelationalModel.

Definition at line 290 of file MarkovLogicNetwork.java.

void edu::tum::cs::srl::mln::MarkovLogicNetwork::write ( File  f  )  throws FileNotFoundException [inline]

Definition at line 357 of file MarkovLogicNetwork.java.

void edu::tum::cs::srl::mln::MarkovLogicNetwork::write ( PrintStream  out  )  [inline]

Definition at line 331 of file MarkovLogicNetwork.java.


Member Data Documentation

Definition at line 33 of file MarkovLogicNetwork.java.

mapping from predicate name to index of argument that is functionally determined

Definition at line 45 of file MarkovLogicNetwork.java.

maps domain/type names to a list of guaranteed domain elements

Definition at line 41 of file MarkovLogicNetwork.java.

Definition at line 32 of file MarkovLogicNetwork.java.

maps a predicate name to its signature

Definition at line 37 of file MarkovLogicNetwork.java.

Definition at line 46 of file MarkovLogicNetwork.java.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations


srldb
Author(s): Dominik Jain, Stefan Waldherr, Moritz Tenorth
autogenerated on Fri Jan 11 09:58:45 2013