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:

Macros

#define TEST_N   1
 

Functions

void print_float (double num)
 Print one scalar diagnostic produced by the orthogonality check.
 
void check_orthonormal (double Q[3][3])
 Print the pairwise row dot products of a 3x3 matrix.
 
void stampa_3x3 (double Q[3][3])
 Print a 3x3 matrix in row-major order.
 
void copy (double *dest, double *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.

Macro Definition Documentation

◆ TEST_N

#define TEST_N   1

Function Documentation

◆ check_orthonormal()

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

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

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

References i, print_float(), and TYPE.

Referenced by main().

◆ copy()

void copy ( double dest,
double source,
size_t  num_el 
)

Copy a flat buffer used to initialize test matrices.

Copy a flat buffer used to initialize test matrices.

Parameters
[out]destDestination buffer.
[in]sourceSource buffer.
[in]num_elNumber of elements to copy.

Referenced by _masks_gui_menu_item_forward_event(), _set_help_string(), _update_tree_view_nodes_font(), dt_cairo_sharpen_surface_rgb24(), dt_collection_load_filmroll(), dt_ioppr_extract_multi_instances_list(), dt_ioppr_merge_multi_instance_iop_order_list(), gui_init(), main(), and polar_decomposition().

◆ main()

◆ print_float()

void print_float ( double  num)

Print one scalar diagnostic produced by the orthogonality check.

Print one scalar residual.

Referenced by check_orthonormal().

◆ stampa_3x3()

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

Print a 3x3 matrix in row-major order.

Referenced by main().