OS  2.9.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Public Attributes | List of all members
SOSVariableBranchingWeights Class Reference

the SOSVariableBranchingWeights class. More...

#include <OSOption.h>

+ Collaboration diagram for SOSVariableBranchingWeights:

Public Member Functions

 SOSVariableBranchingWeights ()
 Default constructor. More...
 
 ~SOSVariableBranchingWeights ()
 Class destructor. More...
 
bool IsEqual (SOSVariableBranchingWeights *that)
 A function to check for the equality of two objects. More...
 
bool setRandom (double density, bool conformant)
 A function to make a random instance of this class. More...
 
bool deepCopyFrom (SOSVariableBranchingWeights *that)
 A function to make a deep copy of an instance of this class. More...
 
bool setSOS (int numberOfSOS, SOSWeights **sos)
 A function to set an array of <sos> elements. More...
 
bool addSOS (int sosIdx, int nvar, double weight, int *idx, double *value, std::string *name)
 A function to add an <sos> element. More...
 

Public Attributes

int numberOfSOS
 number of <sos> children More...
 
SOSWeights ** sos
 branching weights for the SOS More...
 

Detailed Description

the SOSVariableBranchingWeights class.

Author
Robert Fourer, Horand Gassmann, Jun Ma, Kipp Martin
Version
1.0, 21/11/2008
Since
OS 1.1
Remarks
A data structure class that corresponds to an xml element in the OSoL schema.

Definition at line 1853 of file OSOption.h.

Constructor & Destructor Documentation

SOSVariableBranchingWeights::SOSVariableBranchingWeights ( )

Default constructor.

SOSVariableBranchingWeights::~SOSVariableBranchingWeights ( )

Class destructor.

Member Function Documentation

bool SOSVariableBranchingWeights::IsEqual ( SOSVariableBranchingWeights that)

A function to check for the equality of two objects.

bool SOSVariableBranchingWeights::setRandom ( double  density,
bool  conformant 
)

A function to make a random instance of this class.

Parameters
density,:corresponds to the probability that a particular child element is created
conformant,:if true enforces side constraints not enforceable in the schema (e.g., agreement of "numberOfXXX" attributes and <XXX> children)
bool SOSVariableBranchingWeights::deepCopyFrom ( SOSVariableBranchingWeights that)

A function to make a deep copy of an instance of this class.

Parameters
that,:the instance from which information is to be copied
Returns
whether the copy was created successfully
bool SOSVariableBranchingWeights::setSOS ( int  numberOfSOS,
SOSWeights **  sos 
)

A function to set an array of <sos> elements.

Parameters
numberOfSOS,:number of <sos> elements to be set
sos,:the array of <sos> elements that are to be set
bool SOSVariableBranchingWeights::addSOS ( int  sosIdx,
int  nvar,
double  weight,
int *  idx,
double *  value,
std::string *  name 
)

A function to add an <sos> element.

Parameters
sosIdx,:the index of the SOS that is to be added (refer back to OSiL file)
nvar,:the number of variables in this SOS that are to be given weights
weight,:a selection weight for the entire group of variables
idx,:an array of variable indices
value,:the array of corresponding selection weights

Member Data Documentation

int SOSVariableBranchingWeights::numberOfSOS

number of <sos> children

Definition at line 1858 of file OSOption.h.

SOSWeights** SOSVariableBranchingWeights::sos

branching weights for the SOS

Definition at line 1861 of file OSOption.h.


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