# CbcHeuristicCrossover Class Reference

Crossover Search class. More...

`#include <CbcHeuristicLocal.hpp>`

Inheritance diagram for CbcHeuristicCrossover:
[legend]
Collaboration diagram for CbcHeuristicCrossover:
[legend]

List of all members.

## Public Member Functions
| CbcHeuristicCrossover ()
| CbcHeuristicCrossover (CbcModel &model)
| CbcHeuristicCrossover (const CbcHeuristicCrossover &)
| ~CbcHeuristicCrossover ()
virtual CbcHeuristic * | clone () const
| Clone.
CbcHeuristicCrossover & | operator= (const CbcHeuristicCrossover &rhs)
| Assignment operator.
virtual void | generateCpp (FILE *fp)
| Create C++ lines to get to current state.
virtual void | resetModel (CbcModel *model)
| Resets stuff if model changes.
virtual void | setModel (CbcModel *model)
| update model (This is needed if cliques update matrix etc)
virtual int | solution (double &objectiveValue, double *newSolution)
| returns 0 if no solution, 1 if valid solution.
void | setNumberSolutions (int value)
| Sets number of solutions to use.
## Protected Attributes
std::vector< double > | attempts_
| Attempts.
double | random_ [10]
| Random numbers to stop same search happening.
int | numberSolutions_
| Number of solutions so we only do after new solution.
int | useNumber_
| Number of solutions to use.

## Detailed Description

Crossover Search class.

Definition at line 151 of file CbcHeuristicLocal.hpp.

## Constructor & Destructor Documentation

CbcHeuristicCrossover::CbcHeuristicCrossover | ( |  | ) |

CbcHeuristicCrossover::CbcHeuristicCrossover | ( | CbcModel & | model | ) |

CbcHeuristicCrossover::CbcHeuristicCrossover | ( | const CbcHeuristicCrossover & |  | ) |

CbcHeuristicCrossover::~CbcHeuristicCrossover | ( |  | ) |

## Member Function Documentation

virtual CbcHeuristic* CbcHeuristicCrossover::clone | ( |  | ) | const`[virtual]`

Clone.

Implements CbcHeuristic.

CbcHeuristicCrossover& CbcHeuristicCrossover::operator= | ( | const CbcHeuristicCrossover & | rhs | ) |

Assignment operator.

Reimplemented from CbcHeuristic.

virtual void CbcHeuristicCrossover::generateCpp | ( | FILE * | fp | ) | `[virtual]`

Create C++ lines to get to current state.

Reimplemented from CbcHeuristic.

virtual void CbcHeuristicCrossover::resetModel | ( | CbcModel * | model | ) | `[virtual]`

Resets stuff if model changes.

Implements CbcHeuristic.

virtual void CbcHeuristicCrossover::setModel | ( | CbcModel * | model | ) | `[virtual]`

update model (This is needed if cliques update matrix etc)

Reimplemented from CbcHeuristic.

virtual int CbcHeuristicCrossover::solution | ( | double & | objectiveValue,
|  | double * | newSolution |
| ) |  |  | `[virtual]`

returns 0 if no solution, 1 if valid solution.

Fix variables if agree in useNumber_ solutions when_ 0 off, 1 only at new solutions, 2 also every now and then add 10 to make only if agree at lower bound

Implements CbcHeuristic.

void CbcHeuristicCrossover::setNumberSolutions | ( | int | value | ) | `[inline]`

Sets number of solutions to use.

Definition at line 193 of file CbcHeuristicLocal.hpp.

## Member Data Documentation

std::vector<double> CbcHeuristicCrossover::attempts_`[protected]`

Attempts.

Definition at line 201 of file CbcHeuristicLocal.hpp.

double CbcHeuristicCrossover::random_[10]`[protected]`

Random numbers to stop same search happening.

Definition at line 203 of file CbcHeuristicLocal.hpp.

int CbcHeuristicCrossover::numberSolutions_`[protected]`

Number of solutions so we only do after new solution.

Definition at line 205 of file CbcHeuristicLocal.hpp.

int CbcHeuristicCrossover::useNumber_`[protected]`

Number of solutions to use.

Definition at line 207 of file CbcHeuristicLocal.hpp.

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

- /home/coin/svn-release/Cbc-2.7.7/Cbc/src/CbcHeuristicLocal.hpp

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines