make heap api more robust
[Mitarbeiter/Tim-Zeitz/stud-rust-base.git] / src / types.rs
1 //! This module contains a few basic type and constant definitions
2
3 use std;
4
5 /// Node ids are unsigned 32 bit integers
6 pub type NodeId = u32;
7 /// Edge ids are unsigned 32 bit integers
8 pub type EdgeId = u32;
9 /// Edge weights are unsigned 32 bit integers
10 pub type Weight = u32;
11 /// The `INFINITY` weight is defined so that the check `INFINITY + INFINITY < INFINITY` does not cause any overflows
12 pub const INFINITY: Weight = std::u32::MAX / 2;