43#ifndef DOXYGEN_SHOULD_SKIP_THIS
53 return _min_nb_rows_per_thread_;
58 return _nodeId2columns_;
63 return _parsers_[0].data.database();
68 const bool check_discrete_vars) {
71 _last_nonDB_ids_.clear();
72 _last_nonDB_counting_.clear();
73 return _last_nonDB_counting_;
78 if (_last_nonDB_ids_.contains(ids))
79 return _extractFromCountings_(ids, _last_nonDB_ids_, _last_nonDB_counting_);
80 else if (_last_DB_ids_.contains(ids))
81 return _extractFromCountings_(ids, _last_DB_ids_, _last_DB_counting_);
83 if (check_discrete_vars) _checkDiscreteVariables_(ids);
84 return _countFromDatabase_(ids);
89 INLINE
const std::vector< std::pair< std::size_t, std::size_t > >&
99 _dispatchRangesToThreads_();
virtual void setNumberOfThreads(Size nb)
sets the number max of threads to be used by the class containing this ThreadNumberManager
The class representing a tabular database as used by learning tasks.
A class for storing a pair of sets of NodeIds, the second one corresponding to a conditional set.
std::size_t minNbRowsPerThread() const
returns the minimum of rows that each thread should process
const std::vector< std::pair< std::size_t, std::size_t > > & ranges() const
returns the current ranges
virtual void setNumberOfThreads(Size nb)
sets the number max of threads that can be used
const DatabaseTable & database() const
returns the database on which we perform the counts
const Bijection< NodeId, std::size_t > & nodeId2Columns() const
returns the mapping from ids to column positions in the database
const std::vector< double > & counts(const IdCondSet &ids, const bool check_discrete_vars=false)
returns the counts over all the variables in an IdCondSet
std::size_t Size
In aGrUM, hashed values are unsigned long int.
include the inlined functions if necessary
gum is the global namespace for all aGrUM entities
The class that computes counting of observations from the database.