metric_set.h
Go to the documentation of this file.
1 
8 #pragma once
9 
10 #include <set>
11 #include <vector>
12 #include <fstream>
13 #include <iterator>
14 #include <algorithm>
15 #include <numeric>
16 #include <utility>
17 #include "interop/util/map.h"
18 #include "interop/util/exception.h"
23 #include "interop/util/assert.h"
24 
25 #ifdef _MSC_VER
26 #pragma warning(push)
27 #pragma warning(disable:4290) // MSVC warns that it ignores the exception specification.
28 #endif
29 
30 namespace illumina { namespace interop { namespace model { namespace metric_base
31 {
32 
34  template<class Metric, class Type=typename Metric::base_t> struct metric_comparison;
39  template<typename T>
40  class metric_set : public T::header_type
41  {
42  public:
45  typedef std::vector<T> metric_array_t;
47  typedef typename T::header_type header_type;
49  typedef typename T::base_t base_t;
51  typedef T metric_type;
55  typedef typename T::id_t id_t;
57  typedef typename T::uint_t uint_t;
59  typedef std::vector<uint_t> id_vector;
61  typedef std::vector<id_t> key_vector;
63  typedef typename metric_array_t::size_type size_type;
65  typedef std::set<uint_t> id_set_t; // TODO: Do the same for set
67 #ifdef INTEROP_HAS_UNORDERED_MAP // Workaround for SWIG not understanding the macro
68  typedef std::unordered_map<id_t, size_t> offset_map_t;
69 #else
70  typedef std::map<id_t, size_t> offset_map_t;
71 #endif
72 
73  public:
77  typedef typename metric_array_t::const_iterator const_iterator;
79  typedef typename metric_array_t::iterator iterator;
80  enum
81  {
86  };
87 
88  public:
93  metric_set(const ::int16_t version )
94  : header_type(header_type::default_header()), m_version(version), m_data_source_exists(false)
95  { }
101  metric_set(const header_type &header = header_type::default_header(), const ::int16_t version = 0)
102  : header_type(header), m_version(version), m_data_source_exists(false)
103  { }
104 
111  metric_set(const metric_array_t &vec, const ::int16_t version, const header_type &header) :
112  header_type(header),
113  m_data(vec),
114  m_version(version),
115  m_data_source_exists(false)
116  {
117  rebuild_index(true);
118  }
119 
120  public:
126  void copy_by_tile(const metric_set<T>& origin, const base_metric& tile_id)
127  {
128  clear();
129  append_tiles(origin, tile_id);
130  }
136  void append_tiles(const metric_set<T>& origin, const base_metric& tile_id)
137  {
138  reserve(origin.size()+size());
139  for(const_iterator it = origin.begin();it != origin.end();++it)
140  {
141  if(metric_comparison_t::to_lane(tile_id) == to_lane(*it) &&
142  metric_comparison_t::to_tile(tile_id) == to_tile(*it))
143  insert(*it);
144  }
145  }
150  bool data_source_exists()const
151  {
152  return !empty() || m_data_source_exists;
153  }
158  void data_source_exists(const bool exists)
159  {
160  m_data_source_exists = exists;
161  }
166  const_iterator begin() const
167  {
168  return m_data.begin();
169  }
170 
175  const_iterator end() const
176  {
177  return m_data.end();
178  }
179 
184  iterator begin()
185  {
186  return m_data.begin();
187  }
188 
193  iterator end()
194  {
195  return m_data.end();
196  }
197 
201  void sort()
202  {
203  std::sort(m_data.begin(), m_data.end());
204  }
205 
206  public:
213  void rebuild_index(const bool update_ids=false)
214  {
215  size_t offset = 0;
216  for (const_iterator b = begin(), e = end(); b != e; ++b)
217  {
218  if(update_ids)
219  {
220  m_id_map[b->id()] = offset;
221  ++offset;
222  }
223  T::header_type::update_max_cycle(*b);
224  }
225  if(update_ids) return;
226  const constants::metric_group group = static_cast<constants::metric_group>(TYPE);
227  if(group != constants::Tile && // imaging table
228  group != constants::ExtendedTile &&
229  group != constants::DynamicPhasing && // Not read in
230  group != constants::CorrectedInt) // `populate_called_intensities`
231  {
232  clear_lookup();
233  }
234  metric_array_t tmp;
235  tmp.assign(m_data.begin(), m_data.end());
236  tmp.swap(m_data);
237  }
242  void resize(const size_t n)
243  {
244  m_data.resize(n, metric_type(*this));
245  }
250  void reserve(const size_t n)
251  {
252  m_data.reserve(n);
253  }
258  void trim(const size_t n)
259  {
260  m_data.resize(n);
261  }
262 
267  void insert(const metric_type &metric)
268  {
269  insert(metric.id(), metric);
270  }
271 
277  void insert(const id_t id, const metric_type &metric)
278  {
279  INTEROP_ASSERT(id != 0);
280  // TODO: remove the following
281  m_id_map[id] = size();
282 
283  T::header_type::update_max_cycle(metric);
284  m_data.push_back(metric);
285  }
286 
291  void remove(iterator &it)
292  {
293  INTEROP_ASSERT(size() > 0);
294  std::iter_swap(it, m_data.rbegin());
295  trim(size()-1);
296  }
297 
304  {
305  INTEROP_BOUNDS_CHECK(n, m_data.size(), "Index out of bounds");
306  return m_data[n];
307  }
308 
314  const metric_type &operator[](const size_t n)const INTEROP_THROW_SPEC((model::index_out_of_bounds_exception))
315  {
316  INTEROP_BOUNDS_CHECK(n, m_data.size(), "Index out of bounds");
317  return m_data[n];
318  }
319 
327  {
328  INTEROP_BOUNDS_CHECK(n, m_data.size(), "Index out of bounds");
329  return m_data[n];
330  }
331 
338  const metric_type &at(const size_t n)const INTEROP_THROW_SPEC((model::index_out_of_bounds_exception))
339  {
340  INTEROP_BOUNDS_CHECK(n, m_data.size(), "Index out of bounds");
341  return m_data[n];
342  }
343 
353  void set_version(const ::int16_t version)
354  {
355  m_version = version;
356  }
357 
362  key_vector keys() const
363  {
364  key_vector ids;
365  std::transform(begin(), end(), std::back_inserter(ids), to_id);
366  return ids;
367  }
368 
373  id_vector lanes() const
374  {
375  id_set_t id_set;
376  std::transform(begin(), end(), std::inserter(id_set, id_set.begin()), to_lane);
377  return id_vector(id_set.begin(), id_set.end());
378  }
379 
384  size_t lane_count() const
385  {
386  return lanes().size();
387  }
388 
393  size_t max_lane() const
394  {
395  size_t lane_max = 0;
396  for (const_iterator b = begin(); b != end(); ++b)
397  lane_max = std::max(lane_max, static_cast<size_t>(to_lane(*b)));
398  return lane_max;
399  }
400 
406  id_vector tile_numbers_for_lane(const uint_t lane) const
407  {
408  id_set_t tile_number_set;
409  populate_tile_numbers_for_lane(tile_number_set, lane);
410  id_vector tile_numbers(tile_number_set.begin(), tile_number_set.end());
411  return tile_numbers;
412  }
420  void populate_tile_numbers_for_lane(id_set_t& tile_number_set, const uint_t lane) const
421  {
422  transform_if(begin(),
423  end(),
424  std::inserter(tile_number_set, tile_number_set.begin()),
425  lane_equals(lane),
426  to_tile);
427  }
437  void populate_tile_numbers_for_lane_surface(id_set_t& tile_number_set,
438  const uint_t lane,
439  const uint_t surface,
440  const constants::tile_naming_method naming_convention) const
441  {
442  transform_if(begin(),
443  end(),
444  std::inserter(tile_number_set, tile_number_set.begin()),
445  lane_surface_equals(lane, surface, naming_convention),
446  to_tile);
447  }
448 
453  id_vector tile_numbers() const
454  {
455  id_set_t tile_number_set;
456  transform(begin(),
457  end(),
458  std::inserter(tile_number_set, tile_number_set.begin()),
459  to_tile);
460  id_vector tile_numbers(tile_number_set.begin(), tile_number_set.end());
461  return tile_numbers;
462  }
463 
469  metric_array_t metrics_for_lane(const uint_t lane) const
470  {
471  metric_array_t lane_metrics;
472  metrics_for_lane(lane_metrics, lane);
473  return lane_metrics;
474  }
475 
481  void metrics_for_lane(metric_array_t& lane_metrics, const uint_t lane) const
482  {
483  lane_metrics.reserve(size());
484  copy_if(begin(),
485  end(),
486  std::back_inserter(lane_metrics),
487  lane_equals(lane));
488  metric_array_t(lane_metrics).swap(lane_metrics); // Shrink to fit
489  }
490 
496  id_vector cycles() const
497  {
498  id_set_t cycle_set;
499  cycles(cycle_set);
500  return id_vector(cycle_set.begin(), cycle_set.end());
501  }
502 
509  metric_array_t metrics_for_cycle(const uint_t cycle) const
510  {
511  return metrics_for_cycle(cycle, base_t::null());
512  }
513 
514  public:
519  size_t size() const
520  { return m_data.size(); }
525  bool empty() const
526  { return m_data.empty(); }
527 
535  ::int16_t version() const
536  {
537  return m_version;
538  }
539 
542  void clear()
543  {
544  header_type::clear();
545  clear_lookup();
546  m_data.clear();
547  m_version=0;
548  m_data_source_exists=false;
549  }
550 
555  const metric_array_t &metrics() const
556  {
557  return m_data;
558  }
559 
564  static const char *prefix()
565  { return metric_attributes<T>::prefix(); }
566 
571  static const char *suffix()
572  { return metric_attributes<T>::suffix(); }
573 
574 
575  public:// TODO: Remove from I/O?
580  offset_map_t& offset_map()
581  {
582  return m_id_map;
583  }
584 
585  public:
595  metric_type &get_metric_ref(uint_t lane, uint_t tile,
596  uint_t cycle = 0) INTEROP_THROW_SPEC((model::index_out_of_bounds_exception))
597  {
598  try
599  {
600  return get_metric_ref(metric_type::create_id(lane, tile, cycle));
601  }
602  catch (const index_out_of_bounds_exception &)
603  {
604  if(m_id_map.empty())
605  INTEROP_THROW( index_out_of_bounds_exception, "Index map empty: Run rebuild_index(true) on this metric_set" );
606  INTEROP_THROW( index_out_of_bounds_exception,"No tile available: key: " <<
607  metric_type::create_id(lane, tile, cycle) <<
608  " map: " <<(m_id_map.size()) <<
609  " lane: " << (lane) <<
610  " tile: " << (tile) <<
611  " cycle: " << (cycle)
612  << " for metric: " << prefix());
613 
614  }
615  }
616 
625  {
626  if(m_id_map.empty())
627  INTEROP_THROW( index_out_of_bounds_exception, "Index map empty: Run rebuild_index(true) on this metric_set" );
628  typename offset_map_t::const_iterator it = m_id_map.find(key);
629  if (it == m_id_map.end())
631  "No tile available: key: " << (key) << " map: " <<
632  (m_id_map.size()) << " == data: " <<
633  (size()) << " for metric: " << prefix());
634  INTEROP_ASSERT(it->second < size());
635  return m_data[it->second];
636  }
644  size_t find(const uint_t lane, const uint_t tile, const uint_t cycle = 0) const
645  {
646  return find(metric_type::create_id(lane, tile, cycle));
647  }
648 
654  size_t find(const id_t id) const
655  {
656  typename offset_map_t::const_iterator it = m_id_map.find(id);
657  if (it == m_id_map.end()) return size();
658  return it->second;
659  }
660 
670  const metric_type &get_metric(const uint_t lane, const uint_t tile,
671  const uint_t cycle = 0) const INTEROP_THROW_SPEC((model::index_out_of_bounds_exception))
672  {
673  try
674  {
675  return get_metric(metric_type::create_id(lane, tile, cycle));
676  }
677  catch (const index_out_of_bounds_exception &)
678  {
679  if(m_id_map.empty())
680  INTEROP_THROW( index_out_of_bounds_exception, "Index map empty: Run rebuild_index(true) on this metric_set" );
681  INTEROP_THROW( index_out_of_bounds_exception, "No tile available: key: " <<
682  metric_type::create_id(lane, tile, cycle) <<
683  " map: " << (m_id_map.size()) <<
684  " lane: " << (lane) <<
685  " tile: " << (tile) <<
686  " cycle: " << (cycle)
687  << "for metric: " << prefix());
688  }
689  }
690 
691 
698  bool has_metric(const uint_t lane, const uint_t tile, const uint_t cycle = 0) const
699  {
700  return has_metric(metric_type::create_id(lane, tile, cycle));
701  }
709  const metric_type &get_metric(const id_t key) const INTEROP_THROW_SPEC((model::index_out_of_bounds_exception))
710  {
711  if(m_id_map.empty())
712  INTEROP_THROW( index_out_of_bounds_exception, "Index map empty: Run rebuild_index(true) on this metric_set" );
713  typename offset_map_t::const_iterator it = m_id_map.find(key);
714  if (it == m_id_map.end())
715  INTEROP_THROW( index_out_of_bounds_exception, "No tile available: key: "
716  << key << " map: "
717  << m_id_map.size() << " == data: "
718  << m_data.size()
719  << " lane: " << base_metric::lane_from_id(key)
720  << " tile: " << base_metric::tile_from_id(key) << " for metric: " << prefix());
721  INTEROP_ASSERT(it->second < m_data.size());
722  return m_data[it->second];
723  }
724 
729  bool has_metric(const id_t id) const
730  {
731  return m_id_map.find(id) != m_id_map.end();
732  }
736  {
738  }
739 
740  private:
741  metric_array_t metrics_for_cycle(const uint_t cycle, const constants::base_cycle_t*) const
742  {
743  metric_array_t cycle_metrics;
744  cycle_metrics.reserve(size());
745  copy_if(begin(),
746  end(),
747  std::back_inserter(cycle_metrics),
748  cycle_equals(cycle));
749  metric_array_t(cycle_metrics).swap(cycle_metrics); // Shrink to fit
750  return cycle_metrics;
751  }
752 
753  metric_array_t metrics_for_cycle(const uint_t, const void *) const
754  {
755  return metric_array_t();
756  }
757 
758 
759  private:
760  static id_t to_id(const metric_type &metric)
761  {
762  return metric_comparison_t::to_id(metric);
763  }
764 
765  static uint_t to_lane(const metric_type &metric)
766  {
767  return metric_comparison_t::to_lane(metric);
768  }
769 
770  static uint_t to_tile(const metric_type &metric)
771  {
772  return metric_comparison_t::to_tile(metric);
773  }
774 
775  void cycles(id_set_t& cycles_set) const
776  {
777  cycles(cycles_set, base_t::null());
778  }
779 
780  void cycles(id_set_t& cycles_set, const constants::base_cycle_t*) const
781  {
782  std::transform(begin(), end(), std::inserter(cycles_set, cycles_set.begin()), to_cycle);
783  }
784 
785  void cycles(id_set_t&, const void *) const
786  {
787  }
788 
789  static uint_t to_cycle(const metric_type &metric)
790  {
791  //TODO: ensure that this isn't called from a non-base_cycle metric set?
792  return metric.cycle();
793  }
794 
795  template<class I, class OIterator, class Operation>
796  static OIterator transform(I beg, I end, OIterator it, Operation op)
797  {
798  while (beg != end)
799  {
800  *it++ = op(*beg);
801  ++beg;
802  }
803  return it;
804  }
805 
806  template<class I, class OIterator, class Predicate, class Operation>
807  static OIterator transform_if(I beg, I end, OIterator it, Predicate pred, Operation op)
808  {
809  while (beg != end)
810  {
811  if (pred(*beg))
812  *it++ = op(*beg);
813  ++beg;
814  }
815  return it;
816  }
817 
818  template<class OIterator, class Predicate>
819  static OIterator copy_if(const_iterator beg, const_iterator end, OIterator it, Predicate pred)
820  {
821  while (beg != end)
822  {
823  if (pred(*beg))
824  *it++ = *beg;
825  ++beg;
826  }
827  return it;
828  }
829 
830  struct lane_equals
831  {
832  lane_equals(const uint_t lane) : m_lane(lane)
833  { }
834 
835  bool operator()(const metric_type &metric) const
836  { return metric_comparison_t::to_lane(metric) == m_lane; }
837 
838  const uint_t m_lane;
839  };
840  struct lane_surface_equals
841  {
842  lane_surface_equals(const uint_t lane,
843  const uint_t surface,
844  const constants::tile_naming_method naming_convention) :
845  m_lane(lane), m_surface(surface), m_naming_convention(naming_convention)
846  { }
847 
848  bool operator()(const metric_type &metric) const
849  { return check(metric, base_t::null());}
850 
851  bool check(const metric_type& metric, const void *)const
852  {
853  return metric.lane() == m_lane && metric.surface(m_naming_convention) == m_surface;
854  }
855 
856  const uint_t m_lane;
857  const uint_t m_surface;
858  const constants::tile_naming_method m_naming_convention;
859  };
860 
861  struct cycle_equals
862  {
863  cycle_equals(uint_t cycle) : m_cycle(cycle)
864  { }
865 
866  bool operator()(const metric_type &metric) const
867  { return metric.cycle() == m_cycle; }
868 
869  uint_t m_cycle;
870  };
871 
872  protected:
874  metric_array_t m_data;
876  ::int16_t m_version;
879 
880  // TODO: remove the following
882  offset_map_t m_id_map;
883  };
884 
885  template<class Metric, class Type>
886  struct metric_comparison
887  {
889  typedef typename Metric::id_t id_t;
891  typedef typename Metric::uint_t uint_t;
892  template<class MetricT>
893  static id_t to_id(const MetricT &metric)
894  {
895  return metric.id();
896  }
897 
898  template<class MetricT>
899  static uint_t to_lane(const MetricT &metric)
900  {
901  return metric.lane();
902  }
903 
904  template<class MetricT>
905  static uint_t to_tile(const MetricT &metric)
906  {
907  return metric.tile();
908  }
909  };
910  template<class Metric>
911  struct metric_comparison<Metric, constants::base_run_t>
912  {
914  typedef typename Metric::id_t id_t;
916  typedef typename Metric::uint_t uint_t;
917  template<class MetricT>
918  static id_t to_id(const MetricT &)
919  {
920  return 1;// Cannot be zero
921  }
922 
923  template<class MetricT>
924  static uint_t to_lane(const MetricT &)
925  {
926  return 1;
927  }
928 
929  template<class MetricT>
930  static uint_t to_tile(const MetricT &)
931  {
932  return 1;
933  }
934  };
935 
937  template<class Metric>
939  {
942  };
944  template<class Metric>
945  struct metric_set_helper< metric_set<Metric> >
946  {
949  };
950 }}}}
951 #ifdef _MSC_VER
952 #pragma warning(pop)
953 #endif
954 
955 
static const char * prefix()
Definition: metric_set.h:564
void insert(const metric_type &metric)
Definition: metric_set.h:267
size_t find(const uint_t lane, const uint_t tile, const uint_t cycle=0) const
Definition: metric_set.h:644
const metric_type & at(const size_t n) const INTEROP_THROW_SPEC((model
Definition: metric_set.h:338
::int16_t version() const
Definition: metric_set.h:535
Definition: enum_description.h:15
void data_source_exists(const bool exists)
Definition: metric_set.h:158
size_t find(const id_t id) const
Definition: metric_set.h:654
::int16_t m_version
Definition: metric_set.h:876
metric_type & get_metric_ref(uint_t lane, uint_t tile, uint_t cycle=0) INTEROP_THROW_SPEC((model
Definition: metric_set.h:595
#define INTEROP_THROW_SPEC(SPEC)
Definition: exception_specification.h:15
bool empty() const
Definition: metric_set.h:525
size_t lane_count() const
Definition: metric_set.h:384
void append_tiles(const metric_set< T > &origin, const base_metric &tile_id)
Definition: metric_set.h:136
T::header_type header_type
Definition: metric_set.h:47
static const char * suffix()
Definition: metric_set.h:571
metric_set< Metric > metric_set_t
Definition: metric_set.h:941
void trim(const size_t n)
Definition: metric_set.h:258
id_vector lanes() const
Definition: metric_set.h:373
std::set< uint_t > id_set_t
Definition: metric_set.h:65
static id_t lane_from_id(const id_t id)
Definition: base_metric.h:239
inline::uint32_t surface(const ::uint32_t tile_id, const constants::tile_naming_method method)
Definition: tile_metric.h:93
T::uint_t uint_t
Definition: metric_set.h:57
#define INTEROP_THROW(EXCEPTION, MESSAGE)
Definition: exception.h:18
size_t size() const
Definition: metric_set.h:519
static id_t to_id(const MetricT &metric)
Definition: metric_set.h:893
size_t max_lane() const
Definition: metric_set.h:393
Metric::id_t id_t
Definition: metric_set.h:889
metric_array_t::size_type size_type
Definition: metric_set.h:63
void reserve(const size_t n)
Definition: metric_set.h:250
id_vector tile_numbers_for_lane(const uint_t lane) const
Definition: metric_set.h:406
iterator end()
Definition: metric_set.h:193
std::vector< id_t > key_vector
Definition: metric_set.h:61
static uint_t to_lane(const MetricT &metric)
Definition: metric_set.h:899
metric_type & get_metric_ref(id_t key) INTEROP_THROW_SPEC((model
Definition: metric_set.h:624
std::vector< T > metric_array_t
Definition: metric_set.h:45
metric_group
Definition: enums.h:289
bool m_data_source_exists
Definition: metric_set.h:878
metric_set(const header_type &header=header_type::default_header(), const ::int16_t version=0)
Definition: metric_set.h:101
const metric_type & get_metric(const id_t key) const INTEROP_THROW_SPEC((model
Definition: metric_set.h:709
#define INTEROP_ASSERT(TST)
Definition: assert.h:21
std::map< id_t, size_t > offset_map_t
Definition: metric_set.h:70
metric_array_t::iterator iterator
Definition: metric_set.h:79
bool data_source_exists() const
Definition: metric_set.h:150
id_vector cycles() const
Definition: metric_set.h:496
T::base_t base_t
Definition: metric_set.h:49
static id_t tile_from_id(const id_t id)
Definition: base_metric.h:258
offset_map_t m_id_map
Definition: metric_set.h:882
void copy_by_tile(const metric_set< T > &origin, const base_metric &tile_id)
Definition: metric_set.h:126
Definition: type_traits.h:131
id_vector tile_numbers() const
Definition: metric_set.h:453
void populate_tile_numbers_for_lane(id_set_t &tile_number_set, const uint_t lane) const
Definition: metric_set.h:420
const metric_type & operator[](const size_t n) const INTEROP_THROW_SPEC((model
Definition: metric_set.h:314
const metric_array_t & metrics() const
Definition: metric_set.h:555
const metric_type & get_metric(const uint_t lane, const uint_t tile, const uint_t cycle=0) const INTEROP_THROW_SPEC((model
Definition: metric_set.h:670
metric_set(const ::int16_t version)
Definition: metric_set.h:93
static uint_t to_tile(const MetricT &)
Definition: metric_set.h:930
void rebuild_index(const bool update_ids=false)
Definition: metric_set.h:213
void clear()
Definition: metric_set.h:542
void sort()
Definition: metric_set.h:201
metric_type & at(const size_t n) INTEROP_THROW_SPEC((model
Definition: metric_set.h:326
bool has_metric(const uint_t lane, const uint_t tile, const uint_t cycle=0) const
Definition: metric_set.h:698
constant_type< metric_base_type, BaseCycleType > base_cycle_t
Definition: typedefs.h:20
Definition: enums.h:301
static uint_t to_tile(const MetricT &metric)
Definition: metric_set.h:905
metric_comparison< T > metric_comparison_t
Definition: metric_set.h:75
void set_version(const ::int16_t version)
Definition: metric_set.h:353
std::vector< uint_t > id_vector
Definition: metric_set.h:59
const_iterator begin() const
Definition: metric_set.h:166
metric_type & operator[](const size_t n) INTEROP_THROW_SPEC((model
Definition: metric_set.h:303
void metrics_for_lane(metric_array_t &lane_metrics, const uint_t lane) const
Definition: metric_set.h:481
void populate_tile_numbers_for_lane_surface(id_set_t &tile_number_set, const uint_t lane, const uint_t surface, const constants::tile_naming_method naming_convention) const
Definition: metric_set.h:437
bool has_metric(const id_t id) const
Definition: metric_set.h:729
constant_type< metric_base_type, BaseRunType > base_run_t
Definition: typedefs.h:26
key_vector keys() const
Definition: metric_set.h:362
#define INTEROP_BOUNDS_CHECK(VALUE, RANGE, MESSAGE)
Definition: exception.h:24
offset_map_t & offset_map()
Definition: metric_set.h:580
void resize(const size_t n)
Definition: metric_set.h:242
Definition: enums.h:291
#define INTEROP_CLEAR_MAP(map_ins)
Definition: map.h:26
const_iterator end() const
Definition: metric_set.h:175
void clear_lookup()
Definition: metric_set.h:735
metric_array_t metrics_for_cycle(const uint_t cycle) const
Definition: metric_set.h:509
metric_array_t m_data
Definition: metric_set.h:874
metric_array_t metrics_for_lane(const uint_t lane) const
Definition: metric_set.h:469
metric_set(const metric_array_t &vec, const ::int16_t version, const header_type &header)
Definition: metric_set.h:111
T::id_t id_t
Definition: metric_set.h:55
tile_naming_method
Definition: enums.h:294
metric_set< T > metric_set_type
Definition: metric_set.h:53
static uint_t to_lane(const MetricT &)
Definition: metric_set.h:924
iterator begin()
Definition: metric_set.h:184
void insert(const id_t id, const metric_type &metric)
Definition: metric_set.h:277
metric_array_t::const_iterator const_iterator
Definition: metric_set.h:77
Metric::uint_t uint_t
Definition: metric_set.h:891