<commit_before>#include "icp.h"

static void getRTMatrixSVD( const CvPoint2D32f* a, const CvPoint2D32f* b, int count ,CvMat *r,CvMat *t) {
	int i;
	float H[4] = {0.f,0.f,0.f,0.f};
	float U[4] = {0.f,0.f,0.f,0.f};
	float W[4] = {0.f,0.f,0.f,0.f};
	float V[4] = {0.f,0.f,0.f,0.f};
	CvMat h = cvMat(2,2,CV_32F,H);
	CvMat u = cvMat(2,2,CV_32F,U);
	CvMat w = cvMat(2,2,CV_32F,W);
	CvMat v = cvMat(2,2,CV_32F,V);
	CvPoint2D32f mean_a = cvPoint2D32f(0.f,0.f);
	CvPoint2D32f mean_b = cvPoint2D32f(0.f,0.f);
	for( i = 0 ; i < count ; i ++) {
		mean_a.x += a[i].x;
		mean_a.y += a[i].y;
		mean_b.x += b[i].x;
		mean_b.y += b[i].y;
	}
	mean_a.x /= (float)count;
	mean_a.y /= (float)count;
	mean_b.x /= (float)count;
	mean_b.y /= (float)count;
	for( i = 0 ; i < count ; i ++) {
		float AX = (a[i].x-mean_a.x);
		float AY = (a[i].y-mean_a.y);
		float BX = (b[i].x-mean_b.x);
		float BY = (b[i].y-mean_b.y);
		H[0] += AX*BX;<commit_msg>add commentary.<commit_after>#include "icp.h"
// return the rigid transformation (rotation and tranlation matrix), for more inforation see http://nghiaho.com/?page_id=671
static void getRTMatrixSVD( const CvPoint2D32f* a, const CvPoint2D32f* b, int count ,CvMat *r,CvMat *t) {
	int i;
	float H[4] = {0.f,0.f,0.f,0.f}; CvMat h = cvMat(2,2,CV_32F,H);
	float U[4] = {0.f,0.f,0.f,0.f}; CvMat u = cvMat(2,2,CV_32F,U);
	float W[4] = {0.f,0.f,0.f,0.f}; CvMat w = cvMat(2,2,CV_32F,W);
	float V[4] = {0.f,0.f,0.f,0.f}; CvMat v = cvMat(2,2,CV_32F,V);
	CvPoint2D32f mean_a = cvPoint2D32f(0.f,0.f);
	CvPoint2D32f mean_b = cvPoint2D32f(0.f,0.f);
	
	for( i = 0 ; i < count ; i ++) {
		mean_a.x += a[i].x;
		mean_a.y += a[i].y;
		mean_b.x += b[i].x;
		mean_b.y += b[i].y;
	}
	mean_a.x /= (float)count;
	mean_a.y /= (float)count;
	mean_b.x /= (float)count;
	mean_b.y /= (float)count;
	for( i = 0 ; i < count ; i ++) {
		float AX = (a[i].x-mean_a.x);
		float AY = (a[i].y-mean_a.y);
		float BX = (b[i].x-mean_b.x);
		float BY = (b[i].y-mean_b.y);
		H[0] += AX*BX;
{'fraction_non_alphanumeric': 0.23628048780487804, 'fraction_numerical': 0.06351626016260163, 'mean_word_length': 3.434684684684685, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3584442', 'n_tokens_mistral': 1163, 'n_tokens_neox': 1106, 'n_words': 193}