CbcParam Class Reference

Very simple class for setting parameters. More...

#include <CbcParam.hpp>

List of all members.

Public Member Functions

Constructor and destructor

 CbcParam ()
 Constructors.
 CbcParam (std::string name, std::string help, double lower, double upper, CbcParameterType type, bool display=true)
 Constructors.
 CbcParam (std::string name, std::string help, int lower, int upper, CbcParameterType type, bool display=true)
 Constructors.
 CbcParam (std::string name, std::string help, std::string firstValue, CbcParameterType type, int defaultIndex=0, bool display=true)
 Constructors.
 CbcParam (std::string name, std::string help, CbcParameterType type, int indexNumber=-1, bool display=true)
 Constructors.
 CbcParam (const CbcParam &)
 Copy constructor.
CbcParamoperator= (const CbcParam &rhs)
 Assignment operator. This copies the data.
 ~CbcParam ()
 Destructor.

Private Attributes

data

We might as well throw all type data in - could derive?

CbcParameterType type_
 If double == okay.
double lowerDoubleValue_
 If double == okay.
double upperDoubleValue_
 If double == okay.
int lowerIntValue_
 If int == okay.
int upperIntValue_
 If double == okay.
unsigned int lengthName_
 If double == okay.
unsigned int lengthMatch_
 If double == okay.
std::vector< std::string > definedKeyWords_
 set of valid strings
std::string name_
 Name.
std::string shortHelp_
 Short help.
std::string longHelp_
 Long help.
CbcParameterType action_
 Action.
int currentKeyWord_
 Current keyWord (if a keyword parameter).
bool display_
 Display on ?
int intValue_
 Integer parameter - current value.
double doubleValue_
 Double parameter - current value.
std::string stringValue_
 String parameter - current value.
int indexNumber_
 index number to use for display purposes

stuff



void append (std::string keyWord)
 Insert string (only valid for keywords).
void addHelp (std::string keyWord)
 Adds one help line.
std::string name () const
 Returns name.
std::string shortHelp () const
 Returns short help.
int setDoubleParameter (CbcModel &model, double value) const
 Sets a double parameter (nonzero code if error).
double doubleParameter (CbcModel &model) const
 Gets a double parameter.
int setIntParameter (CbcModel &model, int value) const
 Sets a int parameter (nonzero code if error).
int intParameter (CbcModel &model) const
 Gets a int parameter.
int setDoubleParameter (ClpSimplex *model, double value) const
 Sets a double parameter (nonzero code if error).
double doubleParameter (ClpSimplex *model) const
 Gets a double parameter.
int setIntParameter (ClpSimplex *model, int value) const
 Sets a int parameter (nonzero code if error).
int intParameter (ClpSimplex *model) const
 Gets a int parameter.
int setDoubleParameter (OsiSolverInterface *model, double value) const
 Sets a double parameter (nonzero code if error).
double doubleParameter (OsiSolverInterface *model) const
 Gets a double parameter.
int setIntParameter (OsiSolverInterface *model, int value) const
 Sets a int parameter (nonzero code if error).
int intParameter (OsiSolverInterface *model) const
 Gets a int parameter.
int checkDoubleParameter (double value) const
 Checks a double parameter (nonzero code if error).
std::string matchName () const
 Returns name which could match.
int parameterOption (std::string check) const
 Returns parameter option which matches (-1 if none).
void printOptions () const
 Prints parameter options.
std::string currentOption () const
 Returns current parameter option.
void setCurrentOption (int value)
 Sets current parameter option.
void setIntValue (int value)
 Sets int value.
int intValue () const
 Insert string (only valid for keywords).
void setDoubleValue (double value)
 Sets double value.
double doubleValue () const
 Insert string (only valid for keywords).
void setStringValue (std::string value)
 Sets string value.
std::string stringValue () const
 Insert string (only valid for keywords).
int matches (std::string input) const
 Returns 1 if matches minimum, 2 if matches less, 0 if not matched.
CbcParameterType type () const
 type
bool displayThis () const
 whether to display
void setLonghelp (const std::string help)
 Set Long help.
void printLongHelp () const
 Print Long help.
void printString () const
 Print action and string.
int indexNumber () const
 type for classification
void gutsOfConstructor ()
 gutsOfConstructor

Detailed Description

Very simple class for setting parameters.

Definition at line 152 of file CbcParam.hpp.


Constructor & Destructor Documentation

CbcParam::CbcParam (  ) 

Constructors.

CbcParam::CbcParam ( std::string  name,
std::string  help,
double  lower,
double  upper,
CbcParameterType  type,
bool  display = true 
)

Constructors.

CbcParam::CbcParam ( std::string  name,
std::string  help,
int  lower,
int  upper,
CbcParameterType  type,
bool  display = true 
)

Constructors.

CbcParam::CbcParam ( std::string  name,
std::string  help,
std::string  firstValue,
CbcParameterType  type,
int  defaultIndex = 0,
bool  display = true 
)

Constructors.

CbcParam::CbcParam ( std::string  name,
std::string  help,
CbcParameterType  type,
int  indexNumber = -1,
bool  display = true 
)

Constructors.

CbcParam::CbcParam ( const CbcParam  ) 

Copy constructor.

CbcParam::~CbcParam (  ) 

Destructor.


Member Function Documentation

CbcParam& CbcParam::operator= ( const CbcParam rhs  ) 

Assignment operator. This copies the data.

void CbcParam::append ( std::string  keyWord  ) 

Insert string (only valid for keywords).

void CbcParam::addHelp ( std::string  keyWord  ) 

Adds one help line.

std::string CbcParam::name (  )  const [inline]

Returns name.

Definition at line 185 of file CbcParam.hpp.

std::string CbcParam::shortHelp (  )  const [inline]

Returns short help.

Definition at line 189 of file CbcParam.hpp.

int CbcParam::setDoubleParameter ( CbcModel model,
double  value 
) const

Sets a double parameter (nonzero code if error).

double CbcParam::doubleParameter ( CbcModel model  )  const

Gets a double parameter.

int CbcParam::setIntParameter ( CbcModel model,
int  value 
) const

Sets a int parameter (nonzero code if error).

int CbcParam::intParameter ( CbcModel model  )  const

Gets a int parameter.

int CbcParam::setDoubleParameter ( ClpSimplex *  model,
double  value 
) const

Sets a double parameter (nonzero code if error).

double CbcParam::doubleParameter ( ClpSimplex *  model  )  const

Gets a double parameter.

int CbcParam::setIntParameter ( ClpSimplex *  model,
int  value 
) const

Sets a int parameter (nonzero code if error).

int CbcParam::intParameter ( ClpSimplex *  model  )  const

Gets a int parameter.

int CbcParam::setDoubleParameter ( OsiSolverInterface *  model,
double  value 
) const

Sets a double parameter (nonzero code if error).

double CbcParam::doubleParameter ( OsiSolverInterface *  model  )  const

Gets a double parameter.

int CbcParam::setIntParameter ( OsiSolverInterface *  model,
int  value 
) const

Sets a int parameter (nonzero code if error).

int CbcParam::intParameter ( OsiSolverInterface *  model  )  const

Gets a int parameter.

int CbcParam::checkDoubleParameter ( double  value  )  const

Checks a double parameter (nonzero code if error).

std::string CbcParam::matchName (  )  const

Returns name which could match.

int CbcParam::parameterOption ( std::string  check  )  const

Returns parameter option which matches (-1 if none).

void CbcParam::printOptions (  )  const

Prints parameter options.

std::string CbcParam::currentOption (  )  const [inline]

Returns current parameter option.

Definition at line 225 of file CbcParam.hpp.

void CbcParam::setCurrentOption ( int  value  )  [inline]

Sets current parameter option.

Definition at line 229 of file CbcParam.hpp.

void CbcParam::setIntValue ( int  value  )  [inline]

Sets int value.

Definition at line 233 of file CbcParam.hpp.

int CbcParam::intValue (  )  const [inline]

Insert string (only valid for keywords).

Definition at line 236 of file CbcParam.hpp.

void CbcParam::setDoubleValue ( double  value  )  [inline]

Sets double value.

Definition at line 240 of file CbcParam.hpp.

double CbcParam::doubleValue (  )  const [inline]

Insert string (only valid for keywords).

Definition at line 243 of file CbcParam.hpp.

void CbcParam::setStringValue ( std::string  value  )  [inline]

Sets string value.

Definition at line 247 of file CbcParam.hpp.

std::string CbcParam::stringValue (  )  const [inline]

Insert string (only valid for keywords).

Definition at line 250 of file CbcParam.hpp.

int CbcParam::matches ( std::string  input  )  const

Returns 1 if matches minimum, 2 if matches less, 0 if not matched.

CbcParameterType CbcParam::type (  )  const [inline]

type

Definition at line 256 of file CbcParam.hpp.

bool CbcParam::displayThis (  )  const [inline]

whether to display

Definition at line 260 of file CbcParam.hpp.

void CbcParam::setLonghelp ( const std::string  help  )  [inline]

Set Long help.

Definition at line 264 of file CbcParam.hpp.

void CbcParam::printLongHelp (  )  const

Print Long help.

void CbcParam::printString (  )  const

Print action and string.

int CbcParam::indexNumber (  )  const [inline]

type for classification

Definition at line 272 of file CbcParam.hpp.

void CbcParam::gutsOfConstructor (  )  [private]

gutsOfConstructor


Member Data Documentation

If double == okay.

Definition at line 287 of file CbcParam.hpp.

double CbcParam::lowerDoubleValue_ [private]

If double == okay.

Definition at line 289 of file CbcParam.hpp.

double CbcParam::upperDoubleValue_ [private]

If double == okay.

Definition at line 290 of file CbcParam.hpp.

int CbcParam::lowerIntValue_ [private]

If int == okay.

Definition at line 292 of file CbcParam.hpp.

int CbcParam::upperIntValue_ [private]

If double == okay.

Definition at line 293 of file CbcParam.hpp.

unsigned int CbcParam::lengthName_ [private]

If double == okay.

Definition at line 295 of file CbcParam.hpp.

unsigned int CbcParam::lengthMatch_ [private]

If double == okay.

Definition at line 297 of file CbcParam.hpp.

std::vector<std::string> CbcParam::definedKeyWords_ [private]

set of valid strings

Definition at line 299 of file CbcParam.hpp.

std::string CbcParam::name_ [private]

Name.

Definition at line 301 of file CbcParam.hpp.

std::string CbcParam::shortHelp_ [private]

Short help.

Definition at line 303 of file CbcParam.hpp.

std::string CbcParam::longHelp_ [private]

Long help.

Definition at line 305 of file CbcParam.hpp.

Action.

Definition at line 307 of file CbcParam.hpp.

Current keyWord (if a keyword parameter).

Definition at line 309 of file CbcParam.hpp.

bool CbcParam::display_ [private]

Display on ?

Definition at line 311 of file CbcParam.hpp.

int CbcParam::intValue_ [private]

Integer parameter - current value.

Definition at line 313 of file CbcParam.hpp.

double CbcParam::doubleValue_ [private]

Double parameter - current value.

Definition at line 315 of file CbcParam.hpp.

std::string CbcParam::stringValue_ [private]

String parameter - current value.

Definition at line 317 of file CbcParam.hpp.

int CbcParam::indexNumber_ [private]

index number to use for display purposes

Definition at line 319 of file CbcParam.hpp.


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