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

https://gitlab.inria.fr/line/aide-group/macrovsa
04 May 2026, 13:41:51 UTC
  • Code
  • Branches (1)
  • Releases (0)
  • Visits
    • Branches
    • Releases
    • HEAD
    • refs/heads/master
    No releases to show
  • d85ce8c
  • /
  • src
  • /
  • Binding.hpp
Raw File Download Save again
Take a new snapshot of a software origin

If the archived software origin currently browsed is not synchronized with its upstream version (for instance when new commits have been issued), you can explicitly request Software Heritage to take a new snapshot of it.

Use the form below to proceed. Once a request has been submitted and accepted, it will be processed as soon as possible. You can then check its processing state by visiting this dedicated page.
swh spinner

Processing "take a new snapshot" request ...

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.

  • content
  • directory
  • revision
  • snapshot
origin badgecontent badge
swh:1:cnt:d351d7e06c182f660c46d7957e68b3efef637b96
origin badgedirectory badge
swh:1:dir:b8157120e03f8858febdc76e496e300e843c5750
origin badgerevision badge
swh:1:rev:31a87d848f8ab28a06ccf77d0b359fc966974138
origin badgesnapshot badge
swh:1:snp:ffb1e6ef77e78b82672462770a7171c80c299b3b

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.

  • content
  • directory
  • revision
  • snapshot
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
Tip revision: 31a87d848f8ab28a06ccf77d0b359fc966974138 authored by vthierry on 15 December 2025, 21:31:50 UTC
sync from makefile
Tip revision: 31a87d8
Binding.hpp
#ifndef __macrovsa_Binding__
#define __macrovsa_Binding__

#include "Symbol.hpp"

namespace macrovsa {
  /**
   * @class Binding
   * @description Implements a macroscopic ersatz of a VSA left-binding/unbinding.
   * - Implements the VTB `B(y) x` and `B(y~) x` operators, i.e., either
   *    - the binding of `x` by the `VTB` matrix of `y`,
   *    - the unbinding of `x` by the `VTB` matrix of `y~`, with `B(y~) = B(y)^T`.
   * - The binding name `B(y)_x` is calculated from its member name.
   * - The binding belief `tau = tau_y tau_x` and `sigma = sigma_0 + sigma_y + sigma_x` is calculated from its member belief.
   * - Note: a binding can not be copied, use the [clone()](Symbol.html/#.clone) method instead.
   * @extends Symbol
   * @param {Symbol} y The y symbol.
   * @param {Symbol} x The x symbol.
   * @param {bool} [b=true] If true constructs a binding, if false construct an unbinding.
   * @param {bool} [normalized=false] If true the mesoscopic computed vector is normalized to a unary magnitude.
   */
  class Binding: public Symbol {
    // Internal variable
    Symbol *y_ = NULL, *x_ = NULL;
    bool b_, normalized_;
    // Non assignable
    Binding& operator = (const Binding&) = delete;
protected:
    // Mesoscopic implementation
    virtual void setVector(double *vector) const;
public:
    Binding(const Symbol& y, const Symbol& x, bool b = true, bool normalized = false);
    Binding(const Binding& symbol);
    virtual ~Binding();
    virtual void setBelief(double tau, double sigma);
    virtual bool equals(const Symbol& symbol, char what = 'i') const;
    virtual std::string asString() const;

    /**
     * @function y
     * @memberof Binding
     * @instance
     * @description Returns the binding operator y left parameter.
     * @return {Symbol} The y value.
     */
    const Symbol& y() const
    {
      return *y_;
    }
    /**
     * @function x
     * @memberof Binding
     * @instance
     * @description Returns the binding operator x left parameter.
     * @return {Symbol} The x value.
     */
    const Symbol& x() const
    {
      return *x_;
    }
    /**
     * @function b
     * @memberof Binding
     * @instance
     * @description Returns the binding/unbinding flag.
     * @return {bool} If true the operation is a bindind, if false it is an unbinding.
     */
    const bool b() const
    {
      return b_;
    }
    /**
     * @function normalized
     * @memberof Binding
     * @instance
     * @description Returns the normalize flag.
     * @return {bool} If true mesoscopic computed vector is normalized to a unary magnitude.
     */
    const bool normalized() const
    {
      return normalized_;
    }
    /**
     * @function asString
     * @memberof Binding
     * @instance
     * @description Returns the value as a string.
     * @return {String} A string of the `B_(y)(x)_<belief>` for binding or `B_(y~)(x)_<belief>` for unbinding, omitting the belief if `tau=1, sigma=0`.
     */
    /** 
     * @function getComputationTIme
     * @memberof Binding
     * @static
      * @description Returns a relative estimation of the computation time order of magnitude.
     * - It has been calibrated on a `Intel® CoreTM i5-8265U CPU @ 1.60GHz × 8 cores processor`with no use of GPU.
     * - This provides obviously only relative values, useful for comparison between orders of magnitude.
     * @return {double} A `O(dimension^1.35)` computation time order of magnitude estimation in milli-seconds.
     */
    static double getComputationTIme();
  };
}

#endif

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