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
16 May 2026, 22:45:59 UTC
  • Code
  • Branches (1)
  • Releases (0)
  • Visits
    • Branches
    • Releases
    • HEAD
    • refs/heads/master
    No releases to show
  • d85ce8c
  • /
  • src
  • /
  • AssociativeNetwork.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:94cc953a703a0a5a2ab626be14e704e0f45f7675
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
AssociativeNetwork.hpp
#ifndef __macrovsa_AssociativeNetwork__
#define __macrovsa_AssociativeNetwork__

#include "Symbol.hpp"
#include "AssociativeMap.hpp"

namespace macrovsa {
  /**
   * @class AssociativeNetwork
   * @description Implements a macroscopic ersatz of a VSA associative network.
   * - An associative network is created adding new key/value pairs of symbol.
   * - It is implemented via a matrix of the form `>_i value_i key_i^T`
   * @param {string} [name] An optional name. By default, a `#index` unique name is generated.
   * @extends AssociativeMap
   */
  class AssociativeNetwork: public Symbol {
    // Non assignable
    AssociativeMap& operator = (const AssociativeMap&) = delete;
    AssociativeNetwork(const AssociativeNetwork&) = delete;
    // Double indexing mechanism
    AssociativeMap keys, values;
public:
    AssociativeNetwork() {}
    AssociativeNetwork(String name) : Symbol(name) {}

    /**
     * @function add
     * @memberof AssociativeNetwork
     * @instance
     * @description Adds a new symbol pair to the container.
     * @param {Symbol} key The symbol key to add.
     * @param {Symbol} value The symbol value to add.
     */
    void add(const Symbol& key, const Symbol& value)
    {
      values.add(key, value);
      keys.add(value, key);
    }
    /**
     * @function getValue
     * @memberof AssociativeMap
     * @instance
     * @description Returns an approximate value of the associative map by unbinding.
     * @param {Symbol|String} key The symbol key `key_i`.
     * @return {Symbol} value A reference to the stored values as a bundling, available until program end.
     */
    const Symbol& getValue(const Symbol& key) const
    {
      return values.get(key);
    }
    const Symbol& getValue(String key) const
    {
      Symbol *skey = new Symbol(key);
      const Symbol& result = values.get(*skey);
      delete skey;
      return result;
    }
    /**
     * @function getKey
     * @memberof AssociativeMap
     * @instance
     * @description Returns an approximate key of the associative map by unbinding.
     * @param {Symbol|String} value The symbol value `value_i`.
     * @return {Symbol} key A reference to the stored keys as a bundling, available until program end.
     */
    const Symbol& getKey(const Symbol& value) const
    {
      return keys.get(value);
    }
    const Symbol& getKey(String value) const
    {
      Symbol *svalue = new Symbol(value);
      const Symbol& result = values.get(*svalue);
      delete svalue;
      return result;
    }
  };
}

#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