FlopCpp trunk
Loading...
Searching...
No Matches
flopc::MP_domain Class Reference

Range over which some other constuct is defined. More...

#include <MP_domain.hpp>

+ Inheritance diagram for flopc::MP_domain:
+ Collaboration diagram for flopc::MP_domain:

Public Member Functions

 MP_domain ()
 @briefConstructs a set which points to nothing.
 
 ~MP_domain ()
 
 MP_domain (MP_domain_base *r)
 For internal use.
 
MP_domain such_that (const MP_boolean &b)
 Special conditional creation of a subset.
 
void Forall (const Functor *op) const
 Special conditional operation on the domain.
 
size_t size () const
 returns number of elements in the domain.
 
- Public Member Functions inherited from flopc::Handle< MP_domain_base * >
const MP_domain_base *& operator-> () const
 
 Handle (const MP_domain_base *&r)
 
 Handle (const Handle &h)
 
const Handleoperator= (const Handle &h)
 
 ~Handle ()
 

Static Public Member Functions

static const MP_domaingetEmpty ()
 returns a reference to the "empty" set.
 

Friends

class MP_constraint
 
class MP_index_exp
 
MP_domain operator* (const MP_domain &a, const MP_domain &b)
 operator which creates a new domain as the pairwise combinations of two input domains.
 

Additional Inherited Members

- Protected Member Functions inherited from flopc::Handle< MP_domain_base * >
void increment ()
 
void decrement ()
 

Detailed Description

Range over which some other constuct is defined.

This is one of the main public interface classes. One uses this in the context of a constraint, objective, variable, or data. It is usually used in conjunction with an MP_set, or a subset, but can be used without one. It is the range over which the other construct is defined.

  • there is a special domain known as "empty". It is static and a reference can be obtained using MP_domain::getEmpty();
  • The empty set is used when defaulting in parameters for dimensions which are not used.

Definition at line 61 of file MP_domain.hpp.

Constructor & Destructor Documentation

◆ MP_domain() [1/2]

flopc::MP_domain::MP_domain ( )

@briefConstructs a set which points to nothing.

Note
This is not the same as the "empty" set.

◆ ~MP_domain()

flopc::MP_domain::~MP_domain ( )

◆ MP_domain() [2/2]

flopc::MP_domain::MP_domain ( MP_domain_base * r)

For internal use.

Todo
make this constructor private?

Member Function Documentation

◆ such_that()

MP_domain flopc::MP_domain::such_that ( const MP_boolean & b)

Special conditional creation of a subset.

This method allows for a test for inclusion of a condition during construction of a subset. The output MP_domain will include references where the condition is satisfied.

◆ Forall()

void flopc::MP_domain::Forall ( const Functor * op) const

Special conditional operation on the domain.

This method will call the functor for each member of the MP_domain.

◆ size()

size_t flopc::MP_domain::size ( ) const

returns number of elements in the domain.

◆ getEmpty()

static const MP_domain & flopc::MP_domain::getEmpty ( )
static

returns a reference to the "empty" set.

Friends And Related Symbol Documentation

◆ MP_constraint

friend class MP_constraint
friend

Definition at line 64 of file MP_domain.hpp.

◆ MP_index_exp

friend class MP_index_exp
friend

Definition at line 65 of file MP_domain.hpp.

◆ operator*

MP_domain operator* ( const MP_domain & a,
const MP_domain & b )
friend

operator which creates a new domain as the pairwise combinations of two input domains.


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