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
  • /
  • RelationalMap.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:1a07f2f4bead47594904fb7ff439efec4d6809f3

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 ...
RelationalMap.html
<!DOCTYPE html>
<html lang="en">
<head>
    
    <meta charset="utf-8">
    <title>RelationalMap - 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">RelationalMap</h1>
    

    




<section>

<header>
    
        <h2>
        
            RelationalMap
        
        </h2>
        
    
</header>

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

    

    <h4 class="name" id="RelationalMap"><span class="type-signature"></span>new RelationalMap<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>Implements a macroscopic ersatz of a VSA relational map.</p>
<ul>
<li>An relational map is created adding new symbols triples.</li>
<li>It is implemented via <a href="./Bundling.html">Bundling</a> and double <a href="./Binding.html">Binding</a>, without using a C++ map.</li>
</ul>
<h4>Extends: <a href='./Bundling.html'>Bundling</a>, with all public methods available.</h4></li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>






























        
        </div>
    

    

    

    
    
    

     

    

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

        
            

    

    <h4 class="name" id="add"><span class="type-signature"></span>add<span class="signature">(subject, belief<span class="signature-attributes">opt</span>, predicate, object)</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>Adds a new symbolic triple to the container.</p>
<ul>
<li>For convinience the symbol can be given by its name, considering that <code>tau = 1, sigma = 0</code>.</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>subject</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="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>The triple subject to add.</p></td>
        </tr>

    

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

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

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



            
            </td>

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

                

                
                </td>
            

            

            <td class="description last"><p>An optional belief, or <code>tau</code> value, applied on the predicate.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>predicate</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="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>The triple predicate to add.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>object</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="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>The triple object to add.</p></td>
        </tr>

    
    </tbody>
</table>



















        
            

    

    <h4 class="name" id="add"><span class="type-signature"></span>add<span class="signature">(map)</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>Adds all triple of a relation map in this one.</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>map</code></td>
            

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



            
            </td>

            

            

            <td class="description last"><p>The triples to append to this relation map</p></td>
        </tr>

    
    </tbody>
</table>



















        
            

    

    <h4 class="name" id="add"><span class="type-signature"></span>add<span class="signature">(filename)</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>Adds all triple read from a text file with N-Triples syntax.</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>filename</code></td>
            

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



            
            </td>

            

            

            <td class="description last"><p>The filename <a href="https://en.wikipedia.org/wiki/N-Triples">N-Triples</a> syntax, with the triples to append to this relation map</p></td>
        </tr>

    
    </tbody>
</table>



















        
            

    

    <h4 class="name" id="get"><span class="type-signature"></span>get<span class="signature">(name)</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>Returns an approximate value of the relational map by unbinding.</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>name</code></td>
            

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



            
            </td>

            

            

            <td class="description last"><p>The symbol name.</p></td>
        </tr>

    
    </tbody>
</table>
















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

        
<div class="param-desc">
    <p>value A pointer to the stored value, 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="get"><span class="type-signature"></span>get<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>Defines an iterator over the relational map symbols, used in a construct of the form:</p>
<pre class="prettyprint source"><code> for(auto it = relationalMap.Bundling::get().cbegin(); it != relationalMap.Bundling::get().cend(); it++) {
   const Binding& binding_spo = dynamic_cast &lt;const Binding&> (it->second);
   const Binding& binding_po = dynamic_cast &lt;const Binding&> (binding_spo.x());
   const Symbol& subject = binding_spo.y(), predicate = binding_po.y(), object = binding_po.x();
   ../..
 }
</code></pre></li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>



























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

        
<div class="param-desc">
    <p>A <code>const std::map &lt;unsigned int, Symbol&amp; &gt;&amp;</code> reference for relational map iteration.</p>
</div>



    



        
            

    

    <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>{\n\t(subject_i predicate_i object_i)_&lt;belief&gt; ...\n}_&lt;belief&gt;</code>, omitting belief if <code>tau=1, sigma=0</code>.</p>
</div>



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



    </dd>
</dl>

    



        
            

    

    <h4 class="name" id=".asString"><span class="type-signature type-signature-static">(static) </span>asString<span class="signature">(subject, belief<span class="signature-attributes">opt</span>, predicate, object)</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 of a triple as a string.</p>
<ul>
<li>For convinience the symbol can be given by its name, considering that <code>tau = 1, sigma = 0</code>.</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>subject</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="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>The triple subject to add.</p></td>
        </tr>

    

        <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="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>An optional belief apply on the predicate.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>predicate</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="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>The triple predicate to add.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>object</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="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>The triple object to add.</p></td>
        </tr>

    
    </tbody>
</table>
















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

        
<div class="param-desc">
    <p>A string of the form <code>(subject_i predicate_i object_i)_&lt;belief&gt;</code>, omitting belief if <code>tau=1, sigma=0</code>.</p>
</div>



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



    </dd>
</dl>

    



        
            

    

    <h4 class="name" id="save"><span class="type-signature"></span>save<span class="signature">(filename)</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>Saves the triples of this relation map text file in partial [Turtle](https://en.wikipedia.org/wiki/Turtle_(syntax) syntax.</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>filename</code></td>
            

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



            
            </td>

            

            

            <td class="description last"><p>The output file name.</p></td>
        </tr>

    
    </tbody>
</table>



















        
    

    

    
</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