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

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

# Mers::Solvers::SAT::GATSAT::NUGatsatFactory Class Reference

`#include <NUGatsatFactory.h>`

Inheritance diagram for Mers::Solvers::SAT::GATSAT::NUGatsatFactory:

[legend]
Collaboration diagram for Mers::Solvers::SAT::GATSAT::NUGatsatFactory:

[legend]
List of all members.

## Public Member Functions
| NUGatsatFactory ()
virtual | ~NUGatsatFactory ()
void | setProbabilities (const Mers::Utils::Containers::IntegerArray &valueMap, const std::vector< double > &searchVarProbs)
virtual Mers::Solvers::SAT::GATSAT::GATSAT * | createGatsat (const Mers::Models::Base::BaseModelVariableArray &searchVars, const Mers::Models::Base::BaseModelVariableArray &allVars, const Mers::Models::Base::BaseModelSentence &theory) const throw (Mers::Utils::Exceptions::RuntimeException)
virtual Mers::Solvers::SAT::GATSAT::GATSAT * | createGatsat (const Mers::Models::Base::BaseModelVariableArray &searchVars, const Mers::Models::Base::BaseModelVariableArray &allVars, const Mers::Models::Base::BaseModelSentence &theory, const Mers::Utils::Containers::IntegerArray &valueMap, const std::vector< double > &searchVarProbs) const =0 throw (Mers::Utils::Exceptions::RuntimeException)
## Protected Attributes
Mers::Utils::Containers::IntegerArray | m_ValueMap
std::vector< double > | m_SearchVarProbs

## Detailed Description

A factory for creating Non-uniform cost GATSAT objects.

Definition at line 25 of file NUGatsatFactory.h.

## Constructor & Destructor Documentation

Mers::Solvers::SAT::GATSAT::NUGatsatFactory::NUGatsatFactory | ( |  | ) | `[inline]`

Constructs this object.

Definition at line 31 of file NUGatsatFactory.h.

virtual Mers::Solvers::SAT::GATSAT::NUGatsatFactory::~NUGatsatFactory | ( |  | ) | `[inline, virtual]`

Destroys this object.

Definition at line 37 of file NUGatsatFactory.h.

## Member Function Documentation

void Mers::Solvers::SAT::GATSAT::NUGatsatFactory::setProbabilities | ( | const Mers::Utils::Containers::IntegerArray & | valueMap,
|  | const std::vector< double > & | searchVarProbs |
| ) |  |  |

Sets the cost information that will be used for future calls to createGATSAT. The value map should match the subsequent set of search variables.

Parameters:

  | valueMap | A map that maps a variable UID to an offset into the probability array. This offset is the base index of the variable, so (base + value UID) is the index of the probability of the assignment.
  | searchVarProbs | A list of probabilities that are mapped based on the valueMap.

GATSAT * NUGatsatFactory::createGatsat | ( | const Mers::Models::Base::BaseModelVariableArray & | searchVars,
|  | const Mers::Models::Base::BaseModelVariableArray & | allVars,
|  | const Mers::Models::Base::BaseModelSentence & | theory |
| ) |  |  | const throw (Mers::Utils::Exceptions::RuntimeException)`[virtual]`

Creates a GATSAT object, using the cost information provided or a uniform cost if non has been provided.

Parameters:

  | searchVars | The search variables that will be generated over. Each variable will be considered by the generator.
  | allVars | The list of all variables, often needed by the tester. This should minimally be the union of the search variables with the variables used in the theory.
  | theory | The DNF theory (a set of disjunctive clauses) used by the tester as its basis for testing.

Returns:
  A new GATSAT instance using the specified data. This return value will never be NULL.

Exceptions:

  | RuntimeException | If the specified GATSAT instance could not be created for some reason.

Implements Mers::Solvers::SAT::GATSAT::GatsatFactory.

Definition at line 41 of file NUGatsatFactory.cpp.

References Mers::Utils::Containers::DynamicArray::resize(), and Mers::Utils::Containers::DynamicArray::size().

Referenced by TestSuiteParser::probTest().

Here is the call graph for this function:

virtual Mers::Solvers::SAT::GATSAT::GATSAT* Mers::Solvers::SAT::GATSAT::NUGatsatFactory::createGatsat | ( | const Mers::Models::Base::BaseModelVariableArray & | searchVars,
|  | const Mers::Models::Base::BaseModelVariableArray & | allVars,
|  | const Mers::Models::Base::BaseModelSentence & | theory,
|  | const Mers::Utils::Containers::IntegerArray & | valueMap,
|  | const std::vector< double > & | searchVarProbs |
| ) |  |  | const throw (Mers::Utils::Exceptions::RuntimeException)`[pure virtual]`

Creates a Non-uniform cost GATSAT object.

Parameters:

  | searchVars | The search variables that will be generated over. Each variable will be considered by the generator.
  | allVars | The list of all variables, often needed by the tester. This should minimally be the union of the search variables with the variables used in the theory.
  | theory | The DNF theory (a set of disjunctive clauses) used by the tester as its basis for testing.
  | valueMap | A map that maps a variable UID to an offset into the probability array. This offset is the base index of the variable, so (base + value UID) is the index of the probability of the assignment.
  | searchVarProbs | A list of probabilities that are mapped based on the valueMap.

Returns:
  A new GATSAT instance using the specified data. This return value will never be NULL.

Exceptions:

  | RuntimeException | If the specified GATSAT instance could not be created for some reason.

Implemented in Mers::Solvers::SAT::GATSAT::OpSAT::OpSatFactory, and Mers::Solvers::SAT::GATSAT::VsatBfig::VsatBfigFactory.

## Member Data Documentation

Mers::Utils::Containers::IntegerArray Mers::Solvers::SAT::GATSAT::NUGatsatFactory::m_ValueMap`[protected]`

A map that maps a variable UID to an offset into the probability array. This offset is the base index of the variable, so (base + value UID) is the index of the probability of the assignment.

Definition at line 127 of file NUGatsatFactory.h.

std::vector<double> Mers::Solvers::SAT::GATSAT::NUGatsatFactory::m_SearchVarProbs`[protected]`

A list of probabilities that are mapped based on the valueMap.

Definition at line 131 of file NUGatsatFactory.h.

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

- /Users/fpy/titan-1-5-MBARI/Mers/Solvers/SAT/GATSAT/NUGatsatFactory.h
- /Users/fpy/titan-1-5-MBARI/Mers/Solvers/SAT/GATSAT/NUGatsatFactory.cpp