STLMainMemory_Storage_Manager< T > Class Template Reference

STLMainMemory_Storage_Manager extends Storage_Manager and is used for main memory architecture. More...

#include <main_memory_storage_manager.h>

Inheritance diagram for STLMainMemory_Storage_Manager< T >:

Storage_Manager< T > List of all members.

Public Member Functions

 STLMainMemory_Storage_Manager (struct main_memory_storage_spec *s)
 Constructor that loads entities with insertEntity method and do not use database connection.
 STLMainMemory_Storage_Manager (Hazy_Database *db_conn, struct main_memory_storage_spec *s, struct hazy_model &hm)
 Constructor that loads entities from the database.
void resort (struct hazy_model &hm)
 Makes a resort to reorganize entities according to their epsilon values.
void incrementalUpdate (struct hazy_model &m, double &waste_time)
 Makes an incremental update on the entities by using hazy model.
void insertEntity (struct hazy_model &m, key e, T x)
 Inserts the entity to the storage manager.
void getEntityClass (key e, sClass &c, struct hazy_model &m)
 Retrieves the class of the entity.
void getNumInClass (sClass c, int &nClass, struct hazy_model &m, double &waste_time)
 Retrieves # of elements that belong to a given class.
 ~STLMainMemory_Storage_Manager ()
 Destructor.

Private Types

typedef std::vector< struct
STLMainMemory_Storage_Manager<
T >::internal_record >::iterator 
internal_iterator
 To get around C++ compliler parsing issue.
typedef std::map< key, T
>::iterator 
key_iterator_type

Private Member Functions

double classify (struct model &m, T &v)
 Classifies given entity with the given model.

Static Private Member Functions

static bool cluster_sort_predicate (const internal_record &x, const internal_record &y)

Private Attributes

std::map< key, T > _entity_table
 variable that keeps all entity information
std::map< key, bool > _eager_external_table
 external table that is used for eager approach
hazy_model::strategy strategy
std::vector< internal_record_itable
 internal table structure that is used by Hazy
internal_iterator low_water_it_cached
internal_iterator high_water_it_cached

Classes

struct  internal_record
 Maintained only by hazy strategies. More...

Detailed Description

template<class T>
class STLMainMemory_Storage_Manager< T >

STLMainMemory_Storage_Manager extends Storage_Manager and is used for main memory architecture.


Member Typedef Documentation

template<class T>
typedef std::vector<struct STLMainMemory_Storage_Manager<T>::internal_record>::iterator STLMainMemory_Storage_Manager< T >::internal_iterator [private]

To get around C++ compliler parsing issue.

template<class T>
typedef std::map<key,T>::iterator STLMainMemory_Storage_Manager< T >::key_iterator_type [private]


Constructor & Destructor Documentation

template<class T>
STLMainMemory_Storage_Manager< T >::STLMainMemory_Storage_Manager ( struct main_memory_storage_spec s  ) 

Constructor that loads entities with insertEntity method and do not use database connection.

Parameters:
[in] s main memory storage spec

template<class T>
STLMainMemory_Storage_Manager< T >::STLMainMemory_Storage_Manager ( Hazy_Database db_conn,
struct main_memory_storage_spec s,
struct hazy_model hm 
)

Constructor that loads entities from the database.

Parameters:
[in] db_conn database connection
[in] s main memory storage spec
[in] hm hazy model to calculate entity epsilons

template<class T>
STLMainMemory_Storage_Manager< T >::~STLMainMemory_Storage_Manager (  )  [inline]

Destructor.


Member Function Documentation

template<class T>
double STLMainMemory_Storage_Manager< T >::classify ( struct model m,
T &  v 
) [inline, private]

Classifies given entity with the given model.

Parameters:
[in] m given model
[in] v feature vector
Returns:
eps calculated by the given model

template<class T>
static bool STLMainMemory_Storage_Manager< T >::cluster_sort_predicate ( const internal_record x,
const internal_record y 
) [inline, static, private]

template<class T>
void STLMainMemory_Storage_Manager< T >::getEntityClass ( key  e,
sClass c,
struct hazy_model m 
) [virtual]

Retrieves the class of the entity.

Parameters:
[in] e entitiy id
[out] c class of the entity
[in] m hazy model that we use to classify the entity

Implements Storage_Manager< T >.

template<class T>
void STLMainMemory_Storage_Manager< T >::getNumInClass ( sClass  c,
int &  nClass,
struct hazy_model m,
double &  waste_time 
) [virtual]

Retrieves # of elements that belong to a given class.

Parameters:
[in] c class that we ask # of elements belong it
[out] nClass # of elements in the class
[in] m hazy model that we use to classify entities
[out] waste_time waste time calculated during the method execution

Implements Storage_Manager< T >.

template<class T>
void STLMainMemory_Storage_Manager< T >::incrementalUpdate ( struct hazy_model m,
double &  waste_time 
) [virtual]

Makes an incremental update on the entities by using hazy model.

Parameters:
[in] m hazy model that we use to update entities classes
[out] waste_time waste time calcaulted during the method execution

Implements Storage_Manager< T >.

template<class T>
void STLMainMemory_Storage_Manager< T >::insertEntity ( struct hazy_model m,
key  e,
x 
) [virtual]

Inserts the entity to the storage manager.

Parameters:
[in] m hazy model which is used when the approach is hazy, because we need to calculate eps value
[in] e id of the entity
[in] x feature vector of the entity

Implements Storage_Manager< T >.

template<class T>
void STLMainMemory_Storage_Manager< T >::resort ( struct hazy_model hm  )  [virtual]

Makes a resort to reorganize entities according to their epsilon values.

Parameters:
[in] hm hazy model that we use to re-calculate epsllon values

Implements Storage_Manager< T >.


Member Data Documentation

template<class T>
std::map<key, bool> STLMainMemory_Storage_Manager< T >::_eager_external_table [private]

external table that is used for eager approach

template<class T>
std::map<key, T> STLMainMemory_Storage_Manager< T >::_entity_table [private]

variable that keeps all entity information

template<class T>
std::vector<internal_record> STLMainMemory_Storage_Manager< T >::_itable [private]

internal table structure that is used by Hazy

template<class T>
internal_iterator STLMainMemory_Storage_Manager< T >::high_water_it_cached [private]

template<class T>
internal_iterator STLMainMemory_Storage_Manager< T >::low_water_it_cached [private]

template<class T>
hazy_model::strategy STLMainMemory_Storage_Manager< T >::strategy [private]


The documentation for this class was generated from the following files:
Generated on Wed Dec 15 10:46:16 2010 for Hazy_System by  doxygen 1.4.7