* \brief Item combining bin and size information */
| 51 | * \brief Item combining bin and size information |
| 52 | */ |
| 53 | class Item : public DerivedView<IntView> { |
| 54 | protected: |
| 55 | using DerivedView<IntView>::x; |
| 56 | /// Size of item |
| 57 | int s; |
| 58 | public: |
| 59 | /// Default constructor |
| 60 | Item(void); |
| 61 | /// Constructor |
| 62 | Item(IntView b, int s); |
| 63 | |
| 64 | /// Return bin of item |
| 65 | IntView bin(void) const; |
| 66 | /// Set bin of item to \a b |
| 67 | void bin(IntView b); |
| 68 | /// Return size of item |
| 69 | int size(void) const; |
| 70 | /// Set size of item to \a s |
| 71 | void size(int s); |
| 72 | |
| 73 | /// Update item during cloning |
| 74 | void update(Space& home, Item& i); |
| 75 | }; |
| 76 | |
| 77 | /// Whether two items are the same |
| 78 | bool operator ==(const Item& i, const Item& j); |