Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
utils
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
utils
Commits
0a339713
Commit
0a339713
authored
22 years ago
by
Mark Woolrich
Browse files
Options
Downloads
Patches
Plain Diff
*** empty log message ***
parent
f56b83cd
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Log.h
+12
-9
12 additions, 9 deletions
Log.h
with
12 additions
and
9 deletions
Log.h
+
12
−
9
View file @
0a339713
...
...
@@ -6,6 +6,9 @@
/* CCOPYRIGHT */
#if !defined(Log_h)
#define Log_h
#include
<iostream>
#include
<fstream>
#include
<string>
...
...
@@ -13,10 +16,10 @@
#include
"newmatio.h"
using
namespace
NEWMAT
;
namespace
Utilities
{
#if !defined(Log_h)
#define Log_h
template
<
class
t
>
string
tostring
(
const
t
obj
);
class
Log
{
...
...
@@ -28,18 +31,18 @@ namespace Utilities{
keeps adding "+" to pdirname until unique directory is made: */
void
makeDir
(
const
string
&
pdirname
,
const
string
&
plogfilename
=
"logfile"
);
/** Sets an existing directory to place results into: */
/** Sets an existing directory to place results into: */
void
setDir
(
const
string
&
pdirname
,
const
string
&
plogfilename
=
"logfile"
);
const
string
&
getDir
()
const
{
return
dir
;
}
const
string
&
getLogFileName
()
const
{
return
logfilename
;
}
const
string
append
FileName
(
const
string
&
filename
)
const
{
return
dir
+
"/"
+
filename
;}
const
string
append
Dir
(
const
string
&
filename
)
const
{
return
dir
+
"/"
+
filename
;}
void
out
(
const
string
&
p_fname
,
const
Matrix
&
p_mat
);
void
out
(
const
string
&
p_fname
,
const
RowVector
&
p_mat
);
void
out
(
const
string
&
p_fname
,
const
ColumnVector
&
p_mat
);
static
int
counter
()
{
return
count
++
;
}
ofstream
&
str
();
private
:
...
...
@@ -52,6 +55,7 @@ namespace Utilities{
string
dir
;
ofstream
logfileout
;
string
logfilename
;
static
int
count
;
bool
logEstablished
;
};
...
...
@@ -139,9 +143,8 @@ namespace Utilities{
return
logfileout
;
}
#endif
}
#endif
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