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
3e1a676d
Commit
3e1a676d
authored
21 years ago
by
Tim Behrens
Browse files
Options
Downloads
Patches
Plain Diff
*** empty log message ***
parent
78c7f415
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
miscmaths.cc
+6
-0
6 additions, 0 deletions
miscmaths.cc
miscmaths.h
+3
-2
3 additions, 2 deletions
miscmaths.h
with
9 additions
and
2 deletions
miscmaths.cc
+
6
−
0
View file @
3e1a676d
...
...
@@ -1700,6 +1700,12 @@ void ols(const Matrix& data,const Matrix& des,const Matrix& tc, Matrix& cope,Mat
}
int
ols_dof
(
const
Matrix
&
des
){
Matrix
pdes
=
pinv
(
des
);
Matrix
R
=
Identity
(
des
.
Nrows
())
-
des
*
pdes
;
return
int
(
R
.
Trace
());
}
int
conjgrad
(
ColumnVector
&
x
,
const
Matrix
&
A
,
const
ColumnVector
&
b
,
int
maxit
,
float
reltol
)
{
...
...
This diff is collapsed.
Click to expand it.
miscmaths.h
+
3
−
2
View file @
3e1a676d
/* miscmaths.h
Mark Jenkinson & Mark Woolrich & Christian Beckmann, FMRIB Image Analysis Group
Mark Jenkinson & Mark Woolrich & Christian Beckmann
& Tim Behrens
, FMRIB Image Analysis Group
Copyright (C) 1999-2000 University of Oxford */
...
...
@@ -203,7 +203,8 @@ namespace MISCMATHS {
// cope and varcope will be cons x v
// but will be resized if they are wrong
void
ols
(
const
Matrix
&
data
,
const
Matrix
&
des
,
const
Matrix
&
tc
,
Matrix
&
cope
,
Matrix
&
varcope
);
int
ols_dof
(
const
Matrix
&
des
);
// Conjugate Gradient methods to solve for x in: A * x = b
// A must be symmetric and positive definite
...
...
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