Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

Revision 8ae3500bc11757418ae922dcf891f750ca691dd6 authored by vthierry on 05 December 2025, 10:56:55 UTC, committed by vthierry on 05 December 2025, 10:56:55 UTC
sync from makefile
1 parent 4159546
  • Files
  • Changes
  • b6769c5
  • /
  • public
  • /
  • Symbol.html
Raw File Download

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • revision
  • directory
  • content
revision badge
swh:1:rev:8ae3500bc11757418ae922dcf891f750ca691dd6
directory badge
swh:1:dir:bf9da1338b46e4b923129d22ed120a1a4fd69470
content badge
swh:1:cnt:14e2e0ba3ca2900a4fa16bf0c91618953b70a53c

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • revision
  • directory
  • content
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
Symbol.html
<!DOCTYPE html>
<html lang="en">
<head>
    
    <meta charset="utf-8">
    <title>Symbol - 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">Symbol</h1>
    

    




<section>

<header>
    
        <h2>
        
            Symbol
        
        </h2>
        
    
</header>

<article>
    
        <div class="container-overview">
        
            

    

    <h4 class="name" id="Symbol"><span class="type-signature"></span>new Symbol<span class="signature">(name<span class="signature-attributes">opt</span>, tau<span class="signature-attributes">opt</span>, sigma<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>

    




<dl class="details">
    
    <dt class="tag-description">Description:</dt>
    <dd class="tag-description"><ul class="dummy"><li><p>Creates a macroscopic ersatz of a VSA symbol.</p>
<ul>
<li>For convenience the constructs
<ul>
<li><code>Symbol(String name, double tau, double sigma)</code></li>
<li><code>Symbol(String name, const Belief&amp; belief)</code></li>
</ul>
</li>
<li>Note: a symbol can not be copied, use the <a href="Symbol.html/#.clone">clone()</a> method instead.</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>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>name</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>
|

<span class="param-type"><a href="Symbol.html">Symbol</a></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>The symbol name.</p>
<ul>
<li>If omitted, the name is set to <code>#id</code> where <code>id</code> is an automatic unique number, see getID().</li>
<li>If given as a symbol, the symbol name is used.</li>
</ul></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>tau</code></td>
            

            <td class="type">
            
                
<span class="param-type">double</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    <code>1</code>
                
                </td>
            

            <td class="description last"><p>The symbol degree of belief.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>sigma</code></td>
            

            <td class="type">
            
                
<span class="param-type">double</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    <code>0</code>
                
                </td>
            

            <td class="description last"><p>The symbol standard-deviation of the related level of noise.</p></td>
        </tr>

    
    </tbody>
</table>



















        
        </div>
    

    

    

    
    
    

     

    

    
        <h3 class="subsection-title">Members</h3>

        
            













        
            
<h4 class="name" id=".nill"><span class="type-signature type-signature-static">(static) </span>nill<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>The <code>nill</code> symbol, with the empty string as name, with <code>tau=0</code>.</p></li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description usertext">
    <p>The <code>nill</code> symbol, with the empty string as name, with <code>tau=0</code>.</p>
</div>



    <h5 class="h5-types">Type:</h5>
    <ul>
        <li>
            
<span class="param-type"><a href="Symbol.html">Symbol</a></span>



        </li>
    </ul>






        
    

    
        <h3 class="subsection-title">Methods</h3>

        
            

    

    <h4 class="name" id="getName"><span class="type-signature"></span>getName<span class="signature">()</span><span class="type-signature"> &rarr; {String}</span></h4>

    




<dl class="details">
    
    <dt class="tag-description">Description:</dt>
    <dd class="tag-description"><ul class="dummy"><li><p>Returns the symbol name.</p></li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>



























<h5 class="h5-returns">Returns:</h5>

        
<div class="param-desc">
    <p>The read-only symbol name value.</p>
</div>



<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">String</span>



    </dd>
</dl>

    



        
            

    

    <h4 class="name" id="getID"><span class="type-signature"></span>getID<span class="signature">()</span><span class="type-signature"> &rarr; {uint}</span></h4>

    




<dl class="details">
    
    <dt class="tag-description">Description:</dt>
    <dd class="tag-description"><ul class="dummy"><li><p>Returns the symbol ID.</p>
<ul>
<li>This ID is a unique number for a given symbol.
<ul>
<li>Two atomic symbols with the same ID are equal, possibly with different belief level.</li>
<li>This does not apply to non atomic symbols: binding or bundling.</li>
</ul>
</li>
</ul></li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>



























<h5 class="h5-returns">Returns:</h5>

        
<div class="param-desc">
    <p>The read-only symbol id value.</p>
</div>



<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">uint</span>



    </dd>
</dl>

    



        
            

    

    <h4 class="name" id="getType"><span class="type-signature"></span>getType<span class="signature">()</span><span class="type-signature"> &rarr; {SymbolType}</span></h4>

    




<dl class="details">
    
    <dt class="tag-description">Description:</dt>
    <dd class="tag-description"><ul class="dummy"><li><p>Returns the symbol type.</p></li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>



























<h5 class="h5-returns">Returns:</h5>

        
<div class="param-desc">
    <p>Either <code>Symbol::SymbolType::atomic</code>, <code>Symbol::SymbolType::binding</code>, or <code>Symbol::SymbolType::bundling</code>.</p>
</div>



<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">SymbolType</span>



    </dd>
</dl>

    



        
            

    

    <h4 class="name" id="getVector"><span class="type-signature"></span>getVector<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="Array.html">Array</a>}</span></h4>

    




<dl class="details">
    
    <dt class="tag-description">Description:</dt>
    <dd class="tag-description"><ul class="dummy"><li><p>Returns a randomly drawn unary vector coresponding to this symbol.</p></li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>



























<h5 class="h5-returns">Returns:</h5>

        
<div class="param-desc">
    <p>The <code>double[]</code> read-only symbol vector value.</p>
</div>



<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Array.html">Array</a></span>



    </dd>
</dl>

    



        
            

    

    <h4 class="name" id="getBelief()"><span class="type-signature"></span>getBelief()<span class="signature">()</span><span class="type-signature"></span></h4>

    




<dl class="details">
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>



























<h5 class="h5-returns">Returns:</h5>

        
<div class="param-desc">
    <p>The degree of belief</p>
<ul>
<li><code>tau</code> between -1 (false), 0 (unknown) and true (1), 1 by default and</li>
<li><code>sigma</code> the standard-deviation of the related level of noise, 0 by default.</li>
</ul>
</div>



    



        
            

    

    <h4 class="name" id="setBelief()"><span class="type-signature"></span>setBelief()<span class="signature">(belief)</span><span class="type-signature"></span></h4>

    




<dl class="details">
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</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>belief</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Belief.html">Belief</a></span>



            
            </td>

            

            

            <td class="description last"><p>The degree of belief, the <code>setBelief(tau, sigma)</code> is also available.</p></td>
        </tr>

    
    </tbody>
</table>



















        
            

    

    <h4 class="name" id="equals"><span class="type-signature"></span>equals<span class="signature">(symbol, what<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {bool}</span></h4>

    




<dl class="details">
    
    <dt class="tag-description">Description:</dt>
    <dd class="tag-description"><ul class="dummy"><li><p>Tests if two symbol are indistiguishable.</p>
<ul>
<li>Two symbols are ``colinear´´ if they have the same corresponds to the same vector, up to the magnitude.</li>
<li>Two symbols are ``indistiguishable´´ if colinear and with the same belief, up to some precision:
<br>`|tau - symbol.tau| &lt; 2 |<a href="algo.html#.sigma_0">sigma_0</a> + sigma + symbol.sigma|</li>
<li>The <code>==</code> C++ operator corresponds to indistiguishable.</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>Default</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="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>The symbol to compare with this one.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>what</code></td>
            

            <td class="type">
            
                
<span class="param-type">char</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    <code>'i'</code>
                
                </td>
            

            <td class="description last"><p>either 'c' for colinear or 'i' for indistiguishable</p></td>
        </tr>

    
    </tbody>
</table>
















<h5 class="h5-returns">Returns:</h5>

        
<div class="param-desc">
    <p>True if equal, false otherwise.</p>
</div>



<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">bool</span>



    </dd>
</dl>

    



        
            

    

    <h4 class="name" id="asString"><span class="type-signature"></span>asString<span class="signature">()</span><span class="type-signature"> &rarr; {String}</span></h4>

    




<dl class="details">
    
    <dt class="tag-description">Description:</dt>
    <dd class="tag-description"><ul class="dummy"><li><p>Returns the value as a string.</p></li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>



























<h5 class="h5-returns">Returns:</h5>

        
<div class="param-desc">
    <p>A string of the form <code>name&lt;tau+-sigma&gt;</code>:</p>
<ul>
<li>omitting the belief if <code>tau=1, sigma=0</code>,</li>
<li>adding the <code>_type</code> if it is an unexpected <code>_bundling</code> or a <code>_binding</code> symbol.</li>
</ul>
</div>



<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">String</span>



    </dd>
</dl>

    



        
            

    

    <h4 class="name" id=".getDimension"><span class="type-signature type-signature-static">(static) </span>getDimension<span class="signature">()</span><span class="type-signature"> &rarr; {uint}</span></h4>

    




<dl class="details">
    
    <dt class="tag-description">Description:</dt>
    <dd class="tag-description"><ul class="dummy"><li><p>Returns the underlying VSA space dimension.</p></li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>



























<h5 class="h5-returns">Returns:</h5>

        
<div class="param-desc">
    <p>The VSA space dimension, default value is <code>d=10000</code>.</p>
</div>



<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">uint</span>



    </dd>
</dl>

    



        
            

    

    <h4 class="name" id=".setDimension"><span class="type-signature type-signature-static">(static) </span>setDimension<span class="signature">(d<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>

    




<dl class="details">
    
    <dt class="tag-description">Description:</dt>
    <dd class="tag-description"><ul class="dummy"><li><p>Changes the underlying VSA space dimension.</p>
<ul>
<li>All computed values are reseted.</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>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>d</code></td>
            

            <td class="type">
            
                
<span class="param-type">uint</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    <code>10000</code>
                
                </td>
            

            <td class="description last"><p>The new VSA space dimension. It must be a square of an integer.</p></td>
        </tr>

    
    </tbody>
</table>



















        
            

    

    <h4 class="name" id=".clone"><span class="type-signature type-signature-static">(static) </span>clone<span class="signature">(symbol, tau<span class="signature-attributes">opt</span>, sigma<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {<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>Properly clone a atomic, binding or bundling symbol, possibly with a different belief.</p>
<ul>
<li>The created symbol is available until program end.</li>
<li>The <code>clone(const Symbol&amp; symbol, const Belief&amp; belief)</code> form is also available.</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>Default</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="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>The symbol to compare with this one.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>tau</code></td>
            

            <td class="type">
            
                
<span class="param-type">double</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    <code>1</code>
                
                </td>
            

            <td class="description last"><p>The symbol degree of belief.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>sigma</code></td>
            

            <td class="type">
            
                
<span class="param-type">double</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    <code>0</code>
                
                </td>
            

            <td class="description last"><p>The symbol standard-deviation of the related level of noise.</p></td>
        </tr>

    
    </tbody>
</table>
















<h5 class="h5-returns">Returns:</h5>

        
<div class="param-desc">
    <p>A pointer to the new symbol to be deleted after use.</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=".fromJSON"><span class="type-signature type-signature-static">(static) </span>fromJSON<span class="signature">(symbol)</span><span class="type-signature"> &rarr; {<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>Parses a weak json string to generate a symbol.</p>
<ul>
<li>In order to input expression we use the usual <a href="https://www.json.org">JSON</a> syntax in a <a href="https://line.gitlabpages.inria.fr/aide-group/wjson">weak form</a>, namely:
<ul>
<li>Bundlings are represented by lists: <br/> <code>[symbol_1 ...]</code>.</li>
<li>Bindings are represented by the construct: <br/> <code>{b y: symbol x: symbol }</code>, <br/> where <code>b</code> stands for binding and is replaced by <code>u</code> for unbinding.</li>
<li>Atomic symbols are represented by the construct: <br/> <code>{ name: symbol-name tau: tau-value sigma: tau-value }, &lt;br/&gt; </code>tau<code>and</code>sigma<code>being optional, while atomic symbols with</code>tau=1<code>and</code>sigma=0` are also represented by strings.</li>
</ul>
</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>symbol</code></td>
            

            <td class="type">
            
                
<span class="param-type">JSON</span>
|

<span class="param-type">string</span>



            
            </td>

            

            

            <td class="description last"><p>The weak json string to parse.</p></td>
        </tr>

    
    </tbody>
</table>
















<h5 class="h5-returns">Returns:</h5>

        
<div class="param-desc">
    <p>A reference to the built symbol.</p>
<ul>
<li>The built symbol is editable and remanent, i.e., available until program end.</li>
</ul>
</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=".toJSON"><span class="type-signature type-signature-static">(static) </span>toJSON<span class="signature">(symbol)</span><span class="type-signature"> &rarr; {string}</span></h4>

    




<dl class="details">
    
    <dt class="tag-description">Description:</dt>
    <dd class="tag-description"><ul class="dummy"><li><p>Returns a symbol using the weak JSON syntax of the <a href=".#fromJSON">fromJSON</a>.</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 encode in JSON.</p></td>
        </tr>

    
    </tbody>
</table>
















<h5 class="h5-returns">Returns:</h5>

        
<div class="param-desc">
    <p>The weak JSON syntax output.</p>
</div>



<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">string</span>



    </dd>
</dl>

    



        
            

    

    <h4 class="name" id=".dump"><span class="type-signature type-signature-static">(static) </span>dump<span class="signature">()</span><span class="type-signature"></span></h4>

    




<dl class="details">
    
    <dt class="tag-description">Description:</dt>
    <dd class="tag-description"><ul class="dummy"><li><p>Prints on stdout, for debugging and statistics purposes, global informations on symbol data.</p></li></ul></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>
The diff you're trying to view is too large. Only the first 1000 changed files have been loaded.
Showing with 0 additions and 0 deletions (0 / 0 diffs computed)
swh spinner

Computing file changes ...

back to top

Software Heritage — Copyright (C) 2015–2026, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API