Ignore:
Timestamp:
Jan 6, 2019 2:43:06 PM (4 months ago)
Author:
unxusr
Message:

formatting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Clp/src/ClpConstraintLinear.hpp

    r1665 r2385  
    1818
    1919public:
     20  ///@name Stuff
     21  //@{
    2022
    21      ///@name Stuff
    22      //@{
    23 
    24 
    25      /** Fills gradient.  If Linear then solution may be NULL,
     23  /** Fills gradient.  If Linear then solution may be NULL,
    2624         also returns true value of function and offset so we can use x not deltaX in constraint
    2725         If refresh is false then uses last solution
     
    2927         Returns non-zero if gradient udefined at current solution
    3028     */
    31      virtual int gradient(const ClpSimplex * model,
    32                           const double * solution,
    33                           double * gradient,
    34                           double & functionValue ,
    35                           double & offset,
    36                           bool useScaling = false,
    37                           bool refresh = true) const ;
    38      /// Resize constraint
    39      virtual void resize(int newNumberColumns) ;
    40      /// Delete columns in  constraint
    41      virtual void deleteSome(int numberToDelete, const int * which) ;
    42      /// Scale constraint
    43      virtual void reallyScale(const double * columnScale) ;
    44      /** Given a zeroed array sets nonlinear columns to 1.
     29  virtual int gradient(const ClpSimplex *model,
     30    const double *solution,
     31    double *gradient,
     32    double &functionValue,
     33    double &offset,
     34    bool useScaling = false,
     35    bool refresh = true) const;
     36  /// Resize constraint
     37  virtual void resize(int newNumberColumns);
     38  /// Delete columns in  constraint
     39  virtual void deleteSome(int numberToDelete, const int *which);
     40  /// Scale constraint
     41  virtual void reallyScale(const double *columnScale);
     42  /** Given a zeroed array sets nonlinear columns to 1.
    4543         Returns number of nonlinear columns
    4644      */
    47      virtual int markNonlinear(char * which) const ;
    48      /** Given a zeroed array sets possible nonzero coefficients to 1.
     45  virtual int markNonlinear(char *which) const;
     46  /** Given a zeroed array sets possible nonzero coefficients to 1.
    4947         Returns number of nonzeros
    5048      */
    51      virtual int markNonzero(char * which) const;
    52      //@}
     49  virtual int markNonzero(char *which) const;
     50  //@}
    5351
     52  ///@name Constructors and destructors
     53  //@{
     54  /// Default Constructor
     55  ClpConstraintLinear();
    5456
    55      ///@name Constructors and destructors
    56      //@{
    57      /// Default Constructor
    58      ClpConstraintLinear();
     57  /// Constructor from constraint
     58  ClpConstraintLinear(int row, int numberCoefficients, int numberColumns,
     59    const int *column, const double *element);
    5960
    60      /// Constructor from constraint
    61      ClpConstraintLinear(int row, int numberCoefficients, int numberColumns,
    62                          const int * column, const double * element);
     61  /** Copy constructor .
     62     */
     63  ClpConstraintLinear(const ClpConstraintLinear &rhs);
    6364
    64      /** Copy constructor .
    65      */
    66      ClpConstraintLinear(const ClpConstraintLinear & rhs);
     65  /// Assignment operator
     66  ClpConstraintLinear &operator=(const ClpConstraintLinear &rhs);
    6767
    68      /// Assignment operator
    69      ClpConstraintLinear & operator=(const ClpConstraintLinear& rhs);
     68  /// Destructor
     69  virtual ~ClpConstraintLinear();
    7070
    71      /// Destructor
    72      virtual ~ClpConstraintLinear ();
     71  /// Clone
     72  virtual ClpConstraint *clone() const;
     73  //@}
     74  ///@name Gets and sets
     75  //@{
     76  /// Number of coefficients
     77  virtual int numberCoefficients() const;
     78  /// Number of columns in linear constraint
     79  inline int numberColumns() const
     80  {
     81    return numberColumns_;
     82  }
     83  /// Columns
     84  inline const int *column() const
     85  {
     86    return column_;
     87  }
     88  /// Coefficients
     89  inline const double *coefficient() const
     90  {
     91    return coefficient_;
     92  }
     93  //@}
    7394
    74      /// Clone
    75      virtual ClpConstraint * clone() const;
    76      //@}
    77      ///@name Gets and sets
    78      //@{
    79      /// Number of coefficients
    80      virtual int numberCoefficients() const;
    81      /// Number of columns in linear constraint
    82      inline int numberColumns() const {
    83           return numberColumns_;
    84      }
    85      /// Columns
    86      inline const int * column() const {
    87           return column_;
    88      }
    89      /// Coefficients
    90      inline const double * coefficient() const {
    91           return coefficient_;
    92      }
    93      //@}
    94 
    95      //---------------------------------------------------------------------------
     95  //---------------------------------------------------------------------------
    9696
    9797private:
    98      ///@name Private member data
    99      /// Column
    100      int * column_;
    101      /// Coefficients
    102      double * coefficient_;
    103      /// Useful to have number of columns about
    104      int numberColumns_;
    105      /// Number of coefficients
    106      int numberCoefficients_;
    107      //@}
     98  ///@name Private member data
     99  /// Column
     100  int *column_;
     101  /// Coefficients
     102  double *coefficient_;
     103  /// Useful to have number of columns about
     104  int numberColumns_;
     105  /// Number of coefficients
     106  int numberCoefficients_;
     107  //@}
    108108};
    109109
    110110#endif
     111
     112/* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
     113*/
Note: See TracChangeset for help on using the changeset viewer.