Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
prova.c File Reference

Small standalone test program for the experimental polar decomposition code. More...

#include "polar_decomposition.h"
#include <stdio.h>
+ Include dependency graph for prova.c:

Go to the source code of this file.

Macros

#define TEST_N   1
 

Functions

void print_float (TYPE num)
 Print one scalar diagnostic produced by the orthogonality check.
 
void check_orthonormal (TYPE Q[3][3])
 Print the pairwise row dot products of a 3x3 matrix.
 
void stampa_3x3 (TYPE Q[3][3])
 Print a 3x3 matrix in row-major order.
 
void copy (TYPE *dest, TYPE *source, size_t num_el)
 Copy a flat buffer used to initialize test matrices.
 
int main ()
 

Detailed Description

Small standalone test program for the experimental polar decomposition code.

The program feeds a few hard-coded 3x3 matrices into polar_decomposition(), prints the resulting factors, and checks that the recovered orthogonal matrix has nearly orthogonal rows.

Definition in file prova.c.

Macro Definition Documentation

◆ TEST_N

#define TEST_N   1

Definition at line 44 of file prova.c.

Function Documentation

◆ check_orthonormal()

void check_orthonormal ( TYPE  Q[3][3])

Print the pairwise row dot products of a 3x3 matrix.

Print the row-wise orthogonality residuals of a 3x3 matrix.

Definition at line 106 of file prova.c.

References i, print_float(), and TYPE.

Referenced by main().

◆ copy()

◆ main()

◆ print_float()

void print_float ( TYPE  num)

Print one scalar diagnostic produced by the orthogonality check.

Print one scalar residual.

Definition at line 124 of file prova.c.

Referenced by check_orthonormal().

◆ stampa_3x3()

void stampa_3x3 ( TYPE  Q[3][3])

Print a 3x3 matrix in row-major order.

Definition at line 92 of file prova.c.

Referenced by main().