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
452118a7
Commit
452118a7
authored
Dec 20, 2020
by
Pierre Aubert
Browse files
Add branch test
parent
2b706e8a
Pipeline
#96670
passed with stages
in 1 minute and 10 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
TESTS/TEST_PHISTOGRAM/main.cpp
TESTS/TEST_PHISTOGRAM/main.cpp
+8
-3
src/PHistogram/PHistogram_impl.h
src/PHistogram/PHistogram_impl.h
+0
-2
No files found.
TESTS/TEST_PHISTOGRAM/main.cpp
View file @
452118a7
...
...
@@ -38,9 +38,6 @@ bool testPHistogram(){
}
std
::
cout
<<
hist4
<<
std
::
endl
;
PHistogram
<
float
>
emptyHist
;
std
::
cout
<<
emptyHist
<<
std
::
endl
;
PHistogram
<
float
>
singleValueHist
(
1lu
);
std
::
cout
<<
singleValueHist
<<
std
::
endl
;
...
...
@@ -70,6 +67,14 @@ bool testPHistogram2(){
}
std
::
cout
<<
hist4
<<
std
::
endl
;
PHistogram
<
float
>
emptyHist
;
std
::
cout
<<
emptyHist
<<
std
::
endl
;
emptyHist
.
addValue
(
42.0
f
);
emptyHist
.
addAmplitude
(
3.0
f
,
4.0
f
);
emptyHist
.
setValueRange
(
tabValue
,
14lu
);
emptyHist
.
addValue
(
tabValue
,
14lu
);
return
b
;
}
...
...
src/PHistogram/PHistogram_impl.h
View file @
452118a7
...
...
@@ -108,7 +108,6 @@ void PHistogram<T>::addValue(T value){
return
;
}
size_t
pos
(((
value
-
p_xMin
)
*
((
double
)
p_nbValue
))
/
p_xRange
);
if
(
pos
>=
p_nbValue
)
return
;
p_value
[
pos
]
++
;
++
p_nbTirIn
;
}
...
...
@@ -151,7 +150,6 @@ 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
;}
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