Package edu.tufts.hrilab.vision.stm
Class ShortTermMemoryInterface
java.lang.Object
edu.tufts.hrilab.vision.stm.ShortTermMemoryInterface
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 -
Method Summary
Modifier and TypeMethodDescriptionstatic void
static boolean
confirmObject
(long tokenId) Check if the MemoryObject with specified MemoryObject ID is in short term memory.static boolean
confirmObject
(MemoryObject token) Check if the MemoryObject is in short term memory.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.getTokenIds
(double conf) Get all MemoryObject IDs in the short term memory with a confidence level over the specified threshold.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.static List<MemoryObject>
getTokens
(double conf) Get all MemoryObjects in the short term memory with a confidence level over the specified threshold.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.getTypeIds
(double conf) Get all MemoryObjectType IDs with at least one object in short term memory with a confidence level above the specified threshold.
-
Constructor Details
-
ShortTermMemoryInterface
public ShortTermMemoryInterface()
-
-
Method Details
-
getTypeIds
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
Get all MemoryObject IDs in the short term memory with a confidence level over the specified threshold.- Parameters:
conf
-- Returns:
-
getTokenIds
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
Get all MemoryObjects in the short term memory with a confidence level over the specified threshold.- Parameters:
conf
-- Returns:
-
getTokens
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
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
Check if the MemoryObject is in short term memory.- Parameters:
token
-- Returns:
-
clearMemory
public static void clearMemory()
-