source: trunk/Clp/examples/myPdco.hpp @ 1362

Last change on this file since 1362 was 1171, checked in by forrest, 12 years ago

put back pdco in case wanted

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