pub fn from_graph<G: crate::SizedGraph<T>>(g: G) -> HashGraph<T> {
		let mut subject_map = HashMap::new();
		for (subject, predicates) in g.into_subjects() {
			let mut predicate_map = HashMap::new();
			for (predicate, objects) in predicates {
				predicate_map.insert(predicate, objects.collect());
			}

			subject_map.insert(subject, predicate_map);
		}

		HashGraph { table: subject_map }
	}
/// Create a new `HashGraph` from another graph by consuming its triples.
Create a new `HashGraph` from another graph by consuming its triples.
Create a new ` HashGraph ` from another graph by consuming its triples .
pub fn from_graph<G: crate::SizedGraph<T>>(g: G) -> HashGraph<T> {
		let mut subject_map = HashMap::new();
		for (subject, predicates) in g.into_subjects() {
			let mut predicate_map = HashMap::new();
			for (predicate, objects) in predicates {
				predicate_map.insert(predicate, objects.collect());
			}
			subject_map.insert(subject, predicate_map);
		}
		HashGraph { table: subject_map }
	}
pub fn from_graph < G : crate :: SizedGraph < T > > ( g : G ) -> HashGraph < T > { let mut subject_map = HashMap :: new ( ) ; for ( subject , predicates ) in g . into_subjects ( ) { let mut predicate_map = HashMap :: new ( ) ; for ( predicate , objects ) in predicates { predicate_map . insert ( predicate , objects . collect ( ) ) ; } subject_map . insert ( subject , predicate_map ) ; } HashGraph { table : subject_map } }
Create a new `HashGraph` from another graph by consuming its triples.
Create a new ` HashGraph ` from another graph by consuming its triples .
g
G
g
G