MRPT  1.9.9
THypothesisIDSet.cpp
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | https://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2020, Individual contributors, see AUTHORS file |
6  | See: https://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See: https://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 
10 #include "hmtslam-precomp.h" // Precomp header
11 
12 using namespace mrpt::hmtslam;
13 
15 
16 uint8_t THypothesisIDSet::serializeGetVersion() const { return 0; }
18 {
19  auto N = (uint32_t)size();
20  out << N;
21  for (THypothesisID it : *this) out << it;
22 }
23 
25  mrpt::serialization::CArchive& in, uint8_t version)
26 {
27  switch (version)
28  {
29  case 0:
30  {
31  uint32_t i, N;
32  in >> N;
33 
34  clear();
35  for (i = 0; i < N; i++)
36  {
37  THypothesisID tmp;
38  in >> tmp;
39  insert(tmp);
40  }
41  }
42  break;
43  default:
45  };
46 }
size_t size(const MATRIXLIKE &m, const int dim)
Classes related to the implementation of Hybrid Metric Topological (HMT) SLAM.
#define IMPLEMENTS_SERIALIZABLE(class_name, base, NameSpace)
To be added to all CSerializable-classes implementation files.
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
Definition: exceptions.h:97
void serializeTo(mrpt::serialization::CArchive &out) const override
Pure virtual method for writing (serializing) to an abstract archive.
A set of hypothesis IDs, used for arcs and nodes in multi-hypothesis hybrid maps. ...
int64_t THypothesisID
An integer number uniquely identifying each of the concurrent hypotheses for the robot topological pa...
Virtual base class for "archives": classes abstracting I/O streams.
Definition: CArchive.h:54
void serializeFrom(mrpt::serialization::CArchive &in, uint8_t serial_version) override
Pure virtual method for reading (deserializing) from an abstract archive.
mrpt::vision::TStereoCalibResults out
void clear()
Clear the contents of this container.
Definition: ts_hash_map.h:183



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: c7a3bec24 Sun Mar 29 18:33:13 2020 +0200 at dom mar 29 18:50:38 CEST 2020