pub struct MotionPlanner<'a> { /* private fields */ }Expand description
Motion planning algorithm for finding optimal paths in the Tonnetz
Implementations§
Source§impl<'a> MotionPlanner<'a>
impl<'a> MotionPlanner<'a>
Sourcepub fn set_max_depth(&mut self, depth: usize)
pub fn set_max_depth(&mut self, depth: usize)
Set the maximum search depth
Sourcepub fn set_max_paths(&mut self, paths: usize)
pub fn set_max_paths(&mut self, paths: usize)
Set the maximum number of paths to find
Sourcepub fn with_max_depth(self, depth: usize) -> Self
pub fn with_max_depth(self, depth: usize) -> Self
consumes the current instance to create another with the given maximum depth
Sourcepub fn with_max_paths(self, paths: usize) -> Self
pub fn with_max_paths(self, paths: usize) -> Self
consumes the current instance to create another with the given maximum number of paths
Sourcepub fn find_paths_to_pitch(
&mut self,
start_edge: EdgeId,
target_pitch: usize,
) -> Vec<Path>
pub fn find_paths_to_pitch( &mut self, start_edge: EdgeId, target_pitch: usize, ) -> Vec<Path>
find a set of paths from one triad to one that contains the target pitch
Sourcepub fn find_paths_between_edges(
&mut self,
start_edge: EdgeId,
goal_edge: EdgeId,
) -> Vec<Path>
pub fn find_paths_between_edges( &mut self, start_edge: EdgeId, goal_edge: EdgeId, ) -> Vec<Path>
Search for paths between two specific edges in the tonnetz
Sourcepub fn search_from(
&self,
start_triad: Triad,
target_pitch: usize,
transforms: Vec<LPR>,
triads: Vec<Triad>,
edge_ids: Vec<Option<EdgeId>>,
max_paths: usize,
remaining_depth: usize,
) -> Vec<Path>
pub fn search_from( &self, start_triad: Triad, target_pitch: usize, transforms: Vec<LPR>, triads: Vec<Triad>, edge_ids: Vec<Option<EdgeId>>, max_paths: usize, remaining_depth: usize, ) -> Vec<Path>
Find paths from a specified edge by continuing search from a given state Used for parallel search implementations
Auto Trait Implementations§
impl<'a> Freeze for MotionPlanner<'a>
impl<'a> RefUnwindSafe for MotionPlanner<'a>
impl<'a> Send for MotionPlanner<'a>
impl<'a> Sync for MotionPlanner<'a>
impl<'a> Unpin for MotionPlanner<'a>
impl<'a> UnwindSafe for MotionPlanner<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more