Main Page
Namespaces
Classes
Files
File List
File Members
libism
ISM
common_type
Track.hpp
Go to the documentation of this file.
1
18
#pragma once
19
20
#include <string>
21
#include <vector>
22
#include <boost/shared_ptr.hpp>
23
#include "
Object.hpp
"
24
25
namespace
ISM
{
26
30
struct
Track
{
31
std::string
type
;
32
std::string
observedId
;
33
std::vector<ObjectPtr>
objects
;
34
double
weight
;
35
36
Track
(std::string type =
""
, std::string observedId =
""
) : type(type), observedId(observedId), weight(1.0) {}
37
Track
(
const
Track
& other): type(other.type), observedId(other.observedId), weight(other.weight)
38
{
39
for
(
auto
& objIt : other.
objects
)
40
{
41
if
(objIt != 0)
42
{
43
this->objects.push_back(
ObjectPtr
(
new
Object
(*objIt)));
44
}
45
else
46
{
47
//Unitialized shared_ptr on purpose. It represents timesteps in which the object wasnt present
48
this->objects.push_back(
ObjectPtr
());
49
}
50
}
51
}
52
void
calculateWeight
();
53
};
54
55
typedef
boost::shared_ptr<Track>
TrackPtr
;
56
57
std::ostream&
operator<<
(std::ostream &strm,
const
ISM::Track
&o);
58
59
std::ostream&
operator<<
(std::ostream &strm,
const
ISM::TrackPtr
&o);
60
}
Object.hpp
ISM::Object
Definition:
Object.hpp:33
ISM::Track::weight
double weight
Definition:
Track.hpp:34
ISM::Track::type
std::string type
Definition:
Track.hpp:31
ISM::operator<<
std::ostream & operator<<(std::ostream &strm, const ISM::ObjectRelation &r)
Definition:
ObjectRelation.cpp:167
ISM::Track::observedId
std::string observedId
Definition:
Track.hpp:32
ISM::Track::Track
Track(std::string type="", std::string observedId="")
Definition:
Track.hpp:36
ISM::Track::Track
Track(const Track &other)
Definition:
Track.hpp:37
ISM::Track
Definition:
Track.hpp:30
ISM::Track::calculateWeight
void calculateWeight()
Definition:
Track.cpp:22
ISM::TrackPtr
boost::shared_ptr< Track > TrackPtr
Definition:
Track.hpp:55
ISM
this namespace contains all generally usable classes.
Definition:
AcceptanceFunction.hpp:22
ISM::Track::objects
std::vector< ObjectPtr > objects
Definition:
Track.hpp:33
ISM::ObjectPtr
boost::shared_ptr< Object > ObjectPtr
Definition:
Object.hpp:82
asr_lib_ism
Author(s): Hanselmann Fabian, Heller Florian, Heizmann Heinrich, Kübler Marcel, Mehlhaus Jonas, Meißner Pascal, Qattan Mohamad, Reckling Reno, Stroh Daniel
autogenerated on Wed Jan 8 2020 04:02:41