/usr/include/coin/ClpLinearObjective.hpp is in coinor-libclp-dev 1.12.0-2.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 | /* $Id: ClpLinearObjective.hpp 1525 2010-02-26 17:27:59Z mjs $ */
// Copyright (C) 2003, International Business Machines
// Corporation and others. All Rights Reserved.
#ifndef ClpLinearObjective_H
#define ClpLinearObjective_H
#include "ClpObjective.hpp"
//#############################################################################
/** Linear Objective Class
*/
class ClpLinearObjective : public ClpObjective {
public:
///@name Stuff
//@{
/** Returns gradient. If Linear then solution may be NULL,
also returns an offset (to be added to current one)
If refresh is false then uses last solution
Uses model for scaling
includeLinear 0 - no, 1 as is, 2 as feasible
*/
virtual double * gradient(const ClpSimplex * model,
const double * solution, double & offset, bool refresh,
int includeLinear = 2);
/** Returns reduced gradient.Returns an offset (to be added to current one).
*/
virtual double reducedGradient(ClpSimplex * model, double * region,
bool useFeasibleCosts);
/** Returns step length which gives minimum of objective for
solution + theta * change vector up to maximum theta.
arrays are numberColumns+numberRows
Also sets current objective, predicted and at maximumTheta
*/
virtual double stepLength(ClpSimplex * model,
const double * solution,
const double * change,
double maximumTheta,
double & currentObj,
double & predictedObj,
double & thetaObj);
/// Return objective value (without any ClpModel offset) (model may be NULL)
virtual double objectiveValue(const ClpSimplex * model, const double * solution) const ;
/// Resize objective
virtual void resize(int newNumberColumns) ;
/// Delete columns in objective
virtual void deleteSome(int numberToDelete, const int * which) ;
/// Scale objective
virtual void reallyScale(const double * columnScale) ;
//@}
///@name Constructors and destructors
//@{
/// Default Constructor
ClpLinearObjective();
/// Constructor from objective
ClpLinearObjective(const double * objective, int numberColumns);
/// Copy constructor
ClpLinearObjective(const ClpLinearObjective &);
/** Subset constructor. Duplicates are allowed
and order is as given.
*/
ClpLinearObjective (const ClpLinearObjective &rhs, int numberColumns,
const int * whichColumns) ;
/// Assignment operator
ClpLinearObjective & operator=(const ClpLinearObjective& rhs);
/// Destructor
virtual ~ClpLinearObjective ();
/// Clone
virtual ClpObjective * clone() const;
/** Subset clone. Duplicates are allowed
and order is as given.
*/
virtual ClpObjective * subsetClone (int numberColumns,
const int * whichColumns) const;
//@}
//---------------------------------------------------------------------------
private:
///@name Private member data
/// Objective
double * objective_;
/// number of columns
int numberColumns_;
//@}
};
#endif
|