Thought about it for 2 minutes and found an ok solution : very close to something working for this 2nd strategy that feels a lot better
This commit is contained in:
parent
4ef577e76b
commit
93781cae4a
@ -132,13 +132,19 @@ impl SpaceColonization {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if let Some(node) = closest_node {
|
if let Some(node) = closest_node {
|
||||||
let attractors = match growing_paths.get_mut(node) {
|
if let Some(attractors) = growing_paths.get_mut(node) {
|
||||||
Some(a) => a.take(),
|
attractors.push(a);
|
||||||
None => Vec::new(),
|
} else {
|
||||||
};
|
let mut attractors = Vec::new();
|
||||||
|
attractors.push(a);
|
||||||
|
growing_paths.insert(node, attractors);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console::log_1(&format!("found {} pairs ", growing_paths.len()).into());
|
console::log_1(&format!("found {:?} pairs ", growing_paths).into());
|
||||||
|
for node in growing_paths {
|
||||||
|
todo!("calculate new node position averaging all attractors");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user