Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
miscmaths
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FSL
miscmaths
Commits
dc3e6ee0
Commit
dc3e6ee0
authored
21 years ago
by
Mark Jenkinson
Browse files
Options
Downloads
Patches
Plain Diff
Removed newimage references and bad header includes
parent
c6998d3e
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
Makefile
+2
-2
2 additions, 2 deletions
Makefile
sparse_matrix.cc
+1
-3
1 addition, 3 deletions
sparse_matrix.cc
sparsefn.cc
+1
-29
1 addition, 29 deletions
sparsefn.cc
sparsefn.h
+0
-1
0 additions, 1 deletion
sparsefn.h
with
4 additions
and
35 deletions
Makefile
+
2
−
2
View file @
dc3e6ee0
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
sparse_matrix.cc
+
1
−
3
View file @
dc3e6ee0
...
...
@@ -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
{
...
...
This diff is collapsed.
Click to expand it.
sparsefn.cc
+
1
−
29
View file @
dc3e6ee0
...
...
@@ -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
)
{
...
...
This diff is collapsed.
Click to expand it.
sparsefn.h
+
0
−
1
View file @
dc3e6ee0
...
...
@@ -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
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment