Class ShortTermMemoryInterface

java.lang.Object
edu.tufts.hrilab.vision.stm.ShortTermMemoryInterface

public class ShortTermMemoryInterface extends Object
This class calls into native code to retrieve requested info/data from tracked MemoryObjects. It does not store any memory objects, it only hands off the requested data. The getShortTermMemory() can populate an entire STM and hand it off, but this is only a snapshot of the STM at the time it was requested, and is not updated. TODO: have the Java side STM continually updated to reflect most recent native STM.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
     
    static boolean
    confirmObject(long tokenId)
    Check if the MemoryObject with specified MemoryObject ID is in short term memory.
    static boolean
    Check if the MemoryObject is in short term memory.
    getToken(long tokenId, double conf)
    Get the MemoryObject with the MemoryObject type ID and token ID if the confidence level is above the specified threshold.
    static List<Long>
    getTokenIds(double conf)
    Get all MemoryObject IDs in the short term memory with a confidence level over the specified threshold.
    static List<Long>
    getTokenIds(long typeId, double conf)
    Get all MemoryObject IDs of the specified MemoryObjectType in the short term memory with a confidence level over the specified threshold.
    getTokens(double conf)
    Get all MemoryObjects in the short term memory with a confidence level over the specified threshold.
    getTokens(long typeId, double conf)
    Get all MemoryObjects of the specified MemoryObjectType in the short term memory with a confidence level over the specified threshold.
    static List<Long>
    getTypeIds(double conf)
    Get all MemoryObjectType IDs with at least one object in short term memory with a confidence level above the specified threshold.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ShortTermMemoryInterface

      public ShortTermMemoryInterface()
  • Method Details

    • getTypeIds

      public static List<Long> getTypeIds(double conf)
      Get all MemoryObjectType IDs with at least one object in short term memory with a confidence level above the specified threshold.
      Parameters:
      conf -
      Returns:
      list of MemoryObjectType IDs
    • getTokenIds

      public static List<Long> getTokenIds(double conf)
      Get all MemoryObject IDs in the short term memory with a confidence level over the specified threshold.
      Parameters:
      conf -
      Returns:
    • getTokenIds

      public static List<Long> getTokenIds(long typeId, double conf)
      Get all MemoryObject IDs of the specified MemoryObjectType in the short term memory with a confidence level over the specified threshold.
      Parameters:
      typeId -
      conf -
      Returns:
    • getTokens

      public static List<MemoryObject> getTokens(double conf)
      Get all MemoryObjects in the short term memory with a confidence level over the specified threshold.
      Parameters:
      conf -
      Returns:
    • getTokens

      public static List<MemoryObject> getTokens(long typeId, double conf)
      Get all MemoryObjects of the specified MemoryObjectType in the short term memory with a confidence level over the specified threshold.
      Parameters:
      typeId -
      conf -
      Returns:
    • getToken

      public static MemoryObject getToken(long tokenId, double conf)
      Get the MemoryObject with the MemoryObject type ID and token ID if the confidence level is above the specified threshold.
      Parameters:
      tokenId -
      conf -
      Returns:
    • confirmObject

      public static boolean confirmObject(long tokenId)
      Check if the MemoryObject with specified MemoryObject ID is in short term memory.
      Parameters:
      tokenId -
      Returns:
    • confirmObject

      public static boolean confirmObject(MemoryObject token)
      Check if the MemoryObject is in short term memory.
      Parameters:
      token -
      Returns:
    • clearMemory

      public static void clearMemory()