- Main Page
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# Mers::Solvers::SAT::ValidSAT::VSATVariable Class Reference

`#include <VSATVariable.h>`

Collaboration diagram for Mers::Solvers::SAT::ValidSAT::VSATVariable:

[legend]
List of all members.

## Public Member Functions
| VSATVariable (Mers::Models::Base::BaseModelVariable const *myVariable, bool myIsDesignVariable)
| VSATVariable (VSATVariable const &other)
virtual | ~VSATVariable ()
Mers::Models::Base::BaseModelAssignmentArray & | getAssignments ()
unsigned int | getUID ()
bool | isDesignVariable ()
virtual VSATVariable * | duplicate () const
bool | operator== (VSATVariable const &other) const
virtual void | print (std::ostream &out) const
## Protected Attributes
Mers::Models::Base::BaseModelVariable const * | variable
Mers::Models::Base::BaseModelAssignmentArray | assignments
bool | isDesignVar

## Detailed Description

Class that extends the information contained in a normal variable to include whether or not the variable is a decision variable and and a cache of assignments for the variable, used for representing which domains have limited.

Author:
  Paul H. Elliott

Definition at line 44 of file VSATVariable.h.

## Constructor & Destructor Documentation

VSATVariable::VSATVariable | ( | Mers::Models::Base::BaseModelVariable const * | myVariable,
|  | bool | myIsDesignVariable |
| ) |  |  |

Creates a new VSAT Variable object. This class wraps the standard variable class to incorporate some extra information.

Parameters:

  | myVariable | the variable that this variable represents.
  | myIsDesignVariable | true if this is a design variable.

Definition at line 31 of file VSATVariable.cpp.

References assignments, Mers::Models::Base::BaseModelVariable::getDomain(), Mers::Utils::Containers::DynamicArray::getLength(), isDesignVar, Mers::Models::Base::BaseModelAssignmentArray::pushBack(), and variable.

Referenced by duplicate().

Here is the call graph for this function:

VSATVariable::VSATVariable | ( | VSATVariable const & | other | ) |

Copies the VSATVariable and it's current domain.

Parameters:

  | other | The other variable being copied to this variable.

Definition at line 45 of file VSATVariable.cpp.

VSATVariable::~VSATVariable | ( |  | ) | `[virtual]`

Destroys this object

Definition at line 53 of file VSATVariable.cpp.

## Member Function Documentation

BaseModelAssignmentArray & VSATVariable::getAssignments | ( |  | ) |

Returns a list of all assignments between this variable and all its reachable values.

Returns:
  a list of all assignments that are currently valid for this variable based on reachability.

Definition at line 60 of file VSATVariable.cpp.

References assignments.

Referenced by Mers::Solvers::SAT::ValidSAT::VSATNode::adjustValidAssignment().

unsigned int Mers::Solvers::SAT::ValidSAT::VSATVariable::getUID | ( |  | ) | `[inline]`

Returns the UID of this variable (index into the variable array).

Returns:
  the UID of the variable.

Definition at line 86 of file VSATVariable.h.

References Mers::Models::Base::BaseModelVariable::getUID(), and variable.

Referenced by Mers::Solvers::SAT::ValidSAT::VSATNode::adjustValidAssignment().

Here is the call graph for this function:

bool Mers::Solvers::SAT::ValidSAT::VSATVariable::isDesignVariable | ( |  | ) | `[inline]`

Returns true if this is a design variable (one of the variables being search over), and false otherwise.

Returns:
  true iff this is a design variable.

Definition at line 97 of file VSATVariable.h.

References isDesignVar.

Referenced by Mers::Solvers::SAT::ValidSAT::VSATNode::propagate().

VSATVariable * VSATVariable::duplicate | ( |  | ) | const`[virtual]`

Creates a copy of the element, or returns NULL to indicate the element couldn't be copied.

Returns:
  a copy of this object, or NULL if it could not be copied.

Definition at line 67 of file VSATVariable.cpp.

References isDesignVar, variable, and VSATVariable().

Here is the call graph for this function:

bool VSATVariable::operator== | ( | VSATVariable const & | other | ) | const

Compares the two objects and returns true if they contain the same data.

Parameters:

  | other | the other object being compared to this object.

Returns:
  true, if the two objects are the same.

Definition at line 74 of file VSATVariable.cpp.

References isDesignVar, and variable.

void VSATVariable::print | ( | std::ostream & | out | ) | const`[virtual]`

Called to print this object to the specified ostream.

Parameters:

  | out | the ostream to print this object information to

Definition at line 83 of file VSATVariable.cpp.

References isDesignVar, and variable.

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

- /Users/fpy/titan-1-5-MBARI/Mers/Solvers/SAT/ValidSAT/VSATVariable.h
- /Users/fpy/titan-1-5-MBARI/Mers/Solvers/SAT/ValidSAT/VSATVariable.cpp