1use std::fmt;
2
3use crate::{NodeId, PosWalk, RandomWalk, WalkStorage};
4
5impl fmt::Debug for NodeId {
6 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7 match self {
10 NodeId::Int(id) => write!(f, "NodeId::Int({})", id),
11 NodeId::UInt(id) => write!(f, "NodeId::UInt({})", id),
12 NodeId::None => write!(f, "NodeId::None"),
13 }
14 }
15}
16
17impl fmt::Debug for RandomWalk {
26 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
27 write!(f, "RandomWalk {{ nodes: {:?} }}", self.get_nodes())
30 }
31}
32
33impl fmt::Debug for WalkStorage {
34 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
35 let sorted_walks: std::collections::BTreeMap<_, _> = self.get_walks().iter().collect();
38
39 write!(f, "WalkStorage {{ walks: {:?} }}", sorted_walks)
40 }
41}
42
43impl fmt::Debug for PosWalk {
44 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
45 write!(
48 f,
49 "PosWalk {{ pos: {:?}, walk: {:?} }}",
50 self.get_pos(),
51 self.get_walk()
52 )
53 }
54}