no target map -> false

This commit is contained in:
Alwin Berger 2022-02-10 14:41:04 +01:00
parent 64dfd6a642
commit 2c3e1a4e4d

View File

@ -177,7 +177,7 @@ where
{
let observer = _observers.match_name::<HitcountsMapObserver<VariableMapObserver<u8>>>("edges")
.expect("HitcountsMapObserver not found");
if self.target_map.len() == 0 { return Ok(true) };
if self.target_map.len() == 0 { return Ok(false) };
let mut sum_of_square_difference : u64 = 0; // does not include found edges not in target
for (edg, val) in &self.target_map {
@ -305,7 +305,7 @@ where
{
let observer = _observers.match_name::<HitcountsMapObserver<VariableMapObserver<u8>>>("edges")
.expect("HitcountsMapObserver not found");
if self.target_map.len() == 0 { return Ok(true) };
if self.target_map.len() == 0 { return Ok(false) };
let mut sum_of_square_difference : u64 = 0; // does not include found edges not in target
for (edg, val) in &self.target_map {