https://github.com/cran/ltsa
Revision d1a312e52f8273b90b43b27e3e97d500010fb403 authored by A.I. McLeod on 30 October 2007, 16:55:48 UTC, committed by cran-robot on 30 October 2007, 16:55:48 UTC
0 parent
Raw File
Tip revision: d1a312e52f8273b90b43b27e3e97d500010fb403 authored by A.I. McLeod on 30 October 2007, 16:55:48 UTC
version 1.0
Tip revision: d1a312e
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;
}
back to top