| 
    Bonmin
    1.8.8
    
   | 
 
Stores a quadratic row of the form l < c + ax + x^T Q x < u. More...
#include <BonQuadRow.hpp>
Public Member Functions | |
| QuadRow () | |
| Default constructor.  More... | |
| QuadRow (const QuadRow &other) | |
| Copy constructor.  More... | |
| QuadRow & | operator= (const QuadRow &rhs) | 
| Assignment operator.  More... | |
| QuadRow (const QuadCut &cut) | |
| Constructor from a quadratic cut.  More... | |
| QuadRow & | operator= (const QuadCut &rhs) | 
| Assignment form a quadrattic &cut.  More... | |
| QuadRow (const OsiRowCut &cut) | |
| Constructor from a linear cut.  More... | |
| QuadRow & | operator= (const OsiRowCut &rhs) | 
| Assignment form a linear &cut.  More... | |
| double | eval_f (const double *x, bool new_x) | 
| Evaluate quadratic form.  More... | |
| int | nnz_grad () | 
| Get number of non-zeroes in the gradiant.  More... | |
| void | gradiant_struct (const int nnz, int *indices, bool offset) | 
| Get structure of gradiant.  More... | |
| void | eval_grad (const int nnz, const double *x, bool new_x, double *values) | 
| Evaluate gradiant of quadratic form.  More... | |
| int | nnz_hessian () | 
| number of non-zeroes in hessian.  More... | |
| bool | isLinear () | 
| Says if the constraint is linear.  More... | |
| void | eval_hessian (double lambda, double *values) | 
| Return hessian value (i.e.  More... | |
| void | add_to_hessian (AdjustableMat &H, bool offset) | 
| Add row to a bigger hessian.  More... | |
| void | remove_from_hessian (AdjustableMat &H) | 
| Remove row from a bigger hessian.  More... | |
| void | print () | 
| Print quadratic constraint.  More... | |
Private Types | |
| typedef std::map< int,  std::pair< double, double > >  | gStore | 
Private Member Functions | |
| void | initialize () | 
| Initialize once quadratic form is know.  More... | |
| void | internal_eval_grad (const double *x) | 
| Does internal work to evaluate gradiant of this in x.  More... | |
Private Attributes | |
| double | lb_ | 
| lower bound.  More... | |
| double | ub_ | 
| upper bound.  More... | |
| double | c_ | 
| Constant term.  More... | |
| CoinPackedVector | a_ | 
| linear term in sparse storage.  More... | |
| TMat | Q_ | 
| Quadratic term.  More... | |
| gStore | g_ | 
| std::vector< gStore::iterator > | a_grad_idx_ | 
| To have fast access to gradiant entries for a_.  More... | |
| std::vector< gStore::iterator > | Q_row_grad_idx_ | 
| To have fast access to gradient entries for rows Q_.  More... | |
| std::vector< gStore::iterator > | Q_col_grad_idx_ | 
| To have fast access to gradient entries for cols Q_.  More... | |
| std::vector < AdjustableMat::iterator >  | Q_hessian_idx_ | 
| To have fast access to entries in full hessian of Q_.  More... | |
| bool | grad_evaled_ | 
| Flag indicating if gradiant has been evaluated.  More... | |
Stores a quadratic row of the form l < c + ax + x^T Q x < u.
Does computation usefull for nlp-solver. It can only be initialized from a QuadCut.
Definition at line 32 of file BonQuadRow.hpp.
      
  | 
  private | 
Definition at line 106 of file BonQuadRow.hpp.
| Bonmin::QuadRow::QuadRow | ( | ) | 
Default constructor.
| Bonmin::QuadRow::QuadRow | ( | const QuadRow & | other | ) | 
Copy constructor.
| Bonmin::QuadRow::QuadRow | ( | const QuadCut & | cut | ) | 
Constructor from a quadratic cut.
| Bonmin::QuadRow::QuadRow | ( | const OsiRowCut & | cut | ) | 
Constructor from a linear cut.
| QuadRow& Bonmin::QuadRow::operator= | ( | const OsiRowCut & | rhs | ) | 
Assignment form a linear &cut.
| double Bonmin::QuadRow::eval_f | ( | const double * | x, | 
| bool | new_x | ||
| ) | 
Evaluate quadratic form.
| int Bonmin::QuadRow::nnz_grad | ( | ) | 
Get number of non-zeroes in the gradiant.
| void Bonmin::QuadRow::gradiant_struct | ( | const int | nnz, | 
| int * | indices, | ||
| bool | offset | ||
| ) | 
Get structure of gradiant.
| void Bonmin::QuadRow::eval_grad | ( | const int | nnz, | 
| const double * | x, | ||
| bool | new_x, | ||
| double * | values | ||
| ) | 
Evaluate gradiant of quadratic form.
      
  | 
  inline | 
number of non-zeroes in hessian.
Definition at line 66 of file BonQuadRow.hpp.
References Bonmin::TMat::nnz_, and Q_.
      
  | 
  inline | 
Says if the constraint is linear.
Definition at line 70 of file BonQuadRow.hpp.
References Bonmin::TMat::nnz_, and Q_.
| void Bonmin::QuadRow::eval_hessian | ( | double | lambda, | 
| double * | values | ||
| ) | 
Return hessian value (i.e.
Q_).
| void Bonmin::QuadRow::add_to_hessian | ( | AdjustableMat & | H, | 
| bool | offset | ||
| ) | 
Add row to a bigger hessian.
| void Bonmin::QuadRow::remove_from_hessian | ( | AdjustableMat & | H | ) | 
Remove row from a bigger hessian.
| void Bonmin::QuadRow::print | ( | ) | 
Print quadratic constraint.
      
  | 
  private | 
Initialize once quadratic form is know.
      
  | 
  private | 
Does internal work to evaluate gradiant of this in x.
      
  | 
  private | 
lower bound.
Definition at line 92 of file BonQuadRow.hpp.
      
  | 
  private | 
upper bound.
Definition at line 94 of file BonQuadRow.hpp.
      
  | 
  private | 
Constant term.
Definition at line 96 of file BonQuadRow.hpp.
      
  | 
  private | 
linear term in sparse storage.
Definition at line 98 of file BonQuadRow.hpp.
      
  | 
  private | 
Quadratic term.
Definition at line 100 of file BonQuadRow.hpp.
Referenced by isLinear(), and nnz_hessian().
      
  | 
  private | 
Definition at line 109 of file BonQuadRow.hpp.
      
  | 
  private | 
To have fast access to gradiant entries for a_.
Definition at line 111 of file BonQuadRow.hpp.
      
  | 
  private | 
To have fast access to gradient entries for rows Q_.
Definition at line 113 of file BonQuadRow.hpp.
      
  | 
  private | 
To have fast access to gradient entries for cols Q_.
Definition at line 115 of file BonQuadRow.hpp.
      
  | 
  private | 
To have fast access to entries in full hessian of Q_.
Definition at line 117 of file BonQuadRow.hpp.
      
  | 
  private | 
Flag indicating if gradiant has been evaluated.
Definition at line 119 of file BonQuadRow.hpp.
 1.8.5