pethgraph-graphml and docs/comments

This commit is contained in:
elvis
2025-07-10 15:02:14 +02:00
parent 0fb1ca97a0
commit 869d46c7b2
14 changed files with 64 additions and 21 deletions

View File

@ -1,4 +1,5 @@
//! Module for translation and keeping track of strings.
use std::{cmp::max, collections::HashMap};
use serde::{Serialize, Deserialize};
@ -7,6 +8,8 @@ static PRECISION: &usize = &2;
pub type IdType = u32;
/// Structure that keeps track of association string and id. Ids given
/// sequentially from 0.
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct Translator {
strings: HashMap<String, IdType>,