Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
BornAgain
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
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mlz
BornAgain
Commits
85f82355
Commit
85f82355
authored
11 years ago
by
Pospelov, Gennady
Browse files
Options
Downloads
Patches
Plain Diff
Commented rounding in OutputDataReadStrategy
parent
f9175437
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
Core/Tools/src/OutputDataReadStrategy.cpp
+5
-4
5 additions, 4 deletions
Core/Tools/src/OutputDataReadStrategy.cpp
Core/Tools/src/Utils.cpp
+1
-0
1 addition, 0 deletions
Core/Tools/src/Utils.cpp
with
6 additions
and
4 deletions
Core/Tools/src/OutputDataReadStrategy.cpp
+
5
−
4
View file @
85f82355
...
@@ -67,8 +67,9 @@ OutputData<double > *OutputDataReadStreamIMA::readOutputData(std::istream &input
...
@@ -67,8 +67,9 @@ OutputData<double > *OutputDataReadStreamIMA::readOutputData(std::istream &input
while
(
std
::
getline
(
input_stream
,
sline
))
while
(
std
::
getline
(
input_stream
,
sline
))
{
{
std
::
string
str
=
Utils
::
String
::
round_doubles
(
sline
,
10
);
//std::string str = Utils::String::round_doubles(sline, 10);
vdouble1d_t
buff
=
Utils
::
String
::
parse_doubles
(
str
);
//vdouble1d_t buff = Utils::String::parse_doubles(str);
vdouble1d_t
buff
=
Utils
::
String
::
parse_doubles
(
sline
);
buff_2d
.
push_back
(
buff
);
buff_2d
.
push_back
(
buff
);
}
}
...
@@ -123,8 +124,8 @@ OutputData<double > *OutputDataReadStreamV1::readOutputData(std::istream &input_
...
@@ -123,8 +124,8 @@ OutputData<double > *OutputDataReadStreamV1::readOutputData(std::istream &input_
while
(
std
::
getline
(
input_stream
,
sline
)
)
while
(
std
::
getline
(
input_stream
,
sline
)
)
{
{
if
(
sline
[
0
]
==
'#'
)
continue
;
if
(
sline
[
0
]
==
'#'
)
continue
;
std
::
string
str
=
Utils
::
String
::
round_doubles
(
sline
,
10
);
//
std::string str = Utils::String::round_doubles(sline, 10);
vdouble1d_t
buff
=
Utils
::
String
::
parse_doubles
(
s
tr
);
vdouble1d_t
buff
=
Utils
::
String
::
parse_doubles
(
s
line
);
if
(
buff_xaxis
.
empty
()
)
{
if
(
buff_xaxis
.
empty
()
)
{
buff_xaxis
=
buff
;
buff_xaxis
=
buff
;
...
...
This diff is collapsed.
Click to expand it.
Core/Tools/src/Utils.cpp
+
1
−
0
View file @
85f82355
...
@@ -41,6 +41,7 @@ vdouble1d_t Utils::String::parse_doubles(const std::string& str)
...
@@ -41,6 +41,7 @@ vdouble1d_t Utils::String::parse_doubles(const std::string& str)
if
(
buff_1d
.
empty
()
)
{
if
(
buff_1d
.
empty
()
)
{
std
::
cout
<<
"OutputDataReadFileASCII::parse_doubles() -> "
std
::
cout
<<
"OutputDataReadFileASCII::parse_doubles() -> "
"Warning! No parsed values in 1d vector of doubles."
<<
std
::
endl
;
"Warning! No parsed values in 1d vector of doubles."
<<
std
::
endl
;
std
::
cout
<<
"Line '"
<<
str
<<
"'"
<<
std
::
endl
;
}
}
return
buff_1d
;
return
buff_1d
;
}
}
...
...
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