pub struct Grapher {
faith_graph_complete: HashMap<u32, BTreeMap<i16, u32>>,
culture_graph_complete: HashMap<u32, BTreeMap<i16, u32>>,
total_deaths: BTreeMap<i16, u32>,
}
Expand description
An object that can create graphs from the game state
Fields§
§faith_graph_complete: HashMap<u32, BTreeMap<i16, u32>>
Stored graph data for all faiths, certainly less memory efficient but the speed is worth it
culture_graph_complete: HashMap<u32, BTreeMap<i16, u32>>
§total_deaths: BTreeMap<i16, u32>
Implementations§
Source§impl Grapher
impl Grapher
pub fn new( faith_death_data: HashMap<u32, BTreeMap<i16, u32>>, culture_death_data: HashMap<u32, BTreeMap<i16, u32>>, total_deaths: BTreeMap<i16, u32>, ) -> Self
Sourcepub fn create_tree_graph<I: IntoIterator<Item = Shared<GameObjectEntity<T>>>, T: TreeNode<I> + GameObjectDerived + FromGameObject, P: AsRef<Path>>(
&self,
start: Shared<GameObjectEntity<T>>,
reverse: bool,
output_path: &P,
)
pub fn create_tree_graph<I: IntoIterator<Item = Shared<GameObjectEntity<T>>>, T: TreeNode<I> + GameObjectDerived + FromGameObject, P: AsRef<Path>>( &self, start: Shared<GameObjectEntity<T>>, reverse: bool, output_path: &P, )
Creates a tree graph from a given node The reverse parameter determines if the tree is drawn from the parent to the children or the other way around
Sourcepub fn create_dynasty_graph<P: AsRef<Path>>(
&self,
dynasty: &Dynasty,
output_path: &P,
)
pub fn create_dynasty_graph<P: AsRef<Path>>( &self, dynasty: &Dynasty, output_path: &P, )
Creates a dynasty graph, meaning the family tree graph
pub fn create_culture_graph<P: AsRef<Path>>( &self, culture_id: u32, output_path: &P, )
pub fn create_faith_graph<P: AsRef<Path>>(&self, faith_id: u32, output_path: &P)
Auto Trait Implementations§
impl Freeze for Grapher
impl RefUnwindSafe for Grapher
impl Send for Grapher
impl Sync for Grapher
impl Unpin for Grapher
impl UnwindSafe for Grapher
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