Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages   Examples  

InMemoryPool Class Reference

An InMemoryPool is a plain and simple hash-table based triple store. More...

#include <InMemoryPool.h>

Inheritance diagram for InMemoryPool::

Pool TripleSource TripleSink Collaboration diagram for InMemoryPool:

Collaboration graph
[legend]
List of all members.

Public Methods


Detailed Description

An InMemoryPool is a plain and simple hash-table based triple store.

We might also want a CompactInMemoryPool, optimized for small size.

More importantly, we might want to support CLUSTERING, which in this case means knowing some things about the prevalent schemas which will help with performance. This is also true with the disk version. Basically a set of sets of properties which should be clustered -- if something has one of these properties, it's very likely to have these others. Property-Cluster-Advice. One might also want this to advise of joins -- subrelations... But maybe this is another class (or two, if you count disk). This should undo all the performance loss of reification.

Todo:
Add a changeCounter, I think. Maybe pools should have that in general. Kind of like Watched, but a little simpler.

Definition at line 34 of file InMemoryPool.h.


Member Function Documentation

Triple InMemoryPool::fetch Triple    simplePattern,
LoopState   ls,
unsigned long    max_results = 0
const [virtual]
 

Get the first triple which matches the pattern, and then (on following calls) get the next matching triples.

max_results is a hint which can improve performance if you know ahead of time that you will not be iterating more than some number of times.

Reimplemented from TripleSource.

Definition at line 92 of file InMemoryPool.cpp.

Referenced by XSBPool::fetch().

void InMemoryPool::remove Triple    t [virtual]
 

Remove the given triple, if it happens to be present.

No operation otherwise.

Reimplemented from Pool.

Definition at line 112 of file InMemoryPool.cpp.

Referenced by XSBPool::remove().

void InMemoryPool::replace Symbol    old,
Symbol    replacement
[virtual]
 

Replace any occurances of 'old' with 'replacement'.

Caller should treat 'old' as if it had been released.

See also:
Symbol::release Symbol.release release

Reimplemented from Pool.

Definition at line 117 of file InMemoryPool.cpp.

Referenced by XSBPool::replace().


Home to blindfold. This page generated via doxygen 1.2.11.1 Wed Oct 10 16:40:35 2001.