#include <result_table.h>
Public Member Functions | |
| ResultTable (int entitySize) | |
| Constructor.   | |
| int | getId (int index) | 
| Returns id of tuple at given index.   | |
| const T * | getFeatureArray (int index) | 
| Returns feature vector of tuple at given index.   | |
| double | getEps (int index) | 
| Returns eps of tuple at given index.   | |
| int | getTruthValue (int index) | 
| Returns truth value of tuple at given index.   | |
| int * | getPointer (int index) | 
| Returns pointer to the id of tuple at given index.   | |
| void | setEps (int index, double new_eps) | 
| Sets eps value of tuple at given index.   | |
| void | setFeatureVectorComponent (int index, int featureIndex, VFloat featureValue) | 
| Sets feature vector component of tuple at given index.   | |
| void | setFeatureVectorFromStr (int index, std::string str) | 
| Sets feature vector of tuple at given index from string in svm format.   | |
| void | setTruthValue (int index, int new_truth_value) | 
| Sets truth value of tuple at given index.   | |
| void | setId (int index, int id) | 
| Sets id of tuple at given index.   | |
| void | sort () | 
| sorts entities based on epsilons   | |
Private Member Functions | |
| int | resultTupleComp (const void *, const void *) | 
| Compares two tuples based on eps and returns -1 if first one is smaller, 0 if they are equal and 1 otherwise.   | |
Private Attributes | |
| int | tupleSize | 
| size of tuple   | |
| int | entity_size | 
| # of entities   | |
| resultTuple * | table | 
| all entities   | |
| T * | pFeatures | 
| packed feature vectors   | |
| int * | packedIds | 
| packed ids   | |
| bool | bCluster | 
| set this to recluster in memory on each sort   | |
Classes | |
| struct | resultTuple | 
| ResultTable< T >::ResultTable | ( | int | entitySize | ) | 
Constructor.
| [in] | entitySize | # of entities | 
| double ResultTable< T >::getEps | ( | int | index | ) | 
Returns eps of tuple at given index.
| [in] | index | index of entity in entity table | 
| const T * ResultTable< T >::getFeatureArray | ( | int | index | ) | 
Returns feature vector of tuple at given index.
| [in] | index | index of entity in entity table | 
| int ResultTable< T >::getId | ( | int | index | ) | 
Returns id of tuple at given index.
| [in] | index | index of entity in entity table | 
| int * ResultTable< T >::getPointer | ( | int | index | ) | 
Returns pointer to the id of tuple at given index.
| [in] | index | index of entity in entity table | 
| int ResultTable< T >::getTruthValue | ( | int | index | ) | 
Returns truth value of tuple at given index.
| [in] | index | index of entity in entity table | 
| int ResultTable< T >::resultTupleComp | ( | const void * | a, | |
| const void * | b | |||
| ) |  [private] | 
        
Compares two tuples based on eps and returns -1 if first one is smaller, 0 if they are equal and 1 otherwise.
| [in] | a | first tuple | 
| [in] | b | second tuple | 
| void ResultTable< T >::setEps | ( | int | index, | |
| double | new_eps | |||
| ) | 
Sets eps value of tuple at given index.
| [in] | index | index of entity in entity table | 
| [in] | new_eps | new eps value | 
| void ResultTable< T >::setFeatureVectorComponent | ( | int | index, | |
| int | featureIndex, | |||
| VFloat | featureValue | |||
| ) | 
Sets feature vector component of tuple at given index.
| [in] | index | index of entity in entity table | 
| [in] | featureIndex | index of feature vector | 
| [in] | featureValue | value of feature vector at given featureIndex | 
| void ResultTable< T >::setFeatureVectorFromStr | ( | int | index, | |
| std::string | str | |||
| ) | 
Sets feature vector of tuple at given index from string in svm format.
| [in] | index | index of entity in entity table | 
| [in] | str | feature vector in svm format | 
| void ResultTable< T >::setId | ( | int | index, | |
| int | id | |||
| ) | 
Sets id of tuple at given index.
| [in] | index | index of entity in entity table | 
| [in] | id | new id | 
| void ResultTable< T >::setTruthValue | ( | int | index, | |
| int | new_truth_value | |||
| ) | 
Sets truth value of tuple at given index.
| [in] | index | index of entity in entity table | 
| [in] | new_truth_value | new truth value | 
| void ResultTable< T >::sort | ( | ) | 
sorts entities based on epsilons
bool ResultTable< T >::bCluster [private]           | 
        
set this to recluster in memory on each sort
int ResultTable< T >::entity_size [private]           | 
        
# of entities
int* ResultTable< T >::packedIds [private]           | 
        
packed ids
T* ResultTable< T >::pFeatures [private]           | 
        
packed feature vectors
resultTuple* ResultTable< T >::table [private]           | 
        
all entities
int ResultTable< T >::tupleSize [private]           | 
        
size of tuple
 1.4.7