https://gitlab.inria.fr/line/aide-group/macrovsa
Tip revision: 31a87d848f8ab28a06ccf77d0b359fc966974138 authored by vthierry on 15 December 2025, 21:31:50 UTC
sync from makefile
sync from makefile
Tip revision: 31a87d8
Number.hpp
#ifndef __macrovsa_Number__
#define __macrovsa_Number__
#include "Symbol.hpp"
namespace macrovsa {
/**
* @class Number
* @description Implements a macroscopic ersatz of a VSA positive integer.
* - It is implemented via successive [Binding](./Binding.html), without using a C++ `std::list`.
*/
class Number {
public:
/**
* @function getInt
* @memberof Number
* @static
* @description Returns the Symbol corresponding to a given positive integer.
* - Here, instead of the usual iterative binding solution, we cheat by using string representation of numbers.
* - Therefore we do not have the `s_{n+p} = B_{s_0}^p s_n` recurrence property for a symbol `s_n` representing `n`.
* @param {uint} value The symbol numeric value. Reasonnable value is between 0 and about 1000.
* @return {Symbol} A reference to the corresponding value.
*/
static const Symbol& getInt(unsigned int value);
};
}
#endif
