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
30 August 2023, 09:16:47 UTC
  • Code
  • Branches (60)
  • 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/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
  • 276ba34
  • /
  • 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 ...

Permalinks

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:06dbdab1b564b97b4634bd2b04cc265860f4b9fa
origin badgerevision badge
swh:1:rev:165037e6629b3969bb2024b9b74bc0bc78b6e1c4
origin badgesnapshot badge
swh:1:snp:a834597e990103ef657750d415704ddb66d22f69
Citations

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: 165037e6629b3969bb2024b9b74bc0bc78b6e1c4 authored by Matthias Templ on 27 February 2013, 00:00:00 UTC
version 1.6.3
Tip revision: 165037e
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— Contact— JavaScript license information— Web API