[GIT] ppl/ppl(pip): Moved the constraint() method to PIP_Tree_Node class.

Module: ppl/ppl Branch: pip Commit: 92c85879ea35c25a53e3dae171d34a8ac1ad4b14 URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=92c85879ea35c...
Author: François Galea francois.galea@uvsq.fr Date: Fri Sep 11 17:09:21 2009 +0200
Moved the constraint() method to PIP_Tree_Node class.
---
src/PIP_Tree.defs.hh | 30 ++++++++++-------------------- src/PIP_Tree.inlines.hh | 5 +++++ 2 files changed, 15 insertions(+), 20 deletions(-)
diff --git a/src/PIP_Tree.defs.hh b/src/PIP_Tree.defs.hh index acb8b2a..5393c02 100644 --- a/src/PIP_Tree.defs.hh +++ b/src/PIP_Tree.defs.hh @@ -60,6 +60,16 @@ public: //! Returns \c true if and only if \p *this is well formed. bool OK() const;
+ /*! \brief + Returns the system of parameter constraints controlling \p *this. + + The column indices in the constraints are numbered from \c 0 to + <tt>np-1</tt>, where \c np is the total number of parameters. They are + ordered with the same order as the parameter indices in the original + problem. + */ + const Constraint_System& constraints() const; + protected: //! A type alias for a sequence of constraints. typedef std::vector<Constraint> Constraint_Sequence; @@ -137,16 +147,6 @@ public: */ const Linear_Expression& parametric_values(Variable v);
- /*! \brief - Returns the system of parameter constraints controlling \p *this. - - The column indices in the constraints are numbered from \c 0 to - <tt>np-1</tt>, where \c np is the total number of parameters. They are - ordered with the same order as the parameter indices in the original - problem. - */ - const Constraint_System& constraints(); - void ascii_dump(std::ostream& s) const; bool ascii_load(std::istream& s);
@@ -330,16 +330,6 @@ public: //! Returns a pointer to the \p v (true or false) branch of \p *this. PIP_Tree_Node* child_node(bool v);
- /*! \brief - Returns the system of parameter constraints controlling \p *this. - - The column indices in the constraints are numbered from \c 0 to - <tt>np-1</tt>, where \c np is the total number of parameters. They are - ordered with the same order as the parameter indices in the original - problem. - */ - const Constraint_System& constraints(); - bool OK() const;
private: diff --git a/src/PIP_Tree.inlines.hh b/src/PIP_Tree.inlines.hh index c3b23bc..c7f66bb 100644 --- a/src/PIP_Tree.inlines.hh +++ b/src/PIP_Tree.inlines.hh @@ -64,6 +64,11 @@ inline PIP_Tree_Node::~PIP_Tree_Node() { }
+inline const Constraint_System& +PIP_Tree_Node::constraints() const { + return constraints_; +} + inline const PIP_Tree_Node* PIP_Decision_Node::child_node(bool v) const {
participants (1)
-
François Galea