JACK 5.4 Application Interface

aos.jack.jak.beliefset
Class BeliefSet

java.lang.Object
  extended byaos.jack.jak.util.Watchable
      extended byaos.jack.jak.beliefset.BeliefSet
All Implemented Interfaces:
ObservableInt
Direct Known Subclasses:
ClosedWorld, OpenWorld

public abstract class BeliefSet
extends Watchable

The base class for BeliefSets. It defines the interface all belief sets must implement.


Constructor Summary
BeliefSet()
           
 
Method Summary
abstract  void assertTuple(Tuple t, BeliefState d)
           
 void dump(java.io.PrintWriter w)
           
protected static int getArrSize(java.lang.Object[] x)
           
 aos.jack.jak.event.EventRecipient getHandler()
           
abstract  Tuple getTuple(int tab, int loc)
           
protected  void invokeAssertListener(Tuple t, BeliefState d)
           
protected  void invokeRetractListener(Tuple t, BeliefState d)
           
protected static java.lang.Object newArr(java.lang.Class cl, int sz)
           
abstract  int nFacts()
          Return how many facts are stored in the BeliefSet
abstract  int nIndexes()
          Return the number of indexes that have been built for this belief set.
 void postEvent(Event e)
           
 int read(java.io.InputStream file)
           
abstract  int read(aos.apib.InStream is)
          Read into the BeliefSet a set of tuples from the given Jacob Stream
 int read(java.lang.String file)
           
 void registerOpListener(TupleObserver listener)
           
 void requireNextOpNotification()
           
protected  void resetNextOpNotification()
           
abstract  void retractTuple(Tuple t, BeliefState d)
           
 java.lang.String toString()
           
 int write(java.io.OutputStream st, boolean binary)
           
abstract  int write(aos.apib.OutStream s)
          Write out BeliefSet to the given Jacob Stream.
 int write(java.lang.String file)
           
 
Methods inherited from class aos.jack.jak.util.Watchable
addObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BeliefSet

public BeliefSet()
Method Detail

nIndexes

public abstract int nIndexes()
Return the number of indexes that have been built for this belief set.


getTuple

public abstract Tuple getTuple(int tab,
                               int loc)

assertTuple

public abstract void assertTuple(Tuple t,
                                 BeliefState d)

retractTuple

public abstract void retractTuple(Tuple t,
                                  BeliefState d)

read

public abstract int read(aos.apib.InStream is)
Read into the BeliefSet a set of tuples from the given Jacob Stream

Parameters:
is - The Jacob Stream to read from.
Returns:
an int indicating the success or failure of the reading.

write

public abstract int write(aos.apib.OutStream s)
Write out BeliefSet to the given Jacob Stream.

Parameters:
s - the OutStream to write to.
Returns:
An int indicating the success or failure of the writing.

nFacts

public abstract int nFacts()
Return how many facts are stored in the BeliefSet

Returns:
The number of facts.

getArrSize

protected static int getArrSize(java.lang.Object[] x)

newArr

protected static java.lang.Object newArr(java.lang.Class cl,
                                         int sz)

toString

public java.lang.String toString()

dump

public void dump(java.io.PrintWriter w)

write

public int write(java.lang.String file)

write

public int write(java.io.OutputStream st,
                 boolean binary)

read

public int read(java.io.InputStream file)

read

public int read(java.lang.String file)

getHandler

public aos.jack.jak.event.EventRecipient getHandler()

postEvent

public void postEvent(Event e)

registerOpListener

public void registerOpListener(TupleObserver listener)

requireNextOpNotification

public void requireNextOpNotification()

invokeAssertListener

protected void invokeAssertListener(Tuple t,
                                    BeliefState d)

invokeRetractListener

protected void invokeRetractListener(Tuple t,
                                     BeliefState d)

resetNextOpNotification

protected void resetNextOpNotification()

JACK 5.4 Application Interface

Copyright (C) 1999-2008, Agent Oriented Software Pty. Ltd.

US Government Restricted Rights
The JACK Modules and relevant Software Material have been developed entirely at private expense and are accordingly provided with RESTRICTED RIGHTS. Use, duplication, or disclosure by Government is subject to restrictions as set forth in subparagraph (c)(1)(ii) of DFARS 252.227-7013 or subparagraph (c)(1) and (2) of the Commercial Computer Software Restricted Rights and 48 CFR 52.2270-19, as applicable.


Agent Oriented Software Pty. Ltd.     http://www.aosgrp.com
PO Box 639, Carlton South, Victoria 3053, Australia
Phone: +61 3 9349 5055, Fax: +61 3 9349 5088