summaryrefslogtreecommitdiffstats
path: root/src/frontier/mean.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/frontier/mean.rs')
-rw-r--r--src/frontier/mean.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/frontier/mean.rs b/src/frontier/mean.rs
index 889c5ba..6a32b97 100644
--- a/src/frontier/mean.rs
+++ b/src/frontier/mean.rs
@@ -129,6 +129,10 @@ impl<C: ColorSpace> Frontier for MeanFrontier<C> {
self.len - self.deleted
}
+ fn is_empty(&self) -> bool {
+ self.len() == 0
+ }
+
fn place(&mut self, rgb8: Rgb8) -> Option<(u32, u32)> {
let color = C::from(rgb8);
let (x, y) = self.forest.nearest(&color).map(|n| n.item.pos)?;