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
ec25734a
Commit
ec25734a
authored
19 years ago
by
Mark Jenkinson
Browse files
Options
Downloads
Patches
Plain Diff
Put definition of size function in cc file where it belongs
parent
753e30c6
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
miscmaths.cc
+9
-0
9 additions, 0 deletions
miscmaths.cc
miscmaths.h
+1
-7
1 addition, 7 deletions
miscmaths.h
with
10 additions
and
7 deletions
miscmaths.cc
+
9
−
0
View file @
ec25734a
...
...
@@ -28,6 +28,15 @@ namespace MISCMATHS {
using
std
::
atan2
;
string
size
(
const
Matrix
&
mat
)
{
string
str
=
num2str
(
mat
.
Nrows
())
+
"*"
+
num2str
(
mat
.
Ncols
());
return
str
;
}
float
Sinc
(
const
float
x
)
{
if
(
fabs
(
x
)
<
1e-9
)
{
return
1
-
x
*
x
*
M_PI
*
M_PI
/
6.0
;
...
...
This diff is collapsed.
Click to expand it.
miscmaths.h
+
1
−
7
View file @
ec25734a
...
...
@@ -41,13 +41,7 @@ namespace MISCMATHS {
// IO/string stuff
template
<
class
T
>
string
num2str
(
T
n
,
int
width
=-
1
);
string
size
(
const
Matrix
&
mat
)
{
string
str
=
num2str
(
mat
.
Nrows
())
+
"*"
+
num2str
(
mat
.
Ncols
());
return
str
;
}
string
size
(
const
Matrix
&
mat
);
bool
isnum
(
const
string
&
str
);
ReturnMatrix
read_ascii_matrix
(
const
string
&
filename
,
int
nrows
,
int
ncols
);
ReturnMatrix
read_ascii_matrix
(
int
nrows
,
int
ncols
,
const
string
&
filename
);
...
...
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