1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
use ndarray::*;

use std::collections::HashMap;
use crate::type_id::*;
use crate::feature_space_info::*;
use crate::function_space_info::*;
use topological_sort::TopologicalSort;

///A directory of `FeatureSpaceInfo`s, indexed by [`TypeId`].
pub struct SpaceInfoDirectory {
    pub feature_spaces : Vec<FeatureSpaceInfo>
}

impl SpaceInfoDirectory {
    ///Gets the [`FeatureSpaceInfo`] for the given [`TypeId`].
    pub fn get_feature_space_info(&self, type_id : TypeId) -> &FeatureSpaceInfo {
        &self.feature_spaces[type_id]
    }
}