de.unidu.is.pdatalog
Class EDBRelation

java.lang.Object
  extended byde.unidu.is.pdatalog.Relation
      extended byde.unidu.is.pdatalog.EDBRelation

public class EDBRelation
extends Relation

A class for pDatalog++ relation whose facts are stored in a database table (corresponding to an extensional predicate).

Since:
2003-10-07
Version:
$Revision: 1.6 $, $Date: 2005/03/14 17:33:13 $
Author:
Henrik Nottelmann

Field Summary
 
Fields inherited from class de.unidu.is.pdatalog.Relation
arity, base, name
 
Constructor Summary
EDBRelation(RelationBase base, java.lang.String name, int arity)
          Constructs a new relation, and automatically adds it to the relation base.
EDBRelation(RelationBase base, java.lang.String name, int arity, boolean create)
          Constructs a new relation, and automatically adds it to the relation base.
 
Method Summary
 void add(double prob, java.lang.String[] arguments)
          Adds the specified fact to the knowledge base.
 void add(double prob, StringExpression[] args)
          Adds the specified fact to the knowledge base.
 void add(Fact fact)
          Adds the specified fact to the knowledge base.
 void add(java.lang.String[] arguments)
          Adds the specified fact to the knowledge base.
 void add(StringExpression[] args)
          Adds the specified fact to the knowledge base.
 
Methods inherited from class de.unidu.is.pdatalog.Relation
getArity, getName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EDBRelation

public EDBRelation(RelationBase base,
                   java.lang.String name,
                   int arity)
Constructs a new relation, and automatically adds it to the relation base.

Parameters:
base - corresponding relation base
name - relatio n name
arity - arity of the relation

EDBRelation

public EDBRelation(RelationBase base,
                   java.lang.String name,
                   int arity,
                   boolean create)
Constructs a new relation, and automatically adds it to the relation base.

Parameters:
base - corresponding relation base
name - relatio n name
arity - arity of the relation
create - if true, the relation is physically created
Method Detail

add

public void add(StringExpression[] args)
Adds the specified fact to the knowledge base.

Parameters:
args - arguments

add

public void add(double prob,
                StringExpression[] args)
Adds the specified fact to the knowledge base.

Parameters:
prob - probability of this fact
args - arguments

add

public void add(java.lang.String[] arguments)
Adds the specified fact to the knowledge base.

Parameters:
arguments - arguments

add

public void add(double prob,
                java.lang.String[] arguments)
Adds the specified fact to the knowledge base.

Parameters:
prob - probability of this fact
arguments - arguments

add

public void add(Fact fact)
Adds the specified fact to the knowledge base.

Parameters:
fact - fact to be added