SparsityInfo Class Reference
A class to represent the sparsity structure of a function.
More...
#include <func.h>
List of all members.
Classes |
class | LinearVariable |
| To represent a linear variable. More...
|
class | NonlinearConnection |
| To represent a connection (entry in hessian) between two nonlinear variables. More...
|
class | NonlinearVariable |
| To represent a nonlinear variable. More...
|
class | QuadraticVariable |
| To represent a quadratic variable. More...
|
Public Member Functions |
| SparsityInfo (int init_level=0) |
| SparsityInfo (const SparsityInfo &si) |
| SparsityInfo (const SparsityInfo &si1, const SparsityInfo &si2) |
| Joins two sparsity infos into one new.
|
bool | compute_sparsity_pattern (const Func &f, const vector< dvector > &sample_set) |
void | add (const UserVector< double > &b) |
void | add (const UserVector< double > &b, const ivector &block) |
void | add (const UserMatrix &A) |
void | add (const UserMatrix &A, const ivector &block) |
void | add (const SparsityInfo &si) |
void | add (const SparsityInfo &si, const ivector &block) |
int | nr_var (bool linear_=true, bool nonlinear_=true) |
Public Attributes |
Pointer< map< int,
SparsityInfo::LinearVariable > > | linear |
| The indices of the linear variables.
|
Pointer< map< int,
SparsityInfo::NonlinearVariable > > | nonlinear |
| The indices of the nonlinear variables.
|
Pointer< map< int,
SparsityInfo::QuadraticVariable > > | quadratic |
| The indices of the quadratic variables.
|
Pointer< map< pair< int, int >
, SparsityInfo::NonlinearConnection > > | sparsity_pattern |
Private Member Functions |
void | add_nonlinear (int index) |
void | add_quadratic (int index, double coeff_lin, double coeff_quad) |
void | add_linear (int index, double coeff) |
void | add_sparsity_pattern (int index1, int index2, double coeff) |
Friends |
class | Decomposition |
ostream & | operator<< (ostream &out, const SparsityInfo &si) |
Detailed Description
A class to represent the sparsity structure of a function.
Depending on the preprocessing progress, not all members have to been set. The coefficient information is not trustable yet. Due to some design-drawbacks, it will become outdated quite fast.
Definition at line 20 of file func.h.
Constructor & Destructor Documentation
SparsityInfo::SparsityInfo |
( |
int |
init_level = 0 |
) |
|
Joins two sparsity infos into one new.
Used when adding two functions, for example.
Member Function Documentation
void SparsityInfo::add_nonlinear |
( |
int |
index |
) |
[inline, private] |
void SparsityInfo::add_quadratic |
( |
int |
index, |
|
|
double |
coeff_lin, |
|
|
double |
coeff_quad | |
|
) |
| | [private] |
void SparsityInfo::add_linear |
( |
int |
index, |
|
|
double |
coeff | |
|
) |
| | [inline, private] |
void SparsityInfo::add_sparsity_pattern |
( |
int |
index1, |
|
|
int |
index2, |
|
|
double |
coeff | |
|
) |
| | [private] |
bool SparsityInfo::compute_sparsity_pattern |
( |
const Func & |
f, |
|
|
const vector< dvector > & |
sample_set | |
|
) |
| | |
void SparsityInfo::add |
( |
const UserVector< double > & |
b |
) |
|
int SparsityInfo::nr_var |
( |
bool |
linear_ = true , |
|
|
bool |
nonlinear_ = true | |
|
) |
| | [inline] |
Friends And Related Function Documentation
ostream& operator<< |
( |
ostream & |
out, |
|
|
const SparsityInfo & |
si | |
|
) |
| | [friend] |
Member Data Documentation
The indices of the linear variables.
Definition at line 95 of file func.h.
The indices of the nonlinear variables.
Definition at line 98 of file func.h.
The indices of the quadratic variables.
If set, then this set is a subset of the set of nonlinear variables.
Definition at line 103 of file func.h.
The documentation for this class was generated from the following file: