Go to the source code of this file.
|
| CHECK |
| Integer constants used to specify which cell should be check.
|
|
| EXISTS |
| Integer constants used to specify which cell should be check to exist or not.
|
|
|
typedef std::vector< std::pair< std::vector< double >, size_t > > | Counts_type |
|
template<typename Cell_Type > |
using | Row_type = Map< size_t, Cell< Cell_Type > > |
|
template<typename Cell_Type > |
using | Col_type = Map< size_t, Cell< Cell_Type > * > |
|
template<typename Ta = double, typename Tb = size_t> |
using | MapVec_type = std::unordered_map< std::vector< Ta >, Tb, vecHasher< Ta > > |
|
template<typename Array_Type , typename Data_Type > |
using | Hasher_fun_type = std::function< std::vector< double >(const Array_Type &, Data_Type *)> |
| Hasher function used by the counter. More...
|
|
|
template<typename Array_Type , typename Data_Type > |
using | Counter_fun_type = std::function< double(const Array_Type &, size_t, size_t, Data_Type &)> |
| Counter and rule functions. More...
|
|
template<typename Array_Type , typename Data_Type > |
using | Rule_fun_type = std::function< bool(const Array_Type &, size_t, size_t, Data_Type &)> |
|
|
std::vector< size_t > | sort_array (const double *v, size_t start, size_t ncols, size_t nrows) |
| Ascending sorting an array. More...
|
|
template<typename T > |
T | vec_inner_prod (const T *a, const T *b, size_t n) |
|
template<> |
double | vec_inner_prod (const double *a, const double *b, size_t n) |
|
|
template<typename T > |
bool | vec_equal (const std::vector< T > &a, const std::vector< T > &b) |
| Compares if -a- and -b- are equal. More...
|
|
template<typename T > |
bool | vec_equal_approx (const std::vector< T > &a, const std::vector< T > &b, double eps=1e-100) |
|
◆ Col_type
template<typename Cell_Type >
◆ Counter_fun_type
template<typename Array_Type , typename Data_Type >
using Counter_fun_type = std::function<double(const Array_Type &, size_t, size_t, Data_Type &)> |
Counter and rule functions.
- Parameters
-
Array_Type | a BArray |
unit,size_t | Focal cell |
Data_Type | Data associated with the function, for example, id of the attribute in the Array. |
- Returns
Counter_fun_type
a double (the change statistic)
-
Rule_fun_type
a bool. True if the cell is blocked.
Definition at line 187 of file typedefs.hpp.
◆ Counts_type
typedef std::vector< std::pair< std::vector<double>, size_t > > Counts_type |
◆ Hasher_fun_type
template<typename Array_Type , typename Data_Type >
using Hasher_fun_type = std::function<std::vector<double>(const Array_Type &, Data_Type *)> |
Hasher function used by the counter.
Used to characterize the support of the array.
- Template Parameters
-
Definition at line 200 of file typedefs.hpp.
◆ MapVec_type
template<typename Ta = double, typename Tb = size_t>
◆ Row_type
template<typename Cell_Type >
◆ Rule_fun_type
template<typename Array_Type , typename Data_Type >
using Rule_fun_type = std::function<bool(const Array_Type &, size_t, size_t, Data_Type &)> |
◆ sort_array()
std::vector< size_t > sort_array |
( |
const double * |
v, |
|
|
size_t |
start, |
|
|
size_t |
ncols, |
|
|
size_t |
nrows |
|
) |
| |
|
inline |
Ascending sorting an array.
It will sort an array solving ties using the next column. Data is stored column-wise.
- Template Parameters
-
- Parameters
-
- Returns
- std::vector<size_t> The sorting index.
Definition at line 141 of file typedefs.hpp.
◆ vec_equal()
template<typename T >
bool vec_equal |
( |
const std::vector< T > & |
a, |
|
|
const std::vector< T > & |
b |
|
) |
| |
|
inline |
Compares if -a- and -b- are equal.
- Parameters
-
a,b | Two vectors of the same length |
- Returns
true
if all elements are equal.
Definition at line 210 of file typedefs.hpp.
◆ vec_equal_approx()
template<typename T >
bool vec_equal_approx |
( |
const std::vector< T > & |
a, |
|
|
const std::vector< T > & |
b, |
|
|
double |
eps = 1e-100 |
|
) |
| |
|
inline |
◆ vec_inner_prod() [1/2]
template<>
double vec_inner_prod |
( |
const double * |
a, |
|
|
const double * |
b, |
|
|
size_t |
n |
|
) |
| |
|
inline |
◆ vec_inner_prod() [2/2]
template<typename T >
T vec_inner_prod |
( |
const T * |
a, |
|
|
const T * |
b, |
|
|
size_t |
n |
|
) |
| |
|
inline |