8#ifndef VECTOR_DIST_OPERATORS_LIST_KER_HPP_
9#define VECTOR_DIST_OPERATORS_LIST_KER_HPP_
18 :v(v),is_sorted(is_sorted)
35template<
typename vector_dist_ker_type>
48 void add(vector_dist_ker_type & v,
bool is_sorted)
54 if (vkers.
size() >= 64)
56 std::cout << __FILE__ <<
":" << __LINE__ <<
" The array of tracked vector_dist_ker become suspiciously big, are there memory leak ? " << std::endl;
66 void update(
const vector_dist_ker_type & v)
68 for (
size_t i = 0 ; i < vkers.
size() ; i++)
70 if (vkers.get(i).is_sorted ==
false)
75 void update_sort(
const vector_dist_ker_type & vs)
77 for (
size_t i = 0 ; i < vkers.
size() ; i++)
79 if (vkers.get(i).is_sorted ==
true)
80 {vkers.get(i).v = vs;}
90 void remove(vector_dist_ker_type & v)
92 for (
size_t i = 0 ; i < vkers.
size() ; i++)
94 if (&vkers.get(i).v == &v)
117 bool check(
const vector_dist_ker_type & v)
119 for (
size_t i = 0 ; i < vkers.
size() ; i++)
121 if (!(vkers.get(i).v == v))
Implementation of 1-D std::vector like structure.
This class contain a list of all tracked vector_dist_ker around.
void update(const vector_dist_ker_type &v)
Update the addresses of all vector_dist_kernels around.
void remove(vector_dist_ker_type &v)
Remove one vector_dist_kernels entry.
size_t n_entry()
Return the number of entries.
bool check(const vector_dist_ker_type &v)
Check that all the entries are aligned to the latest vector_dist_ker_type.
void add(vector_dist_ker_type &v, bool is_sorted)
Add a new vector_dist_kernel to track.