Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
alta
alta
Commits
95b131b4
Commit
95b131b4
authored
Mar 12, 2014
by
Laurent Belcour
Browse files
Adding real code for --data-positive option
parent
3122609b
Changes
2
Hide whitespace changes
Inline
Side-by-side
documents/contacts.dox
View file @
95b131b4
...
...
@@ -5,7 +5,7 @@ Here are the names, affiliations, and mails of people involved in ALTA. Please
do not hesitate to share your experience of using this library, bug reports,
or feature requests.<br />
<ul>
<li><a href="mailto:laurent.belcour@
inria.fr
">Laurent Belcour</a>, Inria</li>
<li><a href="mailto:laurent.belcour@
gmail.com
">Laurent Belcour</a>, Inria</li>
<li><a href="mailto:romain.pacanowski@inria.fr">Romain Pacanowski</a>, CNRS</li>
<li><a href="mailto:xavier.granier@inria.fr">Xavier Granier</a>, LP2N</li>
<li><a href="mailto:pascal.barla@inria.fr">Pascal Barla</a>, Inria</li>
...
...
sources/core/vertical_segment.cpp
View file @
95b131b4
...
...
@@ -172,6 +172,17 @@ void vertical_segment::load(const std::string& filename, const arguments& args)
v
[
dimX
()
+
dimY
()
+
i
]
=
v
[
dimX
()
+
i
]
+
min_dt
;
v
[
dimX
()
+
2
*
dimY
()
+
i
]
=
v
[
dimX
()
+
i
]
+
max_dt
;
}
// You can enforce the vertical segment to stay in the positive
// region using the --data-positive command line argument. Note
// that the data point is also clamped to zero if negative.
if
(
args
.
is_defined
(
"data-positive"
))
{
v
[
dimX
()
+
i
]
=
std
::
max
(
v
[
dimX
()
+
i
],
0.0
);
v
[
dimX
()
+
dimY
()
+
i
]
=
std
::
max
(
v
[
dimX
()
+
dimY
()
+
i
],
0.0
);
v
[
dimX
()
+
2
*
dimY
()
+
i
]
=
std
::
max
(
v
[
dimX
()
+
2
*
dimY
()
+
i
],
0.0
);
}
#ifdef DEBUG
std
::
cout
<<
"<<DEBUG>> vs = ["
<<
v
[
dimX
()
+
dimY
()
+
i
]
<<
", "
<<
v
[
dimX
()
+
2
*
dimY
()
+
i
]
<<
"]"
<<
std
::
endl
;
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment