24 typedef std::has_map<matEntry, matIdx, std::hash< matEntry> >
AdjustableMat;
56 double eval_f(
const double *x,
bool new_x);
63 void eval_grad(
const int nnz,
const double * x,
bool new_x,
double * values);
89 void internal_eval_grad(
const double *x);
104 typedef std::has_map<int, std::pair<double, double >, std::hash<int> > gStore;
106 typedef std::map<int, std::pair<double, double> > gStore;
111 std::vector<gStore::iterator> a_grad_idx_;
113 std::vector<gStore::iterator> Q_row_grad_idx_;
115 std::vector<gStore::iterator> Q_col_grad_idx_;
117 std::vector<AdjustableMat::iterator> Q_hessian_idx_;
Stores a quadratic row of the form l < c + ax + x^T Q x < u.
QuadRow & operator=(const OsiRowCut &rhs)
Assignment form a linear &cut.
QuadRow(const OsiRowCut &cut)
Constructor from a linear cut.
void print()
Print quadratic constraint.
double eval_f(const double *x, bool new_x)
Evaluate quadratic form.
QuadRow()
Default constructor.
void gradiant_struct(const int nnz, int *indices, bool offset)
Get structure of gradiant.
bool isLinear()
Says if the constraint is linear.
QuadRow(const QuadCut &cut)
Constructor from a quadratic cut.
void add_to_hessian(AdjustableMat &H, bool offset)
Add row to a bigger hessian.
int nnz_grad()
Get number of non-zeroes in the gradiant.
QuadRow & operator=(const QuadRow &rhs)
Assignment operator.
QuadRow(const QuadRow &other)
Copy constructor.
void eval_grad(const int nnz, const double *x, bool new_x, double *values)
Evaluate gradiant of quadratic form.
int nnz_hessian()
number of non-zeroes in hessian.
void remove_from_hessian(AdjustableMat &H)
Remove row from a bigger hessian.
QuadRow & operator=(const QuadCut &rhs)
Assignment form a quadrattic &cut.
void eval_hessian(double lambda, double *values)
Return hessian value (i.e.
(C) Copyright International Business Machines Corporation 2007
std::map< matEntry, matIdx > AdjustableMat
std::pair< int, int > matEntry
Store column and row of the entry.
std::pair< int, int > matIdx
Store the number of times entry is used and its index in the matrix.