MineLink
 All Data Structures Functions Variables Pages
delphos::Constraint Class Reference

Defines the base class for all constraints. More...

#include <constraint.h>

Inheritance diagram for delphos::Constraint:
Inheritance graph
Collaboration diagram for delphos::Constraint:
Collaboration graph

Public Member Functions

 Constraint (const string &name)
 Creates a constraint with given name. More...
 
virtual ~Constraint ()
 Destructor. More...
 
virtual bool Check (const delphos::Schedule &sch) const
 Checks if the given schedule satisfies the constraint. More...
 
virtual bool Check (const delphos::FractionalSchedule &fsch) const
 Checks if the given fractional schedule satisfies the constraint. More...
 
virtual string ToXML (const unsigned int identation_level=0) const
 A XML string describing the constraint. More...
 
const char * TypeName () const
 a char string used a identifier in the XML representation of the constraint.
 

Detailed Description

Defines the base class for all constraints.

A constraint is a condition that must be fulfilled by a schedule 'solving' a scheduling instance.

This class provides dummy implementations of the base methods, which are expected to be defined by sub-classes.

The class also provides utility functions to create XML representations of the constraints.

Constructor & Destructor Documentation

delphos::Constraint::Constraint ( const string &  name)

Creates a constraint with given name.

Parameters
nameA name describing the constraint.

Creates a new constraint with given name.

delphos::Constraint::~Constraint ( )
virtual

Destructor.

Destructor.

Member Function Documentation

bool delphos::Constraint::Check ( const delphos::Schedule sch) const
virtual

Checks if the given schedule satisfies the constraint.

Parameters
schThe schedule to be checked.

This method checks if the given schedule satisfies the constraint (returning true) or not (return false).

For this class, a dummy version that always return false.

Reimplemented in delphos::GeometricConstraint, delphos::BlockSelectionPrecedenceConstraint, delphos::PrecedenceConstraint, delphos::AttributeAvgConstraint, delphos::AttributeSumConstraint, delphos::MinExtractPeriodConstraint, delphos::DoNotSendToConstraint, delphos::DoNotMineBeforeConstraint, and delphos::ForceMiningByConstraint.

bool delphos::Constraint::Check ( const delphos::FractionalSchedule fsch) const
virtual

Checks if the given fractional schedule satisfies the constraint.

Parameters
fschThe fractional schedule to be checked.

This method checks if the given schedule satisfies the constraint (returning true) or not (return false).

For this class, a dummy version that always return false.

Reimplemented in delphos::GeometricConstraint, delphos::BlockSelectionPrecedenceConstraint, delphos::PrecedenceConstraint, delphos::AttributeAvgConstraint, delphos::AttributeSumConstraint, delphos::DoNotSendToConstraint, delphos::DoNotMineBeforeConstraint, and delphos::ForceMiningByConstraint.

string delphos::Constraint::ToXML ( const unsigned int  identation_level = 0) const
virtual

A XML string describing the constraint.

Parameters
identation_levelIdentation level of the XML produced.

Constructs a XML string describing the constraint's name and potential attributes.


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