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

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

# SOSVariableBranchingWeights Class Reference

the SOSVariableBranchingWeights class. More...

`#include <OSOption.h>`

Collaboration diagram for SOSVariableBranchingWeights:

[legend]
List of all members.

## Public Member Functions
| SOSVariableBranchingWeights ()
| Default constructor.
| ~SOSVariableBranchingWeights ()
| Class destructor.
bool | IsEqual (SOSVariableBranchingWeights *that)
| A function to check for the equality of two objects.
bool | setRandom (double density, bool conformant)
| A function to make a random instance of this class.
bool | setSOS (int numberOfSOS, SOSWeights **sos)
| A function to set an array of <sos> elements.
bool | addSOS (int sosIdx, int nvar, double weight, int *idx, double *value)
| A function to add an <sos> element.
## Public Attributes
int | numberOfSOS
| number of <sos> children
SOSWeights ** | sos
| branching weights for the SOS

## Detailed Description

the SOSVariableBranchingWeights class.

Author:
  Robert Fourer, Gus 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 1595 of file OSOption.h.

## Constructor & Destructor Documentation

SOSVariableBranchingWeights::SOSVariableBranchingWeights | ( |  | ) |

Default constructor.

Definition at line 628 of file OSOption.cpp.

References sos.

SOSVariableBranchingWeights::~SOSVariableBranchingWeights | ( |  | ) |

Class destructor.

Definition at line 637 of file OSOption.cpp.

References numberOfSOS, and sos.

## Member Function Documentation

bool SOSVariableBranchingWeights::IsEqual | ( | SOSVariableBranchingWeights * | that | ) |

A function to check for the equality of two objects.

Definition at line 9243 of file OSOption.cpp.

References numberOfSOS, and sos.

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" atrbutes and <XXX> children)

Definition at line 10763 of file OSOption.cpp.

References numberOfSOS, OSRand(), SOSWeights::setRandom(), and sos.

Referenced by VariableOption::setRandom().

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

Definition at line 4949 of file OSOption.cpp.

References ErrorClass::errormsg, SOSWeights::groupWeight, SOSWeights::numberOfVar, sos, SOSWeights::sosIdx, and SOSWeights::var.

Referenced by OSOption::setSOSVariableBranchingWeights().

bool SOSVariableBranchingWeights::addSOS | ( | int | sosIdx,
|  | int | nvar,
|  | double | weight,
|  | int * | idx,
|  | double * | value |
| ) |  |  |

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

Definition at line 4994 of file OSOption.cpp.

References ErrorClass::errormsg, SOSWeights::groupWeight, BranchingWeight::idx, numberOfSOS, SOSWeights::numberOfVar, sos, SOSWeights::sosIdx, BranchingWeight::value, and SOSWeights::var.

Referenced by OSOption::setAnotherSOSVariableBranchingWeight().

## Member Data Documentation

int SOSVariableBranchingWeights::numberOfSOS

number of <sos> children

Definition at line 1599 of file OSOption.h.

Referenced by addSOS(), OSOption::getNumberOfSOS(), OSOption::getNumberOfSOSVarBranchingWeights(), IsEqual(), setRandom(), OSOption::setSOSVariableBranchingWeights(), and ~SOSVariableBranchingWeights().

SOSWeights** SOSVariableBranchingWeights::sos

branching weights for the SOS

Definition at line 1602 of file OSOption.h.

Referenced by addSOS(), OSOption::getNumberOfSOSVarBranchingWeights(), OSOption::getSOSVariableBranchingWeightsSparse(), IsEqual(), setRandom(), setSOS(), SOSVariableBranchingWeights(), and ~SOSVariableBranchingWeights().

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

- /home/coin/SVN-release/OS-2.3.5/OS/src/OSCommonInterfaces/OSOption.h
- /home/coin/SVN-release/OS-2.3.5/OS/src/OSCommonInterfaces/OSOption.cpp