X-Git-Url: https://i11git.iti.kit.edu/anon-gitweb/?p=Mitarbeiter%2FTim-Zeitz%2Fstud-rust-base.git;a=blobdiff_plain;f=src%2Ftypes.rs;h=03d28f1c73fc2086070171a03632b24c4aad08b6;hp=bb11a001e5cdaecb4c2b8ef3a65c8696ba9ac2c2;hb=7e14e0703289af36efa95d687c71116a7a53a450;hpb=dd14e61875eedc443d6004db819562a9b7f98a14 diff --git a/src/types.rs b/src/types.rs index bb11a00..03d28f1 100644 --- a/src/types.rs +++ b/src/types.rs @@ -1,10 +1,12 @@ +//! This module contains a few basic type and constant definitions + use std; -#[allow(dead_code)] +/// Node ids are unsigned 32 bit integers pub type NodeId = u32; -#[allow(dead_code)] +/// Edge ids are unsigned 32 bit integers pub type EdgeId = u32; -#[allow(dead_code)] +/// Edge weights are unsigned 32 bit integers pub type Weight = u32; -#[allow(dead_code)] +/// The `INFINITY` weight is defined so that the check `INFINITY + INFINITY < INFINITY` does not cause any overflows pub const INFINITY: Weight = std::u32::MAX / 2;