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
0a432f69
Commit
0a432f69
authored
21 years ago
by
Mark Jenkinson
Browse files
Options
Downloads
Patches
Plain Diff
Added overloaded norm2(a,b,c) fns
parent
5ee22883
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Makefile
+3
-0
3 additions, 0 deletions
Makefile
miscmaths.cc
+9
-0
9 additions, 0 deletions
miscmaths.cc
miscmaths.h
+2
-0
2 additions, 0 deletions
miscmaths.h
with
14 additions
and
0 deletions
Makefile
+
3
−
0
View file @
0a432f69
...
...
@@ -22,5 +22,8 @@ quick:${OBJS} quick.o
libmiscmaths.a
:
${OBJS}
${
AR
}
-r
libmiscmaths.a
${
OBJS
}
testprog
:
testprog.o
${
CXX
}
${
CXXFLAGS
}
${
LDFLAGS
}
-o
$@
${
OBJS
}
testprog.o
${
LIBS
}
This diff is collapsed.
Click to expand it.
miscmaths.cc
+
9
−
0
View file @
0a432f69
...
...
@@ -407,6 +407,15 @@ namespace MISCMATHS {
return
std
::
sqrt
(
x
.
SumSquare
());
}
double
norm2
(
double
a
,
double
b
,
double
c
)
{
return
a
*
a
+
b
*
b
+
c
*
c
;
}
float
norm2
(
float
a
,
float
b
,
float
c
)
{
return
a
*
a
+
b
*
b
+
c
*
c
;
}
int
Identity
(
Matrix
&
m
)
{
...
...
This diff is collapsed.
Click to expand it.
miscmaths.h
+
2
−
0
View file @
0a432f69
...
...
@@ -106,6 +106,8 @@ namespace MISCMATHS {
{
return
Sum
(
SP
(
a
,
b
));
}
double
norm2
(
const
ColumnVector
&
x
);
double
norm2
(
double
a
,
double
b
,
double
c
);
float
norm2
(
float
a
,
float
b
,
float
c
);
int
Identity
(
Matrix
&
m
);
ReturnMatrix
Identity
(
int
num
);
...
...
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