File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
pomdp_py/representations/distribution Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,14 @@ cdef class WeightedParticles(GenerativeDistribution):
53
53
def frozen (self ):
54
54
return self ._frozen
55
55
56
+ @property
57
+ def hist (self ):
58
+ return self ._hist
59
+
60
+ @property
61
+ def hist_valid (self ):
62
+ return self ._hist_valid
63
+
56
64
def add (self , particle ):
57
65
""" add(self, particle)
58
66
particle: (value, weight) tuple"""
@@ -77,7 +85,7 @@ cdef class WeightedParticles(GenerativeDistribution):
77
85
78
86
def __eq__ (self , other ):
79
87
if isinstance (other, WeightedParticles):
80
- return self ._hist == other._hist
88
+ return self ._hist == other.hist
81
89
return False
82
90
83
91
def __getitem__ (self , value ):
@@ -161,7 +169,7 @@ cdef class WeightedParticles(GenerativeDistribution):
161
169
Returns a new set of weighted particles with unique values
162
170
and weights aggregated (taken average).
163
171
"""
164
- return WeightedParticles.from_histogram(self .get_histogram())
172
+ return WeightedParticles.from_histogram(self .get_histogram(), frozen = self ._frozen )
165
173
166
174
167
175
cdef class Particles(WeightedParticles):
You can’t perform that action at this time.
0 commit comments