JACK 5.4 Application Interface

aos.jack.jak.beliefset
Class BeliefSetCursor

java.lang.Object
  extended byaos.jack.jak.util.Watchable
      extended byaos.jack.jak.cursor.Cursor
          extended byaos.jack.jak.beliefset.BeliefSetCursor
All Implemented Interfaces:
ObservableInt
Direct Known Subclasses:
ClosedWorldCursor, OpenWorldCursor

public abstract class BeliefSetCursor
extends Cursor

The BeliefSetCursor is a Cursor for belief-set queries. This is a the base for cursors on belief sets. Derived BeliefSets define Cursors specific to them which extend and implement this interface


Field Summary
 
Fields inherited from class aos.jack.jak.cursor.Cursor
FALSE, falseCursor, TRUE, trueCursor, UNKNOWN
 
Constructor Summary
BeliefSetCursor()
           
 
Method Summary
 void finished()
          This informs the cursor that it is not going to be used again.
 BeliefSet getBs()
           
abstract  aos.jack.jak.logic.ChoicePoint getChoicePoint()
           
abstract  Tuple getMatched()
          Return the tuple that has been successfully matched at last next(), null otherwise.
abstract  int[] getMatchedContext()
          Return the context information required by restoreNextContext() to repeat the last sucessful match by next(), null if failed.
abstract  int hash(int ind)
           
 void init(int ind, BeliefSet db)
           
abstract  boolean isKeyGround()
           
 boolean isTriggered()
          Used by JACK to determine if the cursor provides triggering.
abstract  int match(int tabindex, int start, int cmpcount, boolean matchkey, int hashind)
           
 void register(java.util.Observer o)
           
abstract  void removeAll()
          Removes all tuples matching the cursor.
abstract  void restoreNextContext(int[] matchparams)
          Restore parameters for next() to perform a specific match.
 void retractAll()
          Deprecated. as of JACK v3.5. Use removeAll() instead. Retracts all tuples matching the cursor.
 boolean unRegister(java.util.Observer o)
           
 
Methods inherited from class aos.jack.jak.cursor.Cursor
negate, next, reset, undo
 
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, toString, wait, wait, wait
 

Constructor Detail

BeliefSetCursor

public BeliefSetCursor()
Method Detail

getBs

public BeliefSet getBs()

match

public abstract int match(int tabindex,
                          int start,
                          int cmpcount,
                          boolean matchkey,
                          int hashind)

getMatched

public abstract Tuple getMatched()
Return the tuple that has been successfully matched at last next(), null otherwise.


getMatchedContext

public abstract int[] getMatchedContext()
Return the context information required by restoreNextContext() to repeat the last sucessful match by next(), null if failed.


restoreNextContext

public abstract void restoreNextContext(int[] matchparams)
Restore parameters for next() to perform a specific match. matchparams must be those returned by getMatchedContext() for the wanted match.


hash

public abstract int hash(int ind)

retractAll

public void retractAll()
Deprecated. as of JACK v3.5. Use removeAll() instead. Retracts all tuples matching the cursor.


removeAll

public abstract void removeAll()
Removes all tuples matching the cursor.


getChoicePoint

public abstract aos.jack.jak.logic.ChoicePoint getChoicePoint()

isKeyGround

public abstract boolean isKeyGround()

init

public void init(int ind,
                 BeliefSet db)

isTriggered

public boolean isTriggered()
Description copied from class: Cursor
Used by JACK to determine if the cursor provides triggering. It is used by JACK to flag errors if an attempt is made to wait for or maintain a cursor that does not provide triggering.

Overrides:
isTriggered in class Cursor

register

public void register(java.util.Observer o)
Overrides:
register in class Cursor

unRegister

public boolean unRegister(java.util.Observer o)
Overrides:
unRegister in class Cursor

finished

public void finished()
Description copied from class: Cursor
This informs the cursor that it is not going to be used again. This is typically used to clean up data strutures and to remove itself from any notification paths.

Overrides:
finished in class Cursor

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