projects
/
Mitarbeiter
/
Tim-Zeitz
/
stud-rust-base.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
make heap api more robust
[Mitarbeiter/Tim-Zeitz/stud-rust-base.git]
/
src
/
types.rs
diff --git
a/src/types.rs
b/src/types.rs
index bb11a001e5cdaecb4c2b8ef3a65c8696ba9ac2c2..03d28f1c73fc2086070171a03632b24c4aad08b6 100644
(file)
--- a/
src/types.rs
+++ b/
src/types.rs
@@
-1,10
+1,12
@@
+//! This module contains a few basic type and constant definitions
+
use std;
use std;
-#[allow(dead_code)]
+/// Node ids are unsigned 32 bit integers
pub type NodeId = u32;
pub type NodeId = u32;
-#[allow(dead_code)]
+/// Edge ids are unsigned 32 bit integers
pub type EdgeId = u32;
pub type EdgeId = u32;
-#[allow(dead_code)]
+/// Edge weights are unsigned 32 bit integers
pub type Weight = u32;
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;
pub const INFINITY: Weight = std::u32::MAX / 2;