source: stable/1.13/Clp/examples/myPdco.hpp @ 1898

Last change on this file since 1898 was 1552, checked in by mjs, 10 years ago

Format examples with 'astyle -A4 -p'.

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