Revision 8ae3500bc11757418ae922dcf891f750ca691dd6 authored by vthierry on 05 December 2025, 10:56:55 UTC, committed by vthierry on 05 December 2025, 10:56:55 UTC
1 parent 4159546
algo.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>algo - Documentation</title>
<script src="scripts/prettify/prettify.js"></script>
<script src="scripts/prettify/lang-css.js"></script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
<script src="scripts/nav.js" defer></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<input type="checkbox" id="nav-trigger" class="nav-trigger" />
<label for="nav-trigger" class="navicon-button x">
<div class="navicon"></div>
</label>
<label for="nav-trigger" class="overlay"></label>
<nav >
<input type="text" id="nav-search" placeholder="Search" />
<h2><a href="index.html">Home</a></h2><h3>Objects</h3><ul><li><a href="Array.html">Array</a><ul class='members'></ul><ul class='methods'><li data-type='method' style='display: none;'><a href="Array.html#add">add</a></li><li data-type='method' style='display: none;'><a href="Array.html#get">get</a></li></ul></li><li><a href="AssociativeMap.html">AssociativeMap</a><ul class='members'></ul><ul class='methods'><li data-type='method' style='display: none;'><a href="AssociativeMap.html#add">add</a></li><li data-type='method' style='display: none;'><a href="AssociativeMap.html#erase">erase</a></li><li data-type='method' style='display: none;'><a href="AssociativeMap.html#get">get</a></li><li data-type='method' style='display: none;'><a href="AssociativeMap.html#get">get</a></li><li data-type='method' style='display: none;'><a href="AssociativeMap.html#getBundling">getBundling</a></li><li data-type='method' style='display: none;'><a href="AssociativeMap.html#getSize">getSize</a></li><li data-type='method' style='display: none;'><a href="AssociativeMap.html#asString">asString</a></li><li data-type='method' style='display: none;'><a href="AssociativeMap.html#getValue">getValue</a></li><li data-type='method' style='display: none;'><a href="AssociativeMap.html#getKey">getKey</a></li></ul></li><li><a href="AssociativeNetwork.html">AssociativeNetwork</a><ul class='members'></ul><ul class='methods'><li data-type='method' style='display: none;'><a href="AssociativeNetwork.html#add">add</a></li></ul></li><li><a href="Belief.html">Belief</a><ul class='members'><li data-type='member' style='display: none;'><a href="Belief.html#tau">tau</a></li><li data-type='member' style='display: none;'><a href="Belief.html#sigma">sigma</a></li></ul><ul class='methods'><li data-type='method' style='display: none;'><a href="Belief.html#asString">asString</a></li></ul></li><li><a href="Binding.html">Binding</a><ul class='members'></ul><ul class='methods'><li data-type='method' style='display: none;'><a href="Binding.html#y">y</a></li><li data-type='method' style='display: none;'><a href="Binding.html#x">x</a></li><li data-type='method' style='display: none;'><a href="Binding.html#b">b</a></li><li data-type='method' style='display: none;'><a href="Binding.html#normalized">normalized</a></li><li data-type='method' style='display: none;'><a href="Binding.html#asString">asString</a></li><li data-type='method' style='display: none;'><a href="Binding.html#.getComputationTIme">getComputationTIme</a></li></ul></li><li><a href="Bundling.html">Bundling</a><ul class='members'></ul><ul class='methods'><li data-type='method' style='display: none;'><a href="Bundling.html#add">add</a></li><li data-type='method' style='display: none;'><a href="Bundling.html#erase">erase</a></li><li data-type='method' style='display: none;'><a href="Bundling.html#getSorted">getSorted</a></li><li data-type='method' style='display: none;'><a href="Bundling.html#get">get</a></li></ul></li><li><a href="List.html">List</a><ul class='members'></ul><ul class='methods'><li data-type='method' style='display: none;'><a href="List.html#add">add</a></li><li data-type='method' style='display: none;'><a href="List.html#erase">erase</a></li><li data-type='method' style='display: none;'><a href="List.html#getNext">getNext</a></li><li data-type='method' style='display: none;'><a href="List.html#getPrevious">getPrevious</a></li></ul></li><li><a href="Number.html">Number</a><ul class='members'></ul><ul class='methods'><li data-type='method' style='display: none;'><a href="Number.html#.getInt">getInt</a></li></ul></li><li><a href="RelationalMap.html">RelationalMap</a><ul class='members'></ul><ul class='methods'><li data-type='method' style='display: none;'><a href="RelationalMap.html#add">add</a></li><li data-type='method' style='display: none;'><a href="RelationalMap.html#add">add</a></li><li data-type='method' style='display: none;'><a href="RelationalMap.html#add">add</a></li><li data-type='method' style='display: none;'><a href="RelationalMap.html#get">get</a></li><li data-type='method' style='display: none;'><a href="RelationalMap.html#get">get</a></li><li data-type='method' style='display: none;'><a href="RelationalMap.html#asString">asString</a></li><li data-type='method' style='display: none;'><a href="RelationalMap.html#.asString">asString</a></li><li data-type='method' style='display: none;'><a href="RelationalMap.html#save">save</a></li></ul></li><li><a href="Rule.html">Rule</a><ul class='members'></ul><ul class='methods'><li data-type='method' style='display: none;'><a href="Rule.html#getName">getName</a></li><li data-type='method' style='display: none;'><a href="Rule.html#getArity">getArity</a></li><li data-type='method' style='display: none;'><a href="Rule.html#getTau">getTau</a></li><li data-type='method' style='display: none;'><a href="Rule.html#isValid">isValid</a></li><li data-type='method' style='display: none;'><a href="Rule.html#setOutput">setOutput</a></li></ul></li><li><a href="Rules.html">Rules</a><ul class='members'></ul><ul class='methods'><li data-type='method' style='display: none;'><a href="Rules.html#add">add</a></li><li data-type='method' style='display: none;'><a href="Rules.html#isDifferent">isDifferent</a></li><li data-type='method' style='display: none;'><a href="Rules.html#apply">apply</a></li></ul></li><li><a href="Symbol.html">Symbol</a><ul class='members'><li data-type='member' style='display: none;'><a href="Symbol.html#.nill">nill</a></li></ul><ul class='methods'><li data-type='method' style='display: none;'><a href="Symbol.html#getName">getName</a></li><li data-type='method' style='display: none;'><a href="Symbol.html#getID">getID</a></li><li data-type='method' style='display: none;'><a href="Symbol.html#getType">getType</a></li><li data-type='method' style='display: none;'><a href="Symbol.html#getVector">getVector</a></li><li data-type='method' style='display: none;'><a href="Symbol.html#getBelief()">getBelief()</a></li><li data-type='method' style='display: none;'><a href="Symbol.html#setBelief()">setBelief()</a></li><li data-type='method' style='display: none;'><a href="Symbol.html#equals">equals</a></li><li data-type='method' style='display: none;'><a href="Symbol.html#asString">asString</a></li><li data-type='method' style='display: none;'><a href="Symbol.html#.getDimension">getDimension</a></li><li data-type='method' style='display: none;'><a href="Symbol.html#.setDimension">setDimension</a></li><li data-type='method' style='display: none;'><a href="Symbol.html#.clone">clone</a></li><li data-type='method' style='display: none;'><a href="Symbol.html#.fromJSON">fromJSON</a></li><li data-type='method' style='display: none;'><a href="Symbol.html#.toJSON">toJSON</a></li><li data-type='method' style='display: none;'><a href="Symbol.html#.dump">dump</a></li></ul></li><li><a href="algo.html">algo</a><ul class='members'><li data-type='member' style='display: none;'><a href="algo.html#.sigma_0">sigma_0</a></li></ul><ul class='methods'><li data-type='method' style='display: none;'><a href="algo.html#.reduce">reduce</a></li><li data-type='method' style='display: none;'><a href="algo.html#.sim">sim</a></li><li data-type='method' style='display: none;'><a href="algo.html#.msim">msim</a></li><li data-type='method' style='display: none;'><a href="algo.html#.conj">conj</a></li></ul></li></ul>
</nav>
<div id="main">
<h1 class="page-title">algo</h1>
<section>
<header>
<h2>
algo
</h2>
</header>
<article>
<div class="container-overview">
<h4 class="name" id="algo"><span class="type-signature"></span>factory algo<span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-description">Description:</dt>
<dd class="tag-description"><ul class="dummy"><li><p>Specifies the macroscopic algorithmic ersatz on VSA symbol.</p>
<ul>
<li>These functions are accessible via the <code>macrovsa::</code> prefix.</li>
</ul></li></ul></dd>
</dl>
</div>
<h3 class="subsection-title">Members</h3>
<h4 class="name" id=".sigma_0"><span class="type-signature type-signature-static">(static) </span>sigma_0<span class="type-signature"> :double</span></h4>
<dl class="details">
<dt class="tag-description">Description:</dt>
<dd class="tag-description"><ul class="dummy"><li><p>The standard-deviation of the additive noise generated by an approximate operation.</p>
<ul>
<li>Its value order of magnitude is <code>O(1/d)</code> where <code>d</code> is the VSA space dimension, default value is <code>d=10000</code>, and is calibrated on the <a href="https://arxiv.org/abs/2001.11797">(Schlegel et al 2020)</a> numerical results, here set to <code>1/d/64</code>.</li>
</ul></li></ul></dd>
</dl>
<div class="description usertext">
<p>The standard-deviation of the additive noise generated by an approximate operation.</p>
<ul>
<li>Its value order of magnitude is <code>O(1/d)</code> where <code>d</code> is the VSA space dimension, default value is <code>d=10000</code>, and is calibrated on the <a href="https://arxiv.org/abs/2001.11797">(Schlegel et al 2020)</a> numerical results, here set to <code>1/d/64</code>.</li>
</ul>
</div>
<h5 class="h5-types">Type:</h5>
<ul>
<li>
<span class="param-type">double</span>
</li>
</ul>
<h3 class="subsection-title">Methods</h3>
<h4 class="name" id=".reduce"><span class="type-signature type-signature-static">(static) </span>reduce<span class="signature">(symbol)</span><span class="type-signature"> → {<a href="Symbol.html">Symbol</a>}</span></h4>
<dl class="details">
<dt class="tag-description">Description:</dt>
<dd class="tag-description"><ul class="dummy"><li><p>Reduces a symbol with respect to binding/unbinding operations.</p></li></ul></dd>
</dl>
<h5 class="h5-parameters">Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>symbol</code></td>
<td class="type">
<span class="param-type"><a href="Symbol.html">Symbol</a></span>
</td>
<td class="description last"><p>The symbol to reduce.</p></td>
</tr>
</tbody>
</table>
<h5 class="h5-returns">Returns:</h5>
<div class="param-desc">
<p>A reference to the reduced symbol. Available until program end.</p>
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Symbol.html">Symbol</a></span>
</dd>
</dl>
<h4 class="name" id=".sim"><span class="type-signature type-signature-static">(static) </span>sim<span class="signature">(s1, s2)</span><span class="type-signature"> → {<a href="Belief.html">Belief</a>}</span></h4>
<dl class="details">
<dt class="tag-description">Description:</dt>
<dd class="tag-description"><ul class="dummy"><li><p>Returns the similarity between two symbols.</p>
<ul>
<li>For convinience the symbol can be given by its name, considering that <code>tau = 1, sigma = 0</code>.</li>
<li>A similarity is non-negligible up to a confidence interval of <code>99%</code> if ``tau > 2 sigma`.</li>
</ul></li></ul></dd>
</dl>
<h5 class="h5-parameters">Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>s1</code></td>
<td class="type">
<span class="param-type"><a href="Symbol.html">Symbol</a></span>
|
<span class="param-type">String</span>
</td>
<td class="description last"><p>A reference to the first symbol, or its string representation as defined in <a href="./Symbol.html#.fromJSON">fromJSON()</a>.</p></td>
</tr>
<tr>
<td class="name"><code>s2</code></td>
<td class="type">
<span class="param-type"><a href="Symbol.html">Symbol</a></span>
|
<span class="param-type">String</span>
</td>
<td class="description last"><p>A reference to the second symbol, or its string representation as defined in <a href="./Symbol.html#.fromJSON">fromJSON()</a>.</p></td>
</tr>
</tbody>
</table>
<h5 class="h5-returns">Returns:</h5>
<div class="param-desc">
<p>The similarity or 0 if out of bounds, as belief, thus with an error estimation.</p>
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Belief.html">Belief</a></span>
</dd>
</dl>
<h4 class="name" id=".msim"><span class="type-signature type-signature-static">(static) </span>msim<span class="signature">({Symbol, s2)</span><span class="type-signature"> → {double}</span></h4>
<dl class="details">
<dt class="tag-description">Description:</dt>
<dd class="tag-description"><ul class="dummy"><li><p>Returns the mesoscopic similarity between two symbol vectors.</p></li></ul></dd>
</dl>
<h5 class="h5-parameters">Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>{Symbol</code></td>
<td class="type">
</td>
<td class="description last"><p>s1 A reference to the first symbol.</p></td>
</tr>
<tr>
<td class="name"><code>s2</code></td>
<td class="type">
<span class="param-type"><a href="Symbol.html">Symbol</a></span>
</td>
<td class="description last"><p>A reference to the second symbol.</p></td>
</tr>
</tbody>
</table>
<h5 class="h5-returns">Returns:</h5>
<div class="param-desc">
<p>The similarity, using the dotprod.</p>
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">double</span>
</dd>
</dl>
<h4 class="name" id=".conj"><span class="type-signature type-signature-static">(static) </span>conj<span class="signature">()</span><span class="type-signature"> → {<a href="Belief.html">Belief</a>}</span></h4>
<dl class="details">
<dt class="tag-description">Description:</dt>
<dd class="tag-description"><ul class="dummy"><li><p>Calculates the conjuction of belief values (and operator).</p>
<ul>
<li>Here the <code>max(0,min(...))</code> operator is used as <a href="https://en.wikipedia.org/wiki/T-norm">T-Norm</a>.</li>
</ul></li></ul></dd>
</dl>
<h5 class="h5-parameters">Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>degree...</code></td>
<td class="type">
<span class="param-type"><a href="Belief.html">Belief</a></span>
</td>
<td class="attributes">
<repeatable><br>
</td>
<td class="description last"><p>Degree of belief values, at least 2 and up to 8 arguments, in this implementation.</p></td>
</tr>
</tbody>
</table>
<h5 class="h5-returns">Returns:</h5>
<div class="param-desc">
<p>The computed value.</p>
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Belief.html">Belief</a></span>
</dd>
</dl>
</article>
</section>
</div>
<br class="clear">
<footer>
<div style='float: right;font-style: italic;'>2025-10-28 version.</div>
</footer>
<script>prettyPrint();</script>
<script src="scripts/polyfill.js"></script>
<script src="scripts/linenumber.js"></script>
<script src="scripts/search.js" defer></script>
<script src="scripts/collapse.js" defer></script>
</body>
</html>
Computing file changes ...