<commit_before>/* +------------------------------------------------------------------------+
   |                     Mobile Robot Programming Toolkit (MRPT)            |
   |                          http://www.mrpt.org/                          |
   |                                                                        |
   | Copyright (c) 2005-2018, Individual contributors, see AUTHORS file     |
   | See: http://www.mrpt.org/Authors - All rights reserved.                |
   | Released under BSD License. See details in http://www.mrpt.org/License |
   +------------------------------------------------------------------------+ */

#include "hmtslam-precomp.h"  // Precomp header

using namespace mrpt::hmtslam;

IMPLEMENTS_SERIALIZABLE(THypothesisIDSet, CSerializable, mrpt::hmtslam)

uint8_t THypothesisIDSet::serializeGetVersion() const { return 0; }
void THypothesisIDSet::serializeTo(mrpt::serialization::CArchive& out) const
{
	uint32_t N = (uint32_t)size();
	out << N;
	for (long it : *this) out << it;
}

void THypothesisIDSet::serializeFrom(
	mrpt::serialization::CArchive& in, uint8_t version)
{
	switch (version)
	{
		case 0:
		{
			uint32_t i, N;
			in >> N;

			clear();
			for (i = 0; i < N; i++)
			{
				THypothesisID tmp;
				in >> tmp;
				insert(tmp);
			}
		}
		break;
		default:
			MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(version)
	};
}<commit_msg>Fix serialization type in non 64bit builds<commit_after>/* +------------------------------------------------------------------------+
   |                     Mobile Robot Programming Toolkit (MRPT)            |
   |                          http://www.mrpt.org/                          |
   |                                                                        |
   | Copyright (c) 2005-2018, Individual contributors, see AUTHORS file     |
   | See: http://www.mrpt.org/Authors - All rights reserved.                |
   | Released under BSD License. See details in http://www.mrpt.org/License |
   +------------------------------------------------------------------------+ */

#include "hmtslam-precomp.h"  // Precomp header

using namespace mrpt::hmtslam;

IMPLEMENTS_SERIALIZABLE(THypothesisIDSet, CSerializable, mrpt::hmtslam)

uint8_t THypothesisIDSet::serializeGetVersion() const { return 0; }
void THypothesisIDSet::serializeTo(mrpt::serialization::CArchive& out) const
{
	uint32_t N = (uint32_t)size();
	out << N;
	for (THypothesisID it : *this) out << it;
}

void THypothesisIDSet::serializeFrom(
	mrpt::serialization::CArchive& in, uint8_t version)
{
	switch (version)
	{
		case 0:
		{
			uint32_t i, N;
			in >> N;

			clear();
			for (i = 0; i < N; i++)
			{
				THypothesisID tmp;
				in >> tmp;
				insert(tmp);
			}
		}
		break;
		default:
			MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(version)
	};
}
{'fraction_non_alphanumeric': 0.21071428571428572, 'fraction_numerical': 0.014285714285714285, 'mean_word_length': 1.5673693858845097, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1672372', 'n_tokens_mistral': 941, 'n_tokens_neox': 841, 'n_words': 182}