pub fn sub_state_projection(&self, path: &SPPath) -> StateProjection {
        let s: Vec<(&SPPath, &StateValue)> = self
            .index
            .iter()
            .filter(|(key, _)| key.is_child_of(path))
            .map(|(key, i)| (key, &self.values[*i]))
            .collect();

        StateProjection {
            state: s,
            id: self.id,
        }
    }
/// Returns a projection of the sub part of the state where the variables are children to the path
/// TODO: Maybe move this to struct StateProjection
///
/// ["a", "b"] is a child of ["a"]
///
Returns a projection of the sub part of the state where the variables are children to the path
TODO: Maybe move this to struct StateProjection


Returns a projection of the sub part of the state where the variables are children to the path TODO : Maybe move this to struct StateProjection
pub fn sub_state_projection(&self, path: &SPPath) -> StateProjection {
        let s: Vec<(&SPPath, &StateValue)> = self
            .index
            .iter()
            .filter(|(key, _)| key.is_child_of(path))
            .map(|(key, i)| (key, &self.values[*i]))
            .collect();
        StateProjection {
            state: s,
            id: self.id,
        }
    }
pub fn sub_state_projection ( & self , path : & SPPath ) -> StateProjection { let s : Vec < ( & SPPath , & StateValue ) > = self . index . iter ( ) . filter ( | ( key , _ ) | key . is_child_of ( path ) ) . map ( | ( key , i ) | ( key , & self . values [ * i ] ) ) . collect ( ) ; StateProjection { state : s , id : self . id , } }
Returns a projection of the sub part of the state where the variables are children to the path
TODO: Maybe move this to struct StateProjection
Returns a projection of the sub part of the state where the variables are children to the path TODO : Maybe move this to struct StateProjection
&self
path
&SPPath