* \brief Constant integer view * * A constant integer view \f$x\f$ for an integer \f$c\f$ provides * operations such that \f$x\f$ behaves as a view assigned to \f$c\f$. * \ingroup TaskActorIntView */
| 849 | * \ingroup TaskActorIntView |
| 850 | */ |
| 851 | class ConstIntView : public ConstView<IntView> { |
| 852 | protected: |
| 853 | int x; |
| 854 | public: |
| 855 | /// \name Constructors and initialization |
| 856 | //@{ |
| 857 | /// Default constructor |
| 858 | ConstIntView(void); |
| 859 | /// Initialize with integer value \a n |
| 860 | ConstIntView(int n); |
| 861 | //@} |
| 862 | |
| 863 | /// \name Value access |
| 864 | //@{ |
| 865 | /// Return minimum of domain |
| 866 | int min(void) const; |
| 867 | /// Return maximum of domain |
| 868 | int max(void) const; |
| 869 | /// Return median of domain (greatest element not greater than the median) |
| 870 | int med(void) const; |
| 871 | /// Return assigned value (only if assigned) |
| 872 | int val(void) const; |
| 873 | |
| 874 | /// Return size (cardinality) of domain |
| 875 | unsigned int size(void) const; |
| 876 | /// Return width of domain (distance between maximum and minimum) |
| 877 | unsigned int width(void) const; |
| 878 | /// Return regret of domain minimum (distance to next larger value) |
| 879 | unsigned int regret_min(void) const; |
| 880 | /// Return regret of domain maximum (distance to next smaller value) |
| 881 | unsigned int regret_max(void) const; |
| 882 | //@} |
| 883 | |
| 884 | /// \name Domain tests |
| 885 | //@{ |
| 886 | /// Test whether domain is a range |
| 887 | bool range(void) const; |
| 888 | /// Test whether \a n is contained in domain |
| 889 | bool in(int n) const; |
| 890 | /// Test whether \a n is contained in domain |
| 891 | bool in(long long int n) const; |
| 892 | //@} |
| 893 | |
| 894 | /// \name Domain update by value |
| 895 | //@{ |
| 896 | /// Restrict domain values to be less or equal than \a n |
| 897 | ModEvent lq(Space& home, int n); |
| 898 | /// Restrict domain values to be less or equal than \a n |
| 899 | ModEvent lq(Space& home, long long int n); |
| 900 | |
| 901 | /// Restrict domain values to be less than \a n |
| 902 | ModEvent le(Space& home, int n); |
| 903 | /// Restrict domain values to be less than \a n |
| 904 | ModEvent le(Space& home, long long int n); |
| 905 | |
| 906 | /// Restrict domain values to be greater or equal than \a n |
| 907 | ModEvent gq(Space& home, int n); |
| 908 | /// Restrict domain values to be greater or equal than \a n |
no outgoing calls
no test coverage detected