From 4dd955aa0e6fdb77fe9cf71e7cd178ced1e1f3d4 Mon Sep 17 00:00:00 2001 From: Matthew Webster <mwebster@fmrib.ox.ac.uk> Date: Mon, 18 Aug 2008 12:57:50 +0000 Subject: [PATCH] Identity to IdentityMatrix --- miscmaths.cc | 21 --------------------- miscmaths.h | 1 - 2 files changed, 22 deletions(-) diff --git a/miscmaths.cc b/miscmaths.cc index 33a37cf..8022a23 100644 --- a/miscmaths.cc +++ b/miscmaths.cc @@ -446,25 +446,6 @@ namespace MISCMATHS { return a*a + b*b + c*c; } - int Identity(Matrix& m) - { - Tracer tr("Identity"); - m=0.0; - for (int j=1; j<=m.Nrows(); j++) - m(j,j)=1.0; - return 0; - } - - ReturnMatrix Identity(int num) - { - Tracer tr("Identity"); - Matrix eye(num,num); - Identity(eye); - eye.Release(); - return eye; - } - - int diag(Matrix& m, const float diagvals[]) { Tracer tr("diag"); @@ -954,8 +935,6 @@ namespace MISCMATHS { Matrix rotmat(3,3); rotmat = aff3 * scales.i() * (skew.SubMatrix(1,3,1,3)).i(); ColumnVector transl(3); - //transl = affmat.SubMatrix(1,3,4,4); - //transl = transl - (Identity(3) - rotmat)*centre; transl = affmat.SubMatrix(1,3,1,3)*centre + affmat.SubMatrix(1,3,4,4) - centre; for (int i=1; i<=3; i++) { params(i+3) = transl(i); } diff --git a/miscmaths.h b/miscmaths.h index d8a88a2..6becb3c 100644 --- a/miscmaths.h +++ b/miscmaths.h @@ -121,7 +121,6 @@ namespace MISCMATHS { float norm2sq(float a, float b, float c); int Identity(Matrix& m); - ReturnMatrix Identity(int num); ColumnVector seq(const int num); int diag(Matrix& m, const float diagvals[]); -- GitLab