Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F75426019
measurement.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Fri, Aug 2, 05:14
Size
955 B
Mime Type
text/x-c
Expires
Sun, Aug 4, 05:14 (2 d)
Engine
blob
Format
Raw Data
Handle
19538580
Attached To
R9868 DeepHealth_UC13_seizure_detection
measurement.cpp
View Options
#include <vector>
#include <string>
#include <fstream>
#include <sstream>
#include "measurement.h"
Measurement
::
Measurement
(
std
::
ifstream
&
info_file
,
std
::
ifstream
&
label_file
,
std
::
ifstream
&
signal_file
)
{
info_file
>>
patient
;
info_file
>>
id
;
label_file
>>
label
;
std
::
string
line
;
getline
(
signal_file
,
line
);
std
::
stringstream
line_stream
(
line
);
double
val
;
while
(
line_stream
>>
val
)
{
signal
.
push_back
(
val
);
line_stream
.
get
();
}
}
bool
Measurement
::
operator
<
(
const
Measurement
&
d
)
const
{
if
(
patient
.
compare
(
d
.
patient
)
<
0
)
return
true
;
else
if
(
patient
.
compare
(
d
.
patient
)
==
0
)
{
if
(
id
.
compare
(
d
.
id
)
<
0
)
return
true
;
else
if
(
id
==
d
.
id
)
{
if
(
label
<
d
.
label
)
return
true
;
}
}
return
false
;
}
bool
compare_ptr_Measurement
(
Measurement
*
p1
,
Measurement
*
p2
)
{
return
*
p1
<*
p2
;
}
Event Timeline
Log In to Comment