Main Page | Class Hierarchy | Class List | File List | Class Members

Solution Class Reference

#include <Solution.h>

List of all members.

Public Member Functions

 Solution (const vector< pair< const Variable *, const Value * > > &assignments)
virtual ~Solution ()
 Destructor.
id_t id () const
 Return the solution's id.
void setId (id_t id)
 Set the solution's id.
const Valuelookup (const Variable &variable) const
virtual wostream & print (wostream &wos) const
 Print the solution at the given stream.

Friends

CSP_API wostream & operator<< (wostream &wos, const Solution &solution)
 Print the variable at the given stream.
CSP_API bool operator== (const Solution &solution0, const Solution &solution1)


Detailed Description

Object storing a solution to a CSP.


Constructor & Destructor Documentation

Solution::Solution const vector< pair< const Variable *, const Value * > > &  assignments  ) 
 

Constructor.

Parameters:
assignments the assignments making up this solution.


Member Function Documentation

const Value * Solution::lookup const Variable variable  )  const
 

Look an assignment up.

Parameters:
variable the variable whose assignment we're checking.
Returns:
a pointer to the value assigned to this variable, or NULL if an assignment to `variable' can't be found.


The documentation for this class was generated from the following files:
Generated on Wed May 25 12:21:21 2005 for csp.kdevelop by  doxygen 1.3.9.1