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

A precedence constraint. More...

#include <constraint.h>

Inheritance diagram for delphos::PrecedenceConstraint:
Inheritance graph
Collaboration diagram for delphos::PrecedenceConstraint:
Collaboration graph

Public Member Functions

 PrecedenceConstraint (const string &name, const delphos::Precedence &prec)
 Creates a new precedence constraint. More...
 
virtual ~PrecedenceConstraint ()
 Destroys the precedence constraint.
 
virtual const delphos::PrecedenceGetPrecedence () const
 Returns the precedence object associated to the constraint. More...
 
virtual bool Check (const delphos::Schedule &sch) const
 Checks if the constraint is satisfied. More...
 
virtual bool Check (const delphos::FractionalSchedule &sch) const
 Checks if the given fractional schedule satisfies the constraint. More...
 
- Public Member Functions inherited from delphos::Constraint
 Constraint (const string &name)
 Creates a constraint with given name. More...
 
virtual ~Constraint ()
 Destructor. 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

A precedence constraint.

The precedence constraint force blocks to be scheduled satisfying a certain partial order.

Constructor & Destructor Documentation

delphos::PrecedenceConstraint::PrecedenceConstraint ( const string &  name,
const delphos::Precedence prec 
)

Creates a new precedence constraint.

Parameters
nameThe name of the precedence constraint.
precThe precedence.

This method creates a new precedence constraint, which is given by a precedence object (already computed) and has a name within the instance.

Member Function Documentation

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

Checks if the constraint is satisfied.

Parameters
schThe schedule to be checked.

Returns true only if the constraint is satisfied.

Reimplemented from delphos::Constraint.

Reimplemented in delphos::GeometricConstraint.

bool delphos::PrecedenceConstraint::Check ( const delphos::FractionalSchedule sch) 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).

Reimplemented from delphos::Constraint.

Reimplemented in delphos::GeometricConstraint.

const Precedence & delphos::PrecedenceConstraint::GetPrecedence ( ) const
virtual

Returns the precedence object associated to the constraint.

Returns the precedence object associated to the constraint.

Reimplemented in delphos::GeometricConstraint.


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