diff --git a/doc/html/annotated.html b/doc/html/annotated.html
deleted file mode 100644
index 932c8ae..0000000
--- a/doc/html/annotated.html
+++ /dev/null
@@ -1,70 +0,0 @@
-
-
-
-
-
-
Class List
Here are the classes, structs, unions and interfaces with brief descriptions:
-
-
-
-
CSP< T > Member List
This is the complete list of members for
CSP< T >, including all inherited members.
-
-
-
CSP< T > Class Template Reference
-
Main class for managing a CSP.
-More...
-
-
#include <csp++.h>
-
-
List of all members.
-
-Classes |
-struct | arc |
-Public Member Functions |
- | CSP (int n, bool(*c)(std::vector< CSPvariable< T > >)=__default_constraint) |
- | Class constructor.
|
- | CSP (int n, T default_value, bool set_variables=false, bool(*c)(std::vector< CSPvariable< T > >)=__default_constraint) |
- | Class constructor.
|
-void | setDomain (size_t index, std::vector< T > domain) |
- | Set the domain for the i-th variable.
|
-void | setDomain (size_t index, T domain[], int size) |
- | Set the domain for the i-th variable.
|
-void | setConstraint (bool(*c)(std::vector< CSPvariable< T > >)) |
- | Apply the constraint to the CSP as a boolean function.
|
-void | setConstraint (std::vector< bool(*)(std::vector< CSPvariable< T > >) > c) |
- | Apply the constraints to the CSP as vector of boolean functions.
|
-void | dropConstraint (size_t index) |
- | Drops a constraint from the CSP.
|
-void | appendConstraint (bool(*c)(std::vector< CSPvariable< T > >)) |
- | Append a constraint to the list of the constraint of the CSP.
|
-void | refreshDomains (void) |
- | Updates the domains of the variables. Any constraint or node fixed value is applied.
|
-std::vector< T > | getDomain (size_t index) |
- | Get the domain of the i-th variable.
|
-size_t | getSize (void) |
- | Get the number of variables in the current CSP.
|
-void | setValue (size_t index, T value) |
- | Set the value of a variable as a constraint.
|
-void | unsetValue (size_t index) |
- | Marks a variable as not set, and if a default value was assigned in the CSP constructor, this value will be set. By default, unless specified in the constructor, all the variables are considered as not set.
|
-bool | isSatisfiable (void) |
- | Check if the current CSP, with the applied constraints, is satisfiable.
|
-bool | hasUniqueSolution (void) |
- | Check if the CSP, with the given variables, domains and constraints, admits a unique solution, i.e. each domain of each variable contains an only element.
|
-
-
Detailed Description
-
template<class T>
- class CSP< T >
-
-
Main class for managing a CSP.
-
Constructor & Destructor Documentation
-
-
-
-
-template<class T >
-
-
- CSP< T >::CSP |
- ( |
- int |
- n, |
-
-
- |
- |
- bool(*)(std::vector< CSPvariable< T > >) |
- c = __default_constraint | |
-
-
- |
- ) |
- | | |
-
-
-
-
-
-
Class constructor.
-
- Parameters:
-
-
- | n | Number of variables in the CSP |
- | c | Boolean function representing the constraint of the CSP If no constraint function is set in the constructor or using the applyConstraint() method, a default function always returning true will be used, that allows any domain for any variable to be valid (no constraint) |
-
-
-
-
-
-
-
-
-
-
-template<class T >
-
-
- CSP< T >::CSP |
- ( |
- int |
- n, |
-
-
- |
- |
- T |
- default_value, |
-
-
- |
- |
- bool |
- set_variables = false , |
-
-
- |
- |
- bool(*)(std::vector< CSPvariable< T > >) |
- c = __default_constraint | |
-
-
- |
- ) |
- | | [inline] |
-
-
-
-
-
-
Class constructor.
-
- Parameters:
-
-
- | n | Number of variables in the CSP |
- | default_value | Default value for the variables in the CSP when initialized |
- | set_variables | Decide whether mark the variables set with default_value as "set" or "not set" (default: not set) |
- | c | Boolean function representing the constraint of the CSP If no constraint function is set in the constructor or using the applyConstraint() method, a default function always returning true will be used, that allows any domain for any variable to be valid (no constraint) |
-
-
-
-
-
-
-
Member Function Documentation
-
-
-
-
-template<class T >
-
-
- void CSP< T >::appendConstraint |
- ( |
- bool(*)(std::vector< CSPvariable< T > >) |
- c |
- ) |
- |
-
-
-
-
-
-
Append a constraint to the list of the constraint of the CSP.
-
METHOD: appendConstraint
-
- Parameters:
-
-
- | c | A function pointer returning a boolean value representing the new constraint |
-
-
-
-
-
-
-
-
-
-
-template<class T >
-
-
- void CSP< T >::dropConstraint |
- ( |
- size_t |
- index |
- ) |
- [inline] |
-
-
-
-
-
-
Drops a constraint from the CSP.
-
METHOD: dropConstraint
-
- Parameters:
-
-
- | index | Index of the constraint to be dropped |
-
-
-
-
-
-
-
-
-
-
-template<class T >
-
-
- std::vector< T > CSP< T >::getDomain |
- ( |
- size_t |
- index |
- ) |
- [inline] |
-
-
-
-
-
-
Get the domain of the i-th variable.
-
METHOD: getDomain
-
- Parameters:
-
-
- | index | Variable for which we're going to get the domain |
-
-
-
-
- Returns:
- The domain of the i-th variable as a vector of T
-
-
-
-
-
-
-
-template<class T >
-
-
- size_t CSP< T >::getSize |
- ( |
- void |
- |
- ) |
- [inline] |
-
-
-
-
-
-
Get the number of variables in the current CSP.
-
METHOD: getSize
-
- Returns:
- Size of the CSP
-
-
-
-
-
-
-
-template<class T >
-
-
- bool CSP< T >::hasUniqueSolution |
- ( |
- void |
- |
- ) |
- [inline] |
-
-
-
-
-
-
Check if the CSP, with the given variables, domains and constraints, admits a unique solution, i.e. each domain of each variable contains an only element.
-
FUNCTION: hasUniqueSolution
-
- Returns:
- true if the CSP has an only possible solution, false otherwise
-
-
-
-
-
-
-
-template<class T >
-
-
- bool CSP< T >::isSatisfiable |
- ( |
- void |
- |
- ) |
- [inline] |
-
-
-
-
-
-
Check if the current CSP, with the applied constraints, is satisfiable.
-
METHOD: isSatisfiable
-
- Returns:
- true if the CSP has at least a possible solution, false otherwise
-
-
-
-
-
-
-
-template<class T >
-
-
- void CSP< T >::refreshDomains |
- ( |
- void |
- |
- ) |
- [inline] |
-
-
-
-
-
-
Updates the domains of the variables. Any constraint or node fixed value is applied.
-
METHOD: refreshDomains
-
-
-
-
-
-
-
-template<class T >
-
-
- void CSP< T >::setConstraint |
- ( |
- std::vector< bool(*)(std::vector< CSPvariable< T > >) > |
- c |
- ) |
- [inline] |
-
-
-
-
-
-
Apply the constraints to the CSP as vector of boolean functions.
-
METHOD: setConstraint
-
- Parameters:
-
-
- | c | Vector containing pointers to boolean functions representing the constraints of the CSP |
-
-
-
-
-
-
-
-
-
-
-template<class T >
-
-
- void CSP< T >::setConstraint |
- ( |
- bool(*)(std::vector< CSPvariable< T > >) |
- c |
- ) |
- |
-
-
-
-
-
-
Apply the constraint to the CSP as a boolean function.
-
METHOD: setConstraint
-
- Parameters:
-
-
- | c | Boolean function representing the constraint of the CSP |
-
-
-
-
-
-
-
-
-
-
-template<class T >
-
-
- void CSP< T >::setDomain |
- ( |
- size_t |
- index, |
-
-
- |
- |
- T |
- domain[], |
-
-
- |
- |
- int |
- size | |
-
-
- |
- ) |
- | | [inline] |
-
-
-
-
-
-
Set the domain for the i-th variable.
-
METHOD: setDomain
-
- Parameters:
-
-
- | index | Variable for which we're setting the domain |
- | domain | Array containing the possible values for that variable |
- | size | Size of "domain" array |
-
-
-
-
-
-
-
-
-
-
-template<class T >
-
-
- void CSP< T >::setDomain |
- ( |
- size_t |
- index, |
-
-
- |
- |
- std::vector< T > |
- domain | |
-
-
- |
- ) |
- | | |
-
-
-
-
-
-
Set the domain for the i-th variable.
-
METHOD: setDomain
-
- Parameters:
-
-
- | index | Variable for which we're setting the domain |
- | domain | Vector containing the possible values for that variable |
-
-
-
-
-
-
-
-
-
-
-template<class T >
-
-
- void CSP< T >::setValue |
- ( |
- size_t |
- index, |
-
-
- |
- |
- T |
- value | |
-
-
- |
- ) |
- | | [inline] |
-
-
-
-
-
-
Set the value of a variable as a constraint.
-
METHOD: setValue
-
- Parameters:
-
-
- | index | Index of the parameter to be set |
- | value | Value to be set |
-
-
-
-
-
-
-
-
-
-
-template<class T >
-
-
- void CSP< T >::unsetValue |
- ( |
- size_t |
- index |
- ) |
- [inline] |
-
-
-
-
-
-
Marks a variable as not set, and if a default value was assigned in the CSP constructor, this value will be set. By default, unless specified in the constructor, all the variables are considered as not set.
-
METHOD: unsetValue
-
- Parameters:
-
-
- | index | Index of the variable to be unset |
-
-
-
-
-
-
-
The documentation for this class was generated from the following files:
-
-
-
-
CSPexception Member List
This is the complete list of members for
CSPexception, including all inherited members.
-
-
-
CSPexception Class Reference
-
Class for managing exception in CSP.
-More...
-
-
#include <csp++.h>
-
-
List of all members.
-
-Public Member Functions |
-
- | CSPexception (const char *m) |
-
-virtual const char * | what () |
-
-
Detailed Description
-
Class for managing exception in CSP.
-
The documentation for this class was generated from the following file:
-
-
-
-
-
-
csp++.h
00001
-00002
-00003
-00004
-00005
-00006
-00007
-00008
-00009
-00010
-00011
-00012
-00013
-00014
-00015
-00016
-00017
-00018
-00019 #include <vector>
-00020 #include <exception>
-00021
-00022 template<class T>
-00023 struct CSPvariable {
-00024 int index;
-00025 T value;
-00026 std::vector<T> domain;
-00027 };
-00028
-00033 class CSPexception : public std::exception {
-00034 const char* message;
-00035
-00036 public:
-00037 CSPexception (const char *m) {
-00038 message = m;
-00039 }
-00040
-00041 virtual const char* what() {
-00042 return message;
-00043 }
-00044 };
-00045
-00050 template<class T>
-00051 class CSP {
-00052 private:
-00053 template<class TT>
-00054 struct arc {
-00055 CSPvariable<TT> var[2];
-00056 TT value[2];
-00057 };
-00058
-00059 std::vector<bool> fixed;
-00060 std::vector< CSPvariable<T> > variables;
-00061 std::vector< bool (*)(std::vector< CSPvariable<T> >) > constraints;
-00062 #define constraint constraints[0]
-00063
-00064 std::vector< std::vector<T> > __default_domains;
-00065 T __default_value;
-00066 bool __has_default_value;
-00067 static bool __default_constraint ( std::vector< CSPvariable<T> > v ) { return true; }
-00068 void __init ( int n, bool (*c)(std::vector< CSPvariable<T> >) );
-00069 void restoreDomains ( void );
-00070
-00071 public:
-00081 CSP ( int n, bool (*c)(std::vector< CSPvariable<T> >) = __default_constraint );
-00082
-00096 CSP ( int n, T default_value, bool set_variables = false, bool (*c)(std::vector< CSPvariable<T> >) = __default_constraint );
-00097
-00104 void setDomain ( size_t index, std::vector<T> domain );
-00105
-00113 void setDomain ( size_t index, T domain[], int size );
-00114
-00120 void setConstraint ( bool (*c)(std::vector< CSPvariable<T> >) );
-00121
-00128 void setConstraint ( std::vector< bool(*)(std::vector< CSPvariable<T> >) > c );
-00129
-00135 void dropConstraint ( size_t index );
-00136
-00142 void appendConstraint ( bool (*c)(std::vector< CSPvariable<T> >) );
-00143
-00148 void refreshDomains( void );
-00149
-00156 std::vector<T> getDomain ( size_t index );
-00157
-00163 size_t getSize ( void );
-00164
-00171 void setValue ( size_t index, T value );
-00172
-00181 void unsetValue ( size_t index );
-00182
-00188 bool isSatisfiable ( void );
-00189
-00190
-00198 bool hasUniqueSolution ( void );
-00199 };
-00200
-
-
-
-
File List
Here is a list of all documented files with brief descriptions:
-
-
-
-Here is a list of all documented class members with links to the class documentation for each member:
-
-
-