Subversion Repositories gelsvn

Rev

Rev 10 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 10 Rev 12
Line 25... Line 25...
25
	cout << norm << a << b << endl;
25
	cout << norm << a << b << endl;
26
 
26
 
27
	vector<Vec3f> vec;
27
	vector<Vec3f> vec;
28
	srand(0);
28
	srand(0);
29
	for(int i=0;i<100000;++i)
29
	for(int i=0;i<100000;++i)
30
		{
30
	  {
31
			Vec3f p = 1.0f*frand()*norm + 2.02f*frand()*a + 3.05f*frand()*b;
31
	    Vec3f p = 1.0f*frand()*norm + 2.02f*frand()*a + 3.05f*frand()*b;
32
			vec.push_back(p);
32
	    vec.push_back(p);
33
		}
33
	  }
34
 
34
	
35
 
35
	
36
	Mat3x3f A;
36
	Mat3x3f A(0);
37
	Vec3f m = covariance(vec, A);
37
	Vec3f m = covariance(vec, A);
38
 
38
 
39
	cout << "Mean and covariance " << endl;
39
	cout << "Mean and covariance " << endl;
40
	cout << m << "\n" << A << endl;
40
	cout << m << "\n" << A << endl;
41
 
41