-
Notifications
You must be signed in to change notification settings - Fork 2
/
TrackGroupDistn.m
43 lines (31 loc) · 1.08 KB
/
TrackGroupDistn.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
classdef TrackGroupDistn < handle
%TRACKGROUPDISTN A track cluster particle distribution.
properties
particles % Cell array of TrackSet objects
weight % Particle weights
members % Array indicating which targets are represented by this cluster
end
methods
% Constructor
function obj = TrackGroupDistn(members, particles, weights)
obj.particles = particles;
obj.members = members;
if nargin == 2
N = length(particles);
obj.weight = ones(N, 1)/N;
elseif nargin == 3
obj.weight = weights;
else
assert(false);
end
end
% Copy
function new = Copy(obj)
p = cell(size(obj.particles));
for k = 1:length(p)
p{k} = obj.particles{k}.Copy;
end
new = TrackGroupDistn(obj.members, p, obj.weight);
end
end
end