Gecode::Int::BinPacking::Item Class Reference

Item combining bin and size information. More...

`#include <bin-packing.hh>`

## Public Member Functions

| Item (void)
| Default constructor.
| Item (IntView b, int s)
| Constructor.
IntView | bin (void) const
| Return bin of item.
void | bin (IntView b)
| Set bin of item to b.
int | size (void) const
| Return size of item.
void | size (int s)
| Set size of item to s.
void | update (Space &home, Item &i)
| Update item during cloning.
VarImpType * | varimp (void) const
| Return variable implementation of view.
IntView | base (void) const
| Return view from which this view is derived.
unsigned int | degree (void) const
| Return degree (number of subscribed propagators).
double | afc (void) const
| Return accumulated failure count.
bool | assigned (void) const
| Test whether view is assigned.
void | subscribe (Space &home, Propagator &p, PropCond pc, bool schedule=true)
| Subscribe propagator p with propagation condition pc to view.
void | cancel (Space &home, Propagator &p, PropCond pc)
| Cancel subscription of propagator p with propagation condition pc to view.
void | reschedule (Space &home, Propagator &p, PropCond pc)
| Re-schedule propagator p with propagation condition pc.
void | update (Space &home, DerivedView< IntView > &y)
| Update this view to be a clone of view y.
bool | operator< (const DerivedView< IntView > &y) const
| Whether this view comes before view y (arbitray order).

## Protected Attributes

int | s
| Size of item.
Protected Attributes inherited from Gecode::DerivedView< IntView >
IntView | x
| View from which this view is derived.

## Additional Inherited Members

Public Types inherited from Gecode::DerivedView< IntView >
typedef IntView::VarImpType | VarImpType
| The variable implementation type belonging to the View.
typedef IntView::VarType | VarType
| The variable type belonging to the View.
static bool | varderived (void)
| Return whether this view is derived from a VarImpView.
static void | schedule (Space &home, Propagator &p, ModEvent me)
| Schedule propagator p with modification event me.
static ModEvent | me (const ModEventDelta &med)
| Return modification event for view type in med.
static ModEventDelta | med (ModEvent)
| Translate modification event me to modification event delta for view.
static ModEvent | modevent (const Delta &d)
| Return modification event.
Protected Member Functions inherited from Gecode::DerivedView< IntView >
| DerivedView (void)
| Default constructor.

## Detailed Description

Item combining bin and size information.

Definition at line 53 of file bin-packing.hh.

## Constructor & Destructor Documentation

## Item() [1/2]

Gecode::Int::BinPacking::Item::Item | ( | void |  | ) |

inline

Default constructor.

Definition at line 41 of file propagate.hpp.

## Item() [2/2]

Gecode::Int::BinPacking::Item::Item | ( | IntView | b,
|  | int | s )

inline

Constructor.

Definition at line 44 of file propagate.hpp.

## Member Function Documentation

## bin() [1/2]

IntView Gecode::Int::BinPacking::Item::bin | ( | void |  | ) | const

inline

Return bin of item.

Definition at line 48 of file propagate.hpp.

## bin() [2/2]

void Gecode::Int::BinPacking::Item::bin | ( | IntView | b | ) |

inline

Set bin of item to b.

Definition at line 52 of file propagate.hpp.

## size() [1/2]

int Gecode::Int::BinPacking::Item::size | ( | void |  | ) | const

inline

Return size of item.

Definition at line 56 of file propagate.hpp.

## size() [2/2]

void Gecode::Int::BinPacking::Item::size | ( | int | s | ) |

inline

Set size of item to s.

Definition at line 60 of file propagate.hpp.

## update()

void Gecode::Int::BinPacking::Item::update | ( | Space & | home,
|  | Item & | i )

inline

Update item during cloning.

Definition at line 65 of file propagate.hpp.

## Member Data Documentation

## s

int Gecode::Int::BinPacking::Item::s

protected

Size of item.

Definition at line 57 of file bin-packing.hh.

The documentation for this class was generated from the following files:

- gecode/int/bin-packing.hh
- gecode/int/bin-packing/propagate.hpp