#[derive(Clone, Copy, Debug, PartialEq)]
pub struct PathCacheConfig {
pub chunk_size: usize,
pub cache_paths: bool,
pub keep_insertions: bool,
pub use_nearby_nodes_for_search: bool,
pub a_star_fallback: bool,
pub perfect_paths: bool,
}
impl PathCacheConfig {
pub const LOW_MEM: PathCacheConfig = PathCacheConfig {
chunk_size: 16,
cache_paths: false,
keep_insertions: false,
use_nearby_nodes_for_search: true,
a_star_fallback: true,
perfect_paths: false,
};
pub const HIGH_PERFORMANCE: PathCacheConfig = PathCacheConfig {
chunk_size: 8,
cache_paths: true,
keep_insertions: true,
use_nearby_nodes_for_search: true,
a_star_fallback: false,
perfect_paths: false,
};
}
impl Default for PathCacheConfig {
fn default() -> PathCacheConfig {
PathCacheConfig {
chunk_size: 8,
cache_paths: true,
keep_insertions: true,
use_nearby_nodes_for_search: true,
a_star_fallback: true,
perfect_paths: false,
}
}
}