Super Mario 64 Source
A Super Mario 64 decompilation, brought to you by a bunch of clever folks.
Functions
estimate.c File Reference
#include <math.h>
#include <stdlib.h>
#include "tabledesign.h"

Functions

void acf (double *vec, int n, double *out, int k)
 Computes the autocorrelation of a vector. More...
 
int durbin (double *arg0, int n, double *arg2, double *arg3, double *outSomething)
 
void afromk (double *in, double *out, int n)
 
int kfroma (double *in, double *out, int n)
 
void rfroma (double *arg0, int n, double *arg2)
 
double model_dist (double *arg0, double *arg1, int n)
 
void acmat (short *in, int n, int m, double **out)
 
void acvect (short *in, int n, int m, double *out)
 
int lud (double **a, int n, int *indx, int *d)
 Replaces a real n-by-n matrix "a" with the LU decomposition of a row-wise permutation of itself. More...
 
void lubksb (double **a, int n, int *indx, double *b)
 Solves the set of n linear equations Ax = b, using LU decomposition back-substitution. More...
 

Function Documentation

◆ acf()

void acf ( double *  vec,
int  n,
double *  out,
int  k 
)

Computes the autocorrelation of a vector.

More precisely, it computes the dot products of vec[i:] and vec[:-i] for i in [0, k). Unused.

See https://en.wikipedia.org/wiki/Autocorrelation.

◆ acmat()

void acmat ( short *  in,
int  n,
int  m,
double **  out 
)

◆ acvect()

void acvect ( short *  in,
int  n,
int  m,
double *  out 
)

◆ afromk()

void afromk ( double *  in,
double *  out,
int  n 
)

◆ durbin()

int durbin ( double *  arg0,
int  n,
double *  arg2,
double *  arg3,
double *  outSomething 
)

◆ kfroma()

int kfroma ( double *  in,
double *  out,
int  n 
)

◆ lubksb()

void lubksb ( double **  a,
int  n,
int indx,
double *  b 
)

Solves the set of n linear equations Ax = b, using LU decomposition back-substitution.

Input parameters: a: The LU decomposition of a matrix, created by "lud". n: The size of the matrix. indx: Row permutation vector, created by "lud". b: The vector b in the equation. 1-indexed; is should be of size n+1, and index 0 is not used.

Output parameters: b: The output vector x. 1-indexed.

From "Numerical Recipes in C: The Art of Scientific Computing".

◆ lud()

int lud ( double **  a,
int  n,
int indx,
int d 
)

Replaces a real n-by-n matrix "a" with the LU decomposition of a row-wise permutation of itself.

Input parameters: a: The matrix which is operated on. 1-indexed; it should be of size (n+1) x (n+1), and row/column index 0 is not used. n: The size of the matrix.

Output parameters: indx: The row permutation performed. 1-indexed; it should be of size n+1, and index 0 is not used. d: the determinant of the permutation matrix.

Returns 1 to indicate failure if the matrix is singular or has zeroes on the diagonal, 0 on success.

Derived from ludcmp in "Numerical Recipes in C: The Art of Scientific Computing", with modified error handling.

◆ model_dist()

double model_dist ( double *  arg0,
double *  arg1,
int  n 
)

◆ rfroma()

void rfroma ( double *  arg0,
int  n,
double *  arg2 
)