pub fn filter_state(&self, state: SPState) -> SPState {
        // Planning index
        let mut to_keep = vec![SPPath::from_slice(&["runner", "plans", "1"])];
        // We want to keep any paths contained in our formal model.
        to_keep.extend(self.model.get_state_paths());
        // As well as the state of any operations in the model.
        to_keep.extend(self.operations.iter().map(|o|o.path().clone()).collect::<Vec<_>>());
        // As well as the state of any intentions in the model.
        to_keep.extend(self.intentions.iter().map(|o|o.path().clone()).collect::<Vec<_>>());
        state.filter_by_paths(&to_keep)
    }
/// Only keep parts of the state that are relevant to this planner.
/// This will later be moved to a callback to the threaded runner so we
/// can be notified upon change from there instead of busy waiting.
Only keep parts of the state that are relevant to this planner.
This will later be moved to a callback to the threaded runner so we
can be notified upon change from there instead of busy waiting.
Only keep parts of the state that are relevant to this planner . This will later be moved to a callback to the threaded runner so we can be notified upon change from there instead of busy waiting .
pub fn filter_state(&self, state: SPState) -> SPState {
        // Planning index
        let mut to_keep = vec![SPPath::from_slice(&["runner", "plans", "1"])];
        // We want to keep any paths contained in our formal model.
        to_keep.extend(self.model.get_state_paths());
        // As well as the state of any operations in the model.
        to_keep.extend(self.operations.iter().map(|o|o.path().clone()).collect::<Vec<_>>());
        // As well as the state of any intentions in the model.
        to_keep.extend(self.intentions.iter().map(|o|o.path().clone()).collect::<Vec<_>>());
        state.filter_by_paths(&to_keep)
    }
pub fn filter_state ( & self , state : SPState ) -> SPState { // Planning index let mut to_keep = vec ! [ SPPath from_slice ( [ " " " " " " ] ) ] ; // We want to keep any paths contained in our formal model. to_keep . extend ( self . model . get_state_paths ( ) ) ; // As well as the state of any operations in the model. to_keep . extend ( self . operations . iter ( ) . map ( | o | o . path ( ) . clone ( ) ) . collect :: < Vec < _ > > ( ) ) ; // As well as the state of any intentions in the model. to_keep . extend ( self . intentions . iter ( ) . map ( | o | o . path ( ) . clone ( ) ) . collect :: < Vec < _ > > ( ) ) ; state . filter_by_paths ( & to_keep ) }
Only keep parts of the state that are relevant to this planner.
Only keep parts of the state that are relevant to this planner .
&self
state
SPState