Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
CTA-LAPP
PHOENIX_LIBS
PhoenixMath
Commits
ef2c811b
Commit
ef2c811b
authored
Dec 20, 2020
by
Pierre Aubert
Browse files
Add test
parent
64d393de
Pipeline
#96653
passed with stages
in 48 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
src/PHistogram/PHistogram_impl.h
src/PHistogram/PHistogram_impl.h
+3
-3
No files found.
src/PHistogram/PHistogram_impl.h
View file @
ef2c811b
...
...
@@ -119,7 +119,7 @@ void PHistogram<T>::addValue(T value){
*/
template
<
typename
T
>
void
PHistogram
<
T
>::
addValue
(
const
T
*
tabValue
,
size_t
nbValues
){
if
(
p_nbValue
!
=
nbValues
||
p_value
==
NULL
||
tabValue
==
NULL
||
nbValues
==
0lu
)
return
;
if
(
p_nbValue
=
=
0lu
||
p_value
==
NULL
||
tabValue
==
NULL
||
nbValues
==
0lu
)
return
;
for
(
size_t
i
(
0lu
);
i
<
nbValues
;
++
i
){
addValue
(
tabValue
[
i
]);
}
...
...
@@ -131,7 +131,7 @@ void PHistogram<T>::addValue(const T * tabValue, size_t nbValues){
*/
template
<
typename
T
>
void
PHistogram
<
T
>::
setValueRange
(
const
T
*
tabValue
,
size_t
nbValues
){
if
(
p_nbValue
!
=
nbValues
||
p_value
==
NULL
||
tabValue
==
NULL
||
nbValues
==
0lu
)
return
;
if
(
p_nbValue
=
=
0lu
||
p_value
==
NULL
||
tabValue
==
NULL
||
nbValues
==
0lu
)
return
;
pminmaxTab
(
p_xMin
,
p_xMax
,
tabValue
,
nbValues
);
setRange
(
p_xMin
,
p_xMax
);
reset
();
...
...
@@ -151,7 +151,7 @@ void PHistogram<T>::addAmplitude(T value, T amplitude){
return
;
}
size_t
pos
(((
value
-
p_xMin
)
*
((
double
)
p_nbValue
))
/
p_xRange
);
if
(
pos
>=
p_nbValue
)
return
;
if
(
pos
>=
p_nbValue
)
{
return
;
}
p_value
[
pos
]
+=
amplitude
;
++
p_nbTirIn
;
}
...
...
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