20 #ifndef PT_DIRECTION_PRIOR_H_
21 #define PT_DIRECTION_PRIOR_H_
25 #include <gp_cpp/gp_prior.h>
36 typedef gp::Prior<gp::Zero, gp::Squared_exponential> Gpp;
46 gp::Inputs::const_iterator(),
47 gp::Inputs::const_iterator()),
50 if(m_local_sz % 2 == 0)
68 gp::Inputs::const_iterator(),
69 gp::Inputs::const_iterator()),
72 if(m_local_sz % 2 == 0)
96 double scale()
const {
return gpsc_; }
103 double get_mean(
const Target& target,
size_t t)
const
107 assert(sf != -1 && ef != -1);
108 assert(t >= sf && t <= ef);
123 double mn = target.
trajectory()[t - 1]->value.body_dir;
130 mutable Gpp local_dist_;
140 typedef gp::Prior<gp::Zero, gp::Squared_exponential> Gpp;
150 gp::Inputs::const_iterator(),
151 gp::Inputs::const_iterator()),
154 if(m_local_sz % 2 == 0)
172 gp::Inputs::const_iterator(),
173 gp::Inputs::const_iterator()),
176 if(m_local_sz % 2 == 0)
194 double local(
const Target& target,
size_t t)
const;
200 double scale()
const {
return gpsc_; }
207 double get_mean(
const Target& target,
size_t t)
const
209 return target.
trajectory()[t - 1]->value.body_dir;
214 mutable Gpp local_dist_;
Class that represents the prior distribution of a trajectory.
Definition: pt_direction_prior.h:33
int get_end_time() const
Gets end time of track.
Definition: mcmcda_track.h:102
Trajectory & trajectory() const
Get this target's current 3D positions.
Definition: pt_target.h:85
Class that represents the prior distribution of the face direction.
Definition: pt_direction_prior.h:137
Class that represents a full scene in the PT universe.
Definition: pt_scene.h:40
size_t local_size() const
Return the local window size.
Definition: pt_direction_prior.h:197
int get_start_time() const
Gets start time of track.
Definition: mcmcda_track.h:93
double at_trajectory(const Target &target) const
Evaluate this prior on the given trajectory.
Definition: pt_direction_prior.cpp:56
Direction_prior(double sc, double sv, size_t local_sz)
Construct a prior.
Definition: pt_direction_prior.h:40
Face_direction_prior(double sc, double sv)
Construct a prior.
Definition: pt_direction_prior.h:166
double local(const Target &target, size_t t) const
Approximate this prior around a frame.
Definition: pt_direction_prior.cpp:169
double operator()(const Scene &scene) const
Evaluate this prior on the given scene.
Definition: pt_direction_prior.cpp:130
double signal_variance() const
Return the GP signal variance.
Definition: pt_direction_prior.h:99
double scale() const
Return the GP scale.
Definition: pt_direction_prior.h:96
Class that represents a target moving through space.
Definition: pt_target.h:50
Direction_prior(double sc, double sv)
Construct a prior.
Definition: pt_direction_prior.h:62
double local(const Target &target, size_t t) const
Approximate this prior around a frame.
Definition: pt_direction_prior.cpp:77
double scale() const
Return the GP scale.
Definition: pt_direction_prior.h:200
Face_direction_prior(double sc, double sv, size_t local_sz)
Construct a prior.
Definition: pt_direction_prior.h:144
size_t local_size() const
Return the local window size.
Definition: pt_direction_prior.h:93
double operator()(const Scene &scene) const
Evaluate this prior on the given scene.
Definition: pt_direction_prior.cpp:43
double at_trajectory(const Target &target) const
Evaluate this prior on the given trajectory.
Definition: pt_direction_prior.cpp:143
double signal_variance() const
Return the GP signal variance.
Definition: pt_direction_prior.h:203