|
GENIE
|
This class manages one inverted list. More...
#include <inv_list.h>
Public Member Functions | |
| inv_list () | |
| Create an empty inv_list. More... | |
| inv_list (std::vector< int > &vin) | |
| inv_list (std::vector< int > *vin) | |
| unsigned int | _shift_bits_subsequence () |
| void | invert_bijectMap (std::vector< std::vector< int > > &vin) |
| void | invert_bijectMap (int *data, unsigned int item_num, unsigned int *index, unsigned int row_num) |
| Handle input from binary file. More... | |
| void | invert_subsequence (std::vector< std::vector< int >> &vin) |
| void | invert_subsequence (int *data, unsigned int item_num, unsigned int *index, unsigned int row_num) |
| This function is used for subsequence search, binary input. More... | |
| void | invert_sequence (std::vector< std::vector< int >> &vin, int shift_bits) |
| This is used for sequence match. More... | |
| inv_list (std::vector< std::string > &vin) | |
| inv_list (std::vector< std::string > *vin) | |
| int | min () |
| Return the min value of the inverted vector. More... | |
| int | max () |
| Return the max value of the inverted vector. More... | |
| int | size () |
| Return the number of instances. More... | |
| void | invert (std::vector< int > &vin) |
| void | invert (std::vector< int > *vin) |
| void | invert (std::vector< std::string > &vin) |
| void | invert (std::vector< std::string > *vin) |
| void | invert (std::vector< std::string > &vin, int(*stoi)(std::string &)) |
| void | invert (std::vector< std::string > *vin, int(*stoi)(std::string &)) |
| bool | contains (int value) |
| Check whether the vaule is in the inv_list. More... | |
| std::vector< int > * | index (int value) |
| The indexes of the value. More... | |
| int | value_range () |
| Return the number of different values in the attribute. More... | |
Public Attributes | |
| std::unordered_map< int, int > | _distinct |
This class manages one inverted list.
This class contains information about one attribute and value range of the attribute. It also stores id of data points that contain a specific value on that attribute.
Definition at line 23 of file inv_list.h.
|
inline |
Create an empty inv_list.
Definition at line 61 of file inv_list.h.
| genie::table::inv_list::inv_list | ( | std::vector< int > & | vin | ) |
| genie::table::inv_list::inv_list | ( | std::vector< int > * | vin | ) |
| genie::table::inv_list::inv_list | ( | std::vector< std::string > & | vin | ) |
| genie::table::inv_list::inv_list | ( | std::vector< std::string > * | vin | ) |
| unsigned int genie::table::inv_list::_shift_bits_subsequence | ( | ) |
Definition at line 290 of file inv_list.cc.
| bool genie::table::inv_list::contains | ( | int | value | ) |
Check whether the vaule is in the inv_list.
| value | The given value. |
Definition at line 373 of file inv_list.cc.
| vector< int > * genie::table::inv_list::index | ( | int | value | ) |
The indexes of the value.
| value | The given value. |
The value's indexes in the original vector. Return NULL if the given value does not appear in the original vector.
Definition at line 381 of file inv_list.cc.
| void genie::table::inv_list::invert | ( | std::vector< int > & | vin | ) |
| void genie::table::inv_list::invert | ( | std::vector< int > * | vin | ) |
| void genie::table::inv_list::invert | ( | std::vector< std::string > & | vin | ) |
| void genie::table::inv_list::invert | ( | std::vector< std::string > * | vin | ) |
| void genie::table::inv_list::invert | ( | std::vector< std::string > & | vin, |
| int(*)(std::string &) | stoi | ||
| ) |
| void genie::table::inv_list::invert | ( | std::vector< std::string > * | vin, |
| int(*)(std::string &) | stoi | ||
| ) |
| void genie::table::inv_list::invert_bijectMap | ( | std::vector< std::vector< int > > & | vin | ) |
| void genie::table::inv_list::invert_bijectMap | ( | int * | data, |
| unsigned int | item_num, | ||
| unsigned int * | index, | ||
| unsigned int | row_num | ||
| ) |
Handle input from binary file.
| data | The data array |
| item_num | Length of data array |
| index | Stores the starting position of each data point in data array |
| row_num | Length of index array |
This function does the same thing as invert_bijectMap(vector<vector<int> > & vin), but the input is from a binary form.
Definition at line 160 of file inv_list.cc.
| void genie::table::inv_list::invert_sequence | ( | std::vector< std::vector< int >> & | vin, |
| int | shift_bits | ||
| ) |
This is used for sequence match.
| vin | Data to be inverted. |
| shift_bits | Number of bits to shift. |
Definition at line 87 of file inv_list.cc.
| void genie::table::inv_list::invert_subsequence | ( | std::vector< std::vector< int >> & | vin | ) |
| void genie::table::inv_list::invert_subsequence | ( | int * | data, |
| unsigned int | item_num, | ||
| unsigned int * | index, | ||
| unsigned int | row_num | ||
| ) |
This function is used for subsequence search, binary input.
| data | Array storing all sequence elements |
| item_num | Length of data array |
| index | Stores elements pointing to starting position of each row in data array |
| row_num | Length of index array |
Definition at line 232 of file inv_list.cc.
| int genie::table::inv_list::max | ( | ) |
Return the max value of the inverted vector.
Definition at line 42 of file inv_list.cc.
| int genie::table::inv_list::min | ( | ) |
Return the min value of the inverted vector.
Definition at line 37 of file inv_list.cc.
| int genie::table::inv_list::size | ( | ) |
Return the number of instances.
Definition at line 47 of file inv_list.cc.
| int genie::table::inv_list::value_range | ( | ) |
Return the number of different values in the attribute.
Definition at line 389 of file inv_list.cc.
| std::unordered_map<int, int> genie::table::inv_list::_distinct |
Definition at line 29 of file inv_list.h.