Commit bb59a325 authored by Davis King's avatar Davis King

clarified the spec

parent 6cac033c
...@@ -16,9 +16,14 @@ namespace dlib ...@@ -16,9 +16,14 @@ namespace dlib
/*! /*!
WHAT THIS OBJECT REPRESENTS WHAT THIS OBJECT REPRESENTS
This object represents a factor graph or graphical model. In This object represents a factor graph or graphical model. In
particular, this document defines the interface a MAP problem on particular, this object defines the interface a MAP problem on
a factor graph must implement if it is to be solved using the a factor graph must implement if it is to be solved using the
find_map_nmplp() routine defined at the bottom of this file. find_map_nmplp() routine defined at the bottom of this file.
Note that there is no dlib::map_problem object. What you are
looking at here is simply the interface definition for a map problem.
You must implement your own version of this object for the problem
you wish to solve and then pass it to the find_map_nmplp() routine.
!*/ !*/
public: public:
...@@ -31,9 +36,9 @@ namespace dlib ...@@ -31,9 +36,9 @@ namespace dlib
the nodes/variables in this factor graph. the nodes/variables in this factor graph.
Note that you can't dereference the iterator and Note that you can't dereference the iterator and
obtain a value. The iterator is opaque to the user. obtain a value. That is, the iterator is opaque to
It is used only as arguments to the other methods the user. It is used only as an argument to the other
defined in this interface. methods defined in this interface.
!*/ !*/
public: public:
...@@ -44,6 +49,23 @@ namespace dlib ...@@ -44,6 +49,23 @@ namespace dlib
- constructs an iterator in an undefined state - constructs an iterator in an undefined state
!*/ !*/
node_iterator(
const node_iterator& item
);
/*!
ensures
- #*this is a copy of item
!*/
node_iterator& operator= (
const node_iterator& item
);
/*!
ensures
- #*this is a copy of item
- returns #*this
!*/
bool operator== ( bool operator== (
const node_iterator& item const node_iterator& item
) const; ) const;
...@@ -70,7 +92,7 @@ namespace dlib ...@@ -70,7 +92,7 @@ namespace dlib
ensures ensures
- advances *this to the next node in the factor graph. - advances *this to the next node in the factor graph.
- returns a reference to the updated *this - returns a reference to the updated *this
(i.e. this is the ++object form of operator++) (i.e. this is the ++object form of the increment operator)
!*/ !*/
}; };
...@@ -91,6 +113,23 @@ namespace dlib ...@@ -91,6 +113,23 @@ namespace dlib
- constructs an iterator in an undefined state - constructs an iterator in an undefined state
!*/ !*/
neighbor_iterator(
const neighbor_iterator& item
);
/*!
ensures
- #*this is a copy of item
!*/
neighbor_iterator& operator= (
const neighbor_iterator& item
);
/*!
ensures
- #*this is a copy of item
- returns #*this
!*/
bool operator== ( bool operator== (
const neighbor_iterator& item const neighbor_iterator& item
) const; ) const;
...@@ -117,7 +156,7 @@ namespace dlib ...@@ -117,7 +156,7 @@ namespace dlib
ensures ensures
- advances *this to the next node in the factor graph. - advances *this to the next node in the factor graph.
- returns a reference to the updated *this - returns a reference to the updated *this
(i.e. this is the ++object form of operator++) (i.e. this is the ++object form of the increment operator)
!*/ !*/
}; };
......
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