https://github.com/cran/ltsa
Tip revision: b417f2de2e2d8f2d982ea55f1fb5b8a55b7e63f8 authored by A.I. McLeod on 21 September 2012, 00:00:00 UTC
version 1.4.2
version 1.4.2
Tip revision: b417f2d
fromWedgeStorage.c
// Convert list of vectors representing a doubly symmetric matrix to a matrix.
#include "trenchR.h"
void fromWedgeStorage(int n,double **B)
{
int i,j;
for (i = 1; i <= n; i++)
for (j = 1; j <= n; j++)
for (i = 1; i <= j; i++)
{
if (i > (int)((n+1-(j - i))/2))
B[i-1][j-1] = B[n-j][n-i];
}
for (i = 0; i < n; i++)
for (j = 0; j < i; j++)
{
B[i][j] = B[j][i];
}
return;
}