strus  0.17
Public Member Functions | List of all members
strus::VectorStorageTransactionInterface Class Referenceabstract

Interface for building a repository of vectors with classifiers to map them to discrete features. More...

#include <vectorStorageTransactionInterface.hpp>

Public Member Functions

virtual ~VectorStorageTransactionInterface ()
 Destructor. More...
 
virtual void defineVector (const std::string &type, const std::string &feat, const WordVector &vec)=0
 Define a vector for a feature for later retrieval. More...
 
virtual void defineFeature (const std::string &type, const std::string &feat)=0
 Define a feature without vector. More...
 
virtual void defineScalar (const std::string &name, double value)=0
 Define some scalar configuration parameter used in calculation (depending on implementation) More...
 
virtual void clear ()=0
 Clear all vectors,types and feature names in the storage. More...
 
virtual bool commit ()=0
 Ensure the persistent storage of the features added with addFeature(const std::string&,const WordVector&) till now. More...
 
virtual void rollback ()=0
 Rollback of the transaction, no changes made. More...
 

Detailed Description

Interface for building a repository of vectors with classifiers to map them to discrete features.

Remarks
This interface has the transaction context logically enclosed in the object, though use in a multithreaded context does not make much sense. Thread safety of the interface is guaranteed, but not the performance in a multithreaded context. It is thought as class that internally makes heavily use of multithreading, but is not thought to be fed by mutliple threads.

Constructor & Destructor Documentation

virtual strus::VectorStorageTransactionInterface::~VectorStorageTransactionInterface ( )
inlinevirtual

Destructor.

Member Function Documentation

virtual void strus::VectorStorageTransactionInterface::clear ( )
pure virtual

Clear all vectors,types and feature names in the storage.

virtual bool strus::VectorStorageTransactionInterface::commit ( )
pure virtual

Ensure the persistent storage of the features added with addFeature(const std::string&,const WordVector&) till now.

Returns
true on success, false if failed
virtual void strus::VectorStorageTransactionInterface::defineFeature ( const std::string &  type,
const std::string &  feat 
)
pure virtual

Define a feature without vector.

Parameters
[in]typeof the feature to add
[in]featname of the feature to add
virtual void strus::VectorStorageTransactionInterface::defineScalar ( const std::string &  name,
double  value 
)
pure virtual

Define some scalar configuration parameter used in calculation (depending on implementation)

Parameters
[in]namename of the variable (depending on implementation)
[in]valuevalue assigned to the variable
virtual void strus::VectorStorageTransactionInterface::defineVector ( const std::string &  type,
const std::string &  feat,
const WordVector vec 
)
pure virtual

Define a vector for a feature for later retrieval.

Parameters
[in]typeof the feature associated with the vector
[in]featname of the feature associated with the vector
[in]vecvector to define for this feature
virtual void strus::VectorStorageTransactionInterface::rollback ( )
pure virtual

Rollback of the transaction, no changes made.


The documentation for this class was generated from the following file: