libfaster API Documentation  Development Version
Super fast distributted computing
faster::indexedFdd< K, T > Class Template Reference
Inheritance diagram for faster::indexedFdd< K, T >:
faster::iFddCore< K, T > faster::fddBase

Description

template<typename K, typename T>
class faster::indexedFdd< K, T >

Definition at line 27 of file fastContext.h.

Public Member Functions

 indexedFdd (fastContext &c)
 Create a empty indexedFdd.
 
 indexedFdd (fastContext &c, size_t s, const std::vector< size_t > &dataAlloc)
 Create a empty indexedFdd with a pre allocated size.
 
 indexedFdd (fastContext &c, size_t s)
 Create a empty indexedFdd with a pre allocated size.
 
 indexedFdd (fastContext &c, K *keys, T *data, size_t size)
 Create a indexedFdd from a array in memory.
 
 indexedFdd (fastContext &c, std::string)
 Create a indexedFdd from a file.
 
 ~indexedFdd ()
 Class Destructor. WARNING: It will deallocate distributed memory.
 
std::vector< std::pair< K, T > > collect ()
 Brings the distributted data from a indexedFDD to the driver memory. More...
 
indexedFdd< K, T > * cache ()
 Prevents automatic memory deallocation from hapenning. More...
 
indexedFdd< K, T > * update (updateIFunctionP< K, T > funcP)
 updates the content of a indexedFDD
 
template<typename L , typename U >
indexedFdd< L, U > * map (ImapIFunctionP< K, T, L, U > funcP)
 creates a indexedFdd<L,U>
 
template<typename L , typename U >
indexedFdd< L, U > * map (IPmapIFunctionP< K, T, L, U > funcP)
 creates a indexedFdd<L,U*>
 
template<typename U >
fdd< U > * map (mapIFunctionP< K, T, U > funcP)
 creates a fdd<U>
 
template<typename U >
fdd< U > * map (PmapIFunctionP< K, T, U > funcP)
 creates a fdd<U *>
 
template<typename L , typename U >
indexedFdd< L, U > * mapByKey (ImapByKeyIFunctionP< K, T, L, U > funcP)
 creates a indexedFdd<L,U>
 
template<typename L , typename U >
indexedFdd< L, U > * mapByKey (IPmapByKeyIFunctionP< K, T, L, U > funcP)
 creates a indexedFdd<L,U*>
 
template<typename L , typename U >
fdd< U > * mapByKey (mapByKeyIFunctionP< K, T, U > funcP)
 creates a fdd<U>
 
template<typename L , typename U >
fdd< U > * mapByKey (PmapByKeyIFunctionP< K, T, U > funcP)
 creates a fdd<U *>
 
template<typename L , typename U >
indexedFdd< L, U > * bulkMap (IbulkMapIFunctionP< K, T, L, U > funcP)
 creates a indexedFdd<L,U>
 
template<typename L , typename U >
indexedFdd< L, U > * bulkMap (IPbulkMapIFunctionP< K, T, L, U > funcP)
 creates a indexedFdd<L,U*>
 
template<typename L , typename U >
fdd< U > * bulkMap (bulkMapIFunctionP< K, T, U > funcP)
 creates a fdd<U>
 
template<typename L , typename U >
fdd< U > * bulkMap (PbulkMapIFunctionP< K, T, U > funcP)
 creates a fdd<U *>
 
template<typename L , typename U >
indexedFdd< L, U > * flatMap (IflatMapIFunctionP< K, T, L, U > funcP)
 creates a indexedFdd<L,U>
 
template<typename L , typename U >
indexedFdd< L, U > * flatMap (IPflatMapIFunctionP< K, T, L, U > funcP)
 creates a indexedFdd<L,U*>
 
template<typename L , typename U >
fdd< U > * flatMap (flatMapIFunctionP< K, T, U > funcP)
 creates a fdd<U>
 
template<typename L , typename U >
fdd< U > * flatMap (PflatMapIFunctionP< K, T, U > funcP)
 creates a fdd<U *>
 
template<typename L , typename U >
indexedFdd< L, U > * bulkFlatMap (IbulkFlatMapIFunctionP< K, T, L, U > funcP)
 creates a indexedFdd<L,U>
 
template<typename L , typename U >
indexedFdd< L, U > * bulkFlatMap (IPbulkFlatMapIFunctionP< K, T, L, U > funcP)
 creates a indexedFdd<L,U*>
 
template<typename L , typename U >
fdd< U > * bulkFlatMap (bulkFlatMapIFunctionP< K, T, U > funcP)
 creates a fdd<U>
 
template<typename L , typename U >
fdd< U > * bulkFlatMap (PbulkFlatMapIFunctionP< K, T, U > funcP)
 creates a fdd<U *>
 
std::pair< K, T > reduce (IreduceIFunctionP< K, T > funcP)
 summarizes a fdd<K,T> into a single value of type T
 
std::pair< K, T > bulkReduce (IbulkReduceIFunctionP< K, T > funcP)
 summarizes a fdd<K,T> into a single value of type T using a bulk function pair<K,T> F(K, T, K, T)
 
- Public Member Functions inherited from faster::iFddCore< K, T >
template<typename U >
groupedFdd< K > * cogroup (iFddCore< K, U > *fdd1)
 Groupes two datasets twogether according with the keys of the first dataset. More...
 
template<typename U , typename V >
groupedFdd< K > * cogroup (iFddCore< K, U > *fdd1, iFddCore< K, V > *fdd2)
 Groupes tree datasets together according with the keys of the first dataset. More...
 
std::unordered_map< K, size_t > countByKey ()
 Count how many unique key there is in the dataset. More...
 
indexedFdd< K, T > * groupByKey ()
 Groups distributed dataset by key. More...
 
void discard ()
 deallocates previously cached FDD
 
void writeToFile (std::string path, std::string sufix)
 Writes FDD content to file. More...
 
bool isGroupedByKey ()
 Determines if a dataset is grouped by key. More...
 
void setGroupedByKey (bool gbk)
 (UNUSED)
 
void setGroupedByMap (bool gbm)
 (UNUSED)
 
- Public Member Functions inherited from faster::fddBase
void setSize (size_t &s)
 
size_t getSize ()
 Returns the size of the dataset.
 
int getId ()
 Returns the identification number of the dataset.
 
const std::vector< size_t > & getAlloc ()
 Returns the allocation identification number of the dataset.
 
fddType tType ()
 
fddType kType ()
 
bool isCached ()
 Returns true if the dataset is cached.
 

Additional Inherited Members

- Protected Member Functions inherited from faster::iFddCore< K, T >
 iFddCore (fastContext &c)
 
 iFddCore (fastContext &c, size_t s, const std::vector< size_t > &dataAlloc)
 
std::unordered_map< K, std::tuple< size_t, int, size_t > > * calculateKeyCount (std::vector< std::pair< void *, size_t > > &result)
 
std::unordered_map< K, int > calculateKeyMap (std::unordered_map< K, std::tuple< size_t, int, size_t >> &count)
 
void update (void *funcP, fddOpType op)
 
fddBase_map (void *funcP, fddOpType op, fddBase *newFdd, system_clock::time_point &start)
 
template<typename U >
fdd< U > * map (void *funcP, fddOpType op)
 
template<typename L , typename U >
indexedFdd< L, U > * mapI (void *funcP, fddOpType op)
 
indexedFdd< K, T > * groupByKeyMapped ()
 
indexedFdd< K, T > * groupByKeyHashed ()
 
- Protected Attributes inherited from faster::iFddCore< K, T >
bool groupedByKey
 
bool groupedByMap
 
fastContextcontext
 
- Protected Attributes inherited from faster::fddBase
fddType _kType
 
fddType _tType
 
unsigned long int id
 
unsigned long int totalBlocks
 
unsigned long int size
 
std::vector< size_t > dataAlloc
 
bool cached
 

Member Function Documentation

§ collect()

template<typename K, typename T>
std::vector<std::pair<K,T> > faster::indexedFdd< K, T >::collect ( )
inline

Brings the distributted data from a indexedFDD to the driver memory.

Returns
a vector with the content of the indexedFDD

Definition at line 211 of file indexedFdd.h.


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