ABA_VARTYPE Class Reference

Variables can be of three different types: Continuous, Integer or Binary. We distinguish Integer and Binary variables since some operations are performed differently (e.g., branching). More...

#include <vartype.h>

Inheritance diagram for ABA_VARTYPE:

ABA_ABACUSROOT List of all members.

Public Types

enum  TYPE { Continuous, Integer, Binary }

Public Member Functions

 ABA_VARTYPE ()
 The default constructor lets the type of the variable uninitialized.
 ABA_VARTYPE (TYPE t)
TYPE type () const
void type (TYPE t)
 This version of the function type() sets the variable type.
bool discrete () const
bool binary () const
bool integer () const

Private Attributes

TYPE type_

Friends

ostream & operator<< (ostream &out, const ABA_VARTYPE &rhs)
 The output operator writes the variable type to an output stream in the format { Continuous}, { Integer}, or { Binary}.

Detailed Description

Variables can be of three different types: Continuous, Integer or Binary. We distinguish Integer and Binary variables since some operations are performed differently (e.g., branching).

Definition at line 45 of file vartype.h.


Member Enumeration Documentation

enum ABA_VARTYPE::TYPE

The enumeration with the different variable types.

Parameters:
Continuous A continuous variable.
Integer A general integer variable.
Binary A variable having value 0 or 1.
Enumerator:
Continuous 
Integer 
Binary 

Definition at line 54 of file vartype.h.


Constructor & Destructor Documentation

ABA_VARTYPE::ABA_VARTYPE (  )  [inline]

The default constructor lets the type of the variable uninitialized.

Definition at line 126 of file vartype.h.

ABA_VARTYPE::ABA_VARTYPE ( TYPE  t  )  [inline]

This constructor initializes the variable type.

Parameters:
t The variable type.

Definition at line 130 of file vartype.h.


Member Function Documentation

ABA_VARTYPE::TYPE ABA_VARTYPE::type (  )  const [inline]

Returns:
The type of the variable.

Definition at line 135 of file vartype.h.

void ABA_VARTYPE::type ( TYPE  t  )  [inline]

This version of the function type() sets the variable type.

Parameters:
t The new type of the variable.

Definition at line 140 of file vartype.h.

bool ABA_VARTYPE::discrete (  )  const [inline]

Returns:
true If the type of the variable is Integer or Binary,

false otherwise.

Definition at line 145 of file vartype.h.

bool ABA_VARTYPE::binary (  )  const [inline]

Returns:
true If the type of the variable Binary,

false otherwise.

Definition at line 151 of file vartype.h.

bool ABA_VARTYPE::integer (  )  const

Returns:
true If the type of the variable is Integer,

false otherwise.


Friends And Related Function Documentation

ostream& operator<< ( ostream &  out,
const ABA_VARTYPE rhs 
) [friend]

The output operator writes the variable type to an output stream in the format { Continuous}, { Integer}, or { Binary}.

Returns:
A reference to the output stream.
Parameters:
out The output stream.
rhs The variable type being output.


Member Data Documentation

TYPE ABA_VARTYPE::type_ [private]

The type of the variable.

Definition at line 122 of file vartype.h.


The documentation for this class was generated from the following file:
Generated on Tue Aug 14 18:10:00 2007 for ABACUS by  doxygen 1.5.1