final FieldIndex[] indexes = (FieldIndex[]) list.toArray( new FieldIndex[list.size()] );
LeftTupleMemory tupleMemory;
if ( config.isIndexLeftBetaMemory() ) {
tupleMemory = new LeftTupleIndexHashTable( indexes );
} else {
tupleMemory = new LeftTupleList();
}
RightTupleMemory factHandleMemory;
if ( config.isIndexRightBetaMemory() ) {
factHandleMemory = new RightTupleIndexHashTable( indexes );
} else {
factHandleMemory = new RightTupleList();
}
memory = new BetaMemory( config.isSequential() ? null : tupleMemory,
factHandleMemory,
this.createContext() );
} else {
memory = new BetaMemory( config.isSequential() ? null : new LeftTupleList(),
new RightTupleList(),
this.createContext() );
}
return memory;