Commit c4491db7 authored by Davis King's avatar Davis King

Made the graph specs more clear

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402607
parent f8b4ad7c
...@@ -34,8 +34,8 @@ namespace dlib ...@@ -34,8 +34,8 @@ namespace dlib
mem_manager::type can be set to anything. mem_manager::type can be set to anything.
POINTERS AND REFERENCES TO INTERNAL DATA POINTERS AND REFERENCES TO INTERNAL DATA
The only functions that invalidate pointers or references to internal data are The only time pointers or references to nodes or edges become invalid is when
clear(), remove_node(), add_node(), set_number_of_nodes(), and the object's destructor. they reference nodes or edges that have been removed from a graph.
INITIAL VALUE INITIAL VALUE
number_of_nodes() == 0 number_of_nodes() == 0
...@@ -295,6 +295,7 @@ namespace dlib ...@@ -295,6 +295,7 @@ namespace dlib
); );
/*! /*!
ensures ensures
- does not change the index number of existing nodes
- adds a node with index N == number_of_nodes() such that: - adds a node with index N == number_of_nodes() such that:
- #node(N).number_of_parents() == 0 - #node(N).number_of_parents() == 0
- #node(N).number_of_children() == 0 - #node(N).number_of_children() == 0
......
...@@ -34,8 +34,8 @@ namespace dlib ...@@ -34,8 +34,8 @@ namespace dlib
mem_manager::type can be set to anything. mem_manager::type can be set to anything.
POINTERS AND REFERENCES TO INTERNAL DATA POINTERS AND REFERENCES TO INTERNAL DATA
The only functions that invalidate pointers or references to internal data are The only time pointers or references to nodes or edges become invalid is when
clear(), remove_node(), add_node(), set_number_of_nodes(), and the object's destructor. they reference nodes or edges that have been removed from a graph.
INITIAL VALUE INITIAL VALUE
number_of_nodes() == 0 number_of_nodes() == 0
...@@ -239,6 +239,7 @@ namespace dlib ...@@ -239,6 +239,7 @@ namespace dlib
); );
/*! /*!
ensures ensures
- does not change the index number of existing nodes
- adds a node with index N == number_of_nodes() such that: - adds a node with index N == number_of_nodes() such that:
- #node(N).number_of_neighbors() == 0 - #node(N).number_of_neighbors() == 0
- #number_of_nodes() == number_of_nodes() + 1 - #number_of_nodes() == number_of_nodes() + 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment