From dc3e6ee0b7ae9ee7996a5fdb55d418cb0bb2dce0 Mon Sep 17 00:00:00 2001 From: Mark Jenkinson <mark@fmrib.ox.ac.uk> Date: Fri, 20 Feb 2004 15:59:35 +0000 Subject: [PATCH] Removed newimage references and bad header includes --- Makefile | 4 ++-- sparse_matrix.cc | 4 +--- sparsefn.cc | 30 +----------------------------- sparsefn.h | 1 - 4 files changed, 4 insertions(+), 35 deletions(-) diff --git a/Makefile b/Makefile index 757e53c..b2fb9e0 100644 --- a/Makefile +++ b/Makefile @@ -7,8 +7,8 @@ PROJNAME = miscmaths USRINCFLAGS = -I${INC_NEWMAT} -I${INC_PROB} USRLDFLAGS = -L${LIB_NEWMAT} -L${LIB_PROB} -OBJS = miscmaths.o optimise.o miscprob.o kernel.o histogram.o base2z.o t2z.o f2z.o volume.o volumeseries.o -#OBJS = miscmaths.o optimise.o miscprob.o kernel.o histogram.o base2z.o t2z.o f2z.o volume.o volumeseries.o minimize.o cspline.o sparse_matrix.o sparsefn.o +OBJS = miscmaths.o optimise.o miscprob.o kernel.o histogram.o base2z.o t2z.o f2z.o volume.o volumeseries.o minimize.o cspline.o sparse_matrix.o sparsefn.o +#OBJS = miscmaths.o optimise.o miscprob.o kernel.o histogram.o base2z.o t2z.o f2z.o volume.o volumeseries.o minimize.o cspline.o LIBS = -lutils -lnewmat -lprob -lm diff --git a/sparse_matrix.cc b/sparse_matrix.cc index c9edd56..5980f6b 100644 --- a/sparse_matrix.cc +++ b/sparse_matrix.cc @@ -8,15 +8,13 @@ #include "sparse_matrix.h" #include "newmatio.h" #include "newmat.h" -#include "miscmaths/miscmaths.h" -#include "newimage/newimageall.h" +#include "miscmaths.h" #include "utils/tracer_plus.h" using namespace std; using namespace Utilities; using namespace NEWMAT; using namespace MISCMATHS; -using namespace NEWIMAGE; namespace MISCMATHS { diff --git a/sparsefn.cc b/sparsefn.cc index 2b18592..0ccdcfe 100644 --- a/sparsefn.cc +++ b/sparsefn.cc @@ -9,14 +9,12 @@ #include "sparsefn.h" #include "newmatio.h" #include "newmat.h" -#include "miscmaths/miscmaths.h" -#include "newimage/newimageall.h" +#include "miscmaths.h" #include "utils/tracer_plus.h" using namespace std; using namespace NEWMAT; using namespace MISCMATHS; -using namespace NEWIMAGE; using namespace Utilities; namespace MISCMATHS { @@ -128,32 +126,6 @@ namespace MISCMATHS { } } - void symmmd(const SparseMatrix& A, ColumnVector& p) - { - Tracer_Plus trace("sparsefns::symmmd"); - - // save indices - volume<int> inds(A.maxnonzerosinrow(),A.Nrows(),1); - inds = -1; - - if(A.maxnonzerosinrow()>32000 || A.Nrows() > 32000) - throw Exception("too big for AVW in symmmd"); - - for(int j = 1; j<=A.Nrows(); j++) - { - const SparseMatrix::Row& rowAj = A.row(j); - int c = 0; - for(SparseMatrix::Row::const_iterator it=rowAj.begin();it!=rowAj.end();it++) - { - inds(c,j-1,0) = (*it).first+1; - c++; - } - } - - save_volume(inds,"/tmp/symmmd_inds"); - system("matlab < /usr/people/woolrich/matlab/mrf/callsymmmd.m > /tmp/dev"); - p=read_ascii_matrix("/tmp/symmmd_p").AsColumn(); - } void chol(const SparseMatrix& A, SparseMatrix& U, SparseMatrix& L) { diff --git a/sparsefn.h b/sparsefn.h index 2a372c2..740a397 100644 --- a/sparsefn.h +++ b/sparsefn.h @@ -24,7 +24,6 @@ namespace MISCMATHS { float quadratic(const ColumnVector& m, const SparseMatrix& C); void speye(int n, SparseMatrix& ret); - void symmmd(const SparseMatrix& A, ColumnVector& p); void chol(const SparseMatrix& A, SparseMatrix& U, SparseMatrix& L); void inv(const SparseMatrix& U, const SparseMatrix& L, SparseMatrix& ret); void solvefortracex(const SparseMatrix& U, const SparseMatrix& L, const SparseMatrix& b1, const SparseMatrix& b2, float& tr1, float& tr2); -- GitLab