source: trunk/Clp/examples/myPdco.hpp

Last change on this file was 1662, checked in by lou, 8 years ago

Add EPL license notice in examples.

  • Property svn:keywords set to Id
File size: 1.8 KB
Line 
1/* $Id: myPdco.hpp 1662 2011-01-04 17:52:40Z forrest $ */
2// Copyright (C) 2003, International Business Machines
3// Corporation and others.  All Rights Reserved.
4// This code is licensed under the terms of the Eclipse Public License (EPL).
5
6#ifndef myPdco_H
7#define myPdco_H
8
9
10#include "CoinPragma.hpp"
11
12#include "ClpPdcoBase.hpp"
13
14/** This implements a simple network matrix as derived from ClpMatrixBase.
15
16If you want more sophisticated version then you could inherit from this.
17Also you might want to allow networks with gain */
18
19class myPdco : public ClpPdcoBase {
20
21public:
22     /**@name Useful methods */
23     //@{
24     virtual void matVecMult(ClpInterior * model, int mode, double * x, double * y) const;
25
26     virtual void getGrad(ClpInterior * model, CoinDenseVector<double> &x, CoinDenseVector<double> &grad) const;
27
28     virtual void getHessian(ClpInterior * model, CoinDenseVector<double> &x, CoinDenseVector<double> &H) const;
29
30     virtual double getObj(ClpInterior * model, CoinDenseVector<double> &x) const;
31
32     virtual void matPrecon(ClpInterior * model,  double delta, double * x, double * y) const ;
33     //@}
34
35
36     /**@name Constructors, destructor */
37     //@{
38     /** Default constructor. */
39     myPdco();
40     /** Constructor from Stuff */
41     myPdco(double d1, double d2,
42            int numnodes, int numlinks);
43     /// Also reads a model
44     myPdco(ClpInterior & model, FILE * fpData, FILE * fpParam);
45     /** Destructor */
46     virtual ~myPdco();
47     //@}
48
49     /**@name Copy method */
50     //@{
51     /** The copy constructor. */
52     myPdco(const myPdco&);
53
54     myPdco& operator=(const myPdco&);
55     /// Clone
56     virtual ClpPdcoBase * clone() const ;
57     //@}
58
59
60protected:
61     /**@name Data members
62        The data members are protected to allow access for derived classes. */
63     //@{
64     int * rowIndex_;
65     int numlinks_;
66     int numnodes_;
67
68     //@}
69};
70
71#endif
Note: See TracBrowser for help on using the repository browser.