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://github.com/cran/robCompositions
08 September 2025, 05:43:33 UTC
  • Code
  • Branches (61)
  • Releases (0)
  • Visits
    • Branches
    • Releases
    • HEAD
    • refs/heads/master
    • refs/tags/1.0.1
    • refs/tags/1.2
    • refs/tags/1.2.2
    • refs/tags/1.3.2
    • refs/tags/1.3.3
    • refs/tags/1.4.0
    • refs/tags/1.4.1
    • refs/tags/1.4.2
    • refs/tags/1.4.3
    • refs/tags/1.4.4
    • refs/tags/1.5.0
    • refs/tags/1.6.0
    • refs/tags/1.6.2
    • refs/tags/1.6.3
    • refs/tags/1.6.4
    • refs/tags/1.7.0
    • refs/tags/1.8.0
    • refs/tags/1.9.0
    • refs/tags/1.9.1
    • refs/tags/2.0.0
    • refs/tags/2.0.10
    • refs/tags/2.0.2
    • refs/tags/2.0.3
    • refs/tags/2.0.5
    • refs/tags/2.0.6
    • refs/tags/2.0.7
    • refs/tags/2.0.8
    • refs/tags/2.0.9
    • refs/tags/2.1.0
    • refs/tags/2.2.0
    • refs/tags/2.2.1
    • refs/tags/2.3.0
    • refs/tags/2.3.1
    • refs/tags/2.4.1
    • refs/tags/2.4.2
    • refs/tags/R-2.10.0
    • refs/tags/R-2.10.1
    • refs/tags/R-2.11.0
    • refs/tags/R-2.11.1
    • refs/tags/R-2.12.0
    • refs/tags/R-2.12.1
    • refs/tags/R-2.12.2
    • refs/tags/R-2.13.0
    • refs/tags/R-2.13.1
    • refs/tags/R-2.13.2
    • refs/tags/R-2.14.0
    • refs/tags/R-2.14.1
    • refs/tags/R-2.14.2
    • refs/tags/R-2.15.0
    • refs/tags/R-2.15.1
    • refs/tags/R-2.15.2
    • refs/tags/R-2.15.3
    • refs/tags/R-2.8.1
    • refs/tags/R-2.9.0
    • refs/tags/R-2.9.1
    • refs/tags/R-2.9.2
    • refs/tags/R-3.0.0
    • refs/tags/R-3.0.1
    • refs/tags/R-3.0.2
    • refs/tags/R-3.0.3
    No releases to show
  • 6b3a865
  • /
  • src
  • /
  • robCompositions.c
Raw File Download
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 Iframe embedding
swh:1:cnt:bbd6d0b8f50c7cd1a4655bbddb51c0568e76ced6
origin badgedirectory badge Iframe embedding
swh:1:dir:f1a22d4bab4df3dba0d362a6271c13f71e4f9b2d
origin badgerevision badge
swh:1:rev:0e4dea0c4f25aca197ce1daa242a6e739986a1b2
origin badgesnapshot badge
swh:1:snp:bd1272ba374f32870c3b1da34c37ccda64f17199

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
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Tip revision: 0e4dea0c4f25aca197ce1daa242a6e739986a1b2 authored by Matthias Templ on 22 August 2025, 15:20:02 UTC
version 2.4.2
Tip revision: 0e4dea0
robCompositions.c
#include <R.h>
#include <math.h>

void da(double *matOrig, double *matImp, int *dims, double *rowDists, double *distance) {
	int rows = dims[0];
	int cols = dims[1];
        /* double result; */
	/* int N = rows * cols;	 */
	int i, j, k;
	/* float erg; */

	
	/*Fuer alle Zeilen */
	for (i=0; i < rows; i++) {
		rowDists[i] = 0.0;
		/* ueber die entsprechenden Spalten */
		for (j=(i*cols); j < (i*cols)+cols-1; j++) {
		  for (k=j+1; k < (i*cols)+cols; k++){
			rowDists[i] = rowDists[i] + pow((log(matOrig[j]/matOrig[k]) - log(matImp[j]/matImp[k])),2);
		  }
		}
		/* Gesamtdistanz aufsummieren */
		distance[0] = distance[0] + sqrt(rowDists[i]/cols);
	} 
        /*result = distance[rows];
        return result; */
        /* return distance[rows];  das funkt leider nicht, brauche nur einen Wert zurueckgeben! */
}

back to top

Software Heritage — Copyright (C) 2015–2025, 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