NLPInterfacePack: C++ Interfaces and Implementation for Non-Linear Programs  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Classes | List of all members
NLPInterfacePack::NLPSerialPreprocessExplJac Class Referenceabstract

NLP node subclass complementing NLPSerialPreprocess for explicit Jacobians. More...

#include <NLPInterfacePack_NLPSerialPreprocessExplJac.hpp>

Inheritance diagram for NLPInterfacePack::NLPSerialPreprocessExplJac:
Inheritance graph
[legend]

Classes

struct  FirstOrderExplInfo
 Struct for zero and explicit first order quantities that subclass must fill in. More...
 

Public types

typedef Teuchos::RCP< const
Teuchos::AbstractFactory
< MatrixOp > > 
factory_mat_ptr_t
 

Constructors / initializers

 STANDARD_COMPOSITION_MEMBERS (BasisSystemFactory, basis_sys_fcty)
 Set the BasisSystemFactory object used to create the basis system. More...
 
 NLPSerialPreprocessExplJac (const basis_sys_fcty_ptr_t &basis_sys_fcty=Teuchos::rcp(new BasisSystemFactoryStd()), const factory_mat_ptr_t &factory_Gc_full=Teuchos::null)
 Calls this->set_basis_sys_fcty() and this->set_mat_factories() methods. More...
 
void set_factory_Gc_full (const factory_mat_ptr_t &factory_Gc_full)
 Initialize with matrix factory for original matrices Gc. More...
 

Overridden public members from NLP

void set_options (const options_ptr_t &options)
 Passes these options on to this->basis_sys_fcty().set_options(options). More...
 
const options_ptr_tget_options () const
 
void initialize (bool test_setup)
 
bool is_initialized () const
 

Overridden public members from NLPFirstOrder

const mat_fcty_ptr_t factory_Gc () const
 
const basis_sys_ptr_t basis_sys () const
 Calls basis_sys_fcty()->create() More...
 
void set_Gc (MatrixOp *Gc)
 Validates the type of Gc is correct. More...
 

Overridden public members from NLPVarReductPerm

bool get_next_basis (Permutation *P_var, Range1D *var_dep, Permutation *P_equ, Range1D *equ_decomp)
 
void set_basis (const Permutation &P_var, const Range1D &var_dep, const Permutation *P_equ, const Range1D *equ_decomp)
 

Overridden protected members from NLPFirstOrder

void imp_calc_Gc (const Vector &x, bool newx, const FirstOrderInfo &first_order_info) const
 

Pure virtual template methods to be defined by subclasses

virtual size_type imp_Gc_nz_orig () const =0
 Return the number of nonzero elements in Gc before elements are removed for fixed variables. More...
 
virtual size_type imp_Gh_nz_orig () const =0
 Return the number of nonzero elements in Gh before elements are removed for fixed variables. More...
 
virtual void imp_calc_Gc_orig (const DVectorSlice &x_full, bool newx, const FirstOrderExplInfo &first_order_expl_info) const =0
 Calculate the COOR matrix for the gradient for all of the c(x) constaints in the original NLP. More...
 
virtual void imp_calc_Gh_orig (const DVectorSlice &x_full, bool newx, const FirstOrderExplInfo &first_order_expl_info) const =0
 Calculate the COOR matrix for the gradient for all of the h(x) constaints in the original NLP. More...
 

Protected member functions for subclasses to use

void assert_initialized () const
 Assert if we have been initizlized (throws UnInitialized) More...
 
const FirstOrderExplInfo first_order_expl_info () const
 

Additional Inherited Members

- Public Types inherited from NLPInterfacePack::NLP
typedef Teuchos::RCP< const
VectorSpace > 
vec_space_ptr_t
 
typedef Teuchos::RCP< const
OptionsFromStreamPack::OptionsFromStream
options_ptr_t
 
- Public Types inherited from NLPInterfacePack::NLPVarReductPerm
typedef Teuchos::RCP< const
Teuchos::AbstractFactory
< Permutation > > 
perm_fcty_ptr_t
 
- Public Types inherited from NLPInterfacePack::NLPFirstOrder
typedef Teuchos::RCP< const
Teuchos::AbstractFactory
< MatrixOp > > 
mat_fcty_ptr_t
 
typedef Teuchos::RCP< BasisSystem > basis_sys_ptr_t
 
- Public Member Functions inherited from NLPInterfacePack::NLPSerialPreprocess
 NLPSerialPreprocess ()
 Default Constructor. More...
 
void force_xinit_in_bounds (bool force_xinit_in_bounds)
 
bool force_xinit_in_bounds () const
 
size_type n () const
 
size_type m () const
 
vec_space_ptr_t space_x () const
 
vec_space_ptr_t space_c () const
 
size_type num_bounded_x () const
 
const Vectorxl () const
 
const Vectorxu () const
 
const Vectorxinit () const
 
void get_init_lagrange_mult (VectorMutable *lambda, VectorMutable *nu) const
 
void scale_f (value_type scale_f)
 
value_type scale_f () const
 
void report_final_solution (const Vector &x, const Vector *lambda, const Vector *nu, bool is_optimal)
 Overridden to permute the variables back into an order that is natural to the subclass. More...
 
virtual size_type ns () const
 
vec_space_ptr_t space_c_breve () const
 
vec_space_ptr_t space_h_breve () const
 
const Vectorhl_breve () const
 
const Vectorhu_breve () const
 
const Permutation & P_var () const
 
const Permutation & P_equ () const
 
const perm_fcty_ptr_t factory_P_var () const
 
const perm_fcty_ptr_t factory_P_equ () const
 
Range1D var_dep () const
 
Range1D var_indep () const
 
Range1D equ_decomp () const
 
Range1D equ_undecomp () const
 
bool nlp_selects_basis () const
 
void get_basis (Permutation *P_var, Range1D *var_dep, Permutation *P_equ, Range1D *equ_decomp) const
 
- Public Member Functions inherited from NLPInterfacePack::NLPObjGrad
 NLPObjGrad ()
 Initialize to no reference set to calculation quanities. More...
 
virtual bool supports_Gf () const
 Determine if the objective gradient is supported or not. More...
 
virtual bool supports_Gf_prod () const
 Determine if the objective gradient product is supported or not. More...
 
virtual void set_Gf (VectorMutable *Gf)
 Set a pointer to a vector to be updated when this->calc_Gf() is called. More...
 
virtual VectorMutableget_Gf ()
 Return pointer passed to this->set_Gf(). More...
 
virtual VectorMutableGf ()
 Returns non-const *this->get_Gf(). More...
 
virtual const VectorGf () const
 Returns const *this->get_Gf(). More...
 
void unset_quantities ()
 Call to unset all storage quantities (both in this class and all subclasses). More...
 
virtual void calc_Gf (const Vector &x, bool newx=true) const
 Update the vector for Gf at the point x and put it in the stored reference. More...
 
virtual value_type calc_Gf_prod (const Vector &x, const Vector &d, bool newx=true) const
 Calculate the inner product Gf(x)'*d at the point x and put it in the stored reference. More...
 
virtual size_type num_Gf_evals () const
 Objective gradient evaluations count. More...
 
- Public Member Functions inherited from NLPInterfacePack::NLP
const ZeroOrderInfo zero_order_info () const
 Return pointer to set quantities. More...
 
const ZeroOrderInfo zero_order_info_breve () const
 Return pointer to set hat quantities. More...
 
 NLP ()
 Initialize to no reference set to calculation quanities. More...
 
virtual ~NLP ()
 Destructor that cleans all the memory it owns. More...
 
virtual void set_options (const options_ptr_t &options)
 Set the options that this NLP may be interested in. More...
 
virtual value_type max_var_bounds_viol () const =0
 Set the maximum absolute value for which the variable bounds may be violated by when computing function and gradient values. More...
 
virtual void set_f (value_type *f)
 Set a pointer to an value to be updated when this->calc_f() is called. More...
 
virtual value_type * get_f ()
 Return pointer passed to this->set_f(). More...
 
virtual value_type & f ()
 Returns non-const *this->get_f(). More...
 
virtual const value_type & f () const
 Returns const *this->get_f(). More...
 
virtual void set_c (VectorMutable *c)
 Set a pointer to a vector to be updated when this->calc_c() is called. More...
 
virtual VectorMutableget_c ()
 Return pointer passed to this->set_c(). More...
 
virtual VectorMutablec ()
 Returns non-const *this->get_c(). More...
 
virtual const Vectorc () const
 Returns const *this->get_c(). More...
 
virtual void calc_f (const Vector &x, bool newx=true) const
 Update the value for the objective f at the point x and put it in the stored reference. More...
 
virtual void calc_c (const Vector &x, bool newx=true) const
 Update the constraint residual vector for c at the point x and put it in the stored reference. More...
 
virtual size_type num_f_evals () const
 Gives the number of object function f(x) evaluations called by the solver since initialize() was called. More...
 
virtual size_type num_c_evals () const
 Gives the number of constraint function c(x) evaluations called by the solver since initialize() was called. Throws exception if this->m() == 0. More...
 
virtual void set_c_breve (VectorMutable *c_breve)
 Set a pointer to a vector to be updated when this->calc_c_breve() is called. More...
 
virtual VectorMutableget_c_breve ()
 Return pointer passed to this->set_c_breve(). More...
 
virtual VectorMutablec_breve ()
 Returns non-const *this->get_c_breve(). More...
 
virtual const Vectorc_breve () const
 Returns const *this->get_c_breve(). More...
 
virtual void set_h_breve (VectorMutable *h_breve)
 Set a pointer to a vector to be updated when this->calc_h_breve() is called. More...
 
virtual VectorMutableget_h_breve ()
 Return pointer passed to this->set_h_breve(). More...
 
virtual VectorMutableh_breve ()
 Returns non-const *this->get_h_breve(). More...
 
virtual const Vectorh_breve () const
 Returns const *this->get_h_breve(). More...
 
virtual void calc_c_breve (const Vector &x, bool newx=true) const
 Update the constraint residual vector for c_breve at the point x and put it in the stored reference. More...
 
virtual void calc_h_breve (const Vector &x, bool newx=true) const
 Update the constraint residual vector for h_breve at the point x and put it in the stored reference. More...
 
- Public Member Functions inherited from NLPInterfacePack::NLPVarReductPerm
- Public Member Functions inherited from NLPInterfacePack::NLPFirstOrder
 NLPFirstOrder ()
 Initialize to no reference set to calculation quanities. More...
 
virtual MatrixOp * get_Gc ()
 Return pointer passed to this->set_Gc(). More...
 
virtual MatrixOp & Gc ()
 Returns non-const *this->get_Gc(). More...
 
virtual const MatrixOp & Gc () const
 Returns const *this->get_Gc(). More...
 
void unset_quantities ()
 Call to unset all storage quantities (both in this class and all subclasses). More...
 
virtual void calc_Gc (const Vector &x, bool newx=true) const
 Update the matrix for Gc at the point x and put it in the stored reference. More...
 
virtual size_type num_Gc_evals () const
 Gradient of constraints matrix Gc evaluations count. More...
 
- Static Public Member Functions inherited from NLPInterfacePack::NLPSerialPreprocess
static value_type fixed_var_mult ()
 Gives the value of a Lagrange multipler for a fixed variable bound .that has been preprocessed out of the problem. More...
 
- Static Public Member Functions inherited from NLPInterfacePack::NLP
static value_type infinite_bound ()
 Value for an infinite bound. More...
 
- Protected Member Functions inherited from NLPInterfacePack::NLPSerialPreprocess
void imp_calc_f (const Vector &x, bool newx, const ZeroOrderInfo &zero_order_info) const
 
void imp_calc_c (const Vector &x, bool newx, const ZeroOrderInfo &zero_order_info) const
 
void imp_calc_c_breve (const Vector &x, bool newx, const ZeroOrderInfo &zero_order_info_breve) const
 
void imp_calc_h_breve (const Vector &x, bool newx, const ZeroOrderInfo &zero_order_info_breve) const
 
void imp_calc_Gf (const Vector &x, bool newx, const ObjGradInfo &obj_grad_info) const
 
virtual bool imp_nlp_has_changed () const
 Return if the definition of the NLP has changed since the last call to initialize() More...
 
virtual size_type imp_n_orig () const =0
 Return the number of variables in the original problem (including those fixed by bounds) More...
 
virtual size_type imp_m_orig () const =0
 Return the number of general equality constraints in the original problem. More...
 
virtual size_type imp_mI_orig () const =0
 Return the number of general inequality constraints in the original problem. More...
 
virtual const DVectorSlice imp_xinit_orig () const =0
 Return the original initial point (size imp_n_orig()). More...
 
virtual bool imp_has_var_bounds () const =0
 Return if the NLP has bounds. More...
 
virtual const DVectorSlice imp_xl_orig () const =0
 Return the original lower variable bounds (size imp_n_orig()). More...
 
virtual const DVectorSlice imp_xu_orig () const =0
 Return the original upper variable bounds (size imp_n_orig()). More...
 
virtual const DVectorSlice imp_hl_orig () const =0
 Return the original lower general inequality bounds (size imp_mI_orig()). More...
 
virtual const DVectorSlice imp_hu_orig () const =0
 Return the original upper general inequality bounds (size imp_mI_orig()). More...
 
virtual void imp_calc_f_orig (const DVectorSlice &x_full, bool newx, const ZeroOrderInfoSerial &zero_order_info) const =0
 Calculate the objective function for the original NLP. More...
 
virtual void imp_calc_c_orig (const DVectorSlice &x_full, bool newx, const ZeroOrderInfoSerial &zero_order_info) const =0
 Calculate the vector for all of the general equality constaints in the original NLP. More...
 
virtual void imp_calc_h_orig (const DVectorSlice &x_full, bool newx, const ZeroOrderInfoSerial &zero_order_info) const =0
 Calculate the vector for all of the general inequality constaints in the original NLP. More...
 
virtual void imp_calc_Gf_orig (const DVectorSlice &x_full, bool newx, const ObjGradInfoSerial &obj_grad_info) const =0
 Calculate the vector for the gradient of the objective in the original NLP. More...
 
virtual bool imp_get_next_basis (IVector *var_perm_full, IVector *equ_perm_full, size_type *rank_full, size_type *rank)
 Return the next basis selection (default returns false). More...
 
virtual void imp_report_orig_final_solution (const DVectorSlice &x_full, const DVectorSlice *lambda_orig, const DVectorSlice *lambdaI_orig, const DVectorSlice *nu_orig, bool optimal)
 To be overridden by subclasses to report the final solution in the original ordering natural to the subclass. More...
 
void set_not_initialized ()
 Used by subclasses to set the state of the NLP to not initialized. More...
 
void assert_initialized () const
 Assert if we have been initizlized (throws UnInitialized) More...
 
void set_x_full (const DVectorSlice &x, bool newx, DVectorSlice *x_full) const
 Set the full x vector if newx == true More...
 
DVectorSlice x_full () const
 Give reference to current x_full. More...
 
const ZeroOrderInfoSerial zero_order_orig_info () const
 
const ObjGradInfoSerial obj_grad_orig_info () const
 
const IVector & var_remove_fixed_to_full () const
 Permutation vector for partitioning free and fixed variables. More...
 
const IVector & var_full_to_remove_fixed () const
 Inverse permutation vector of var_remove_fixed_to_full(). More...
 
const IVector & var_perm () const
 Permutes from the compated variable vector (removing fixed variables) to the current basis selection. More...
 
const IVector & equ_perm () const
 Permutes from the original constriant ordering to the current basis selection. More...
 
const IVector & inv_equ_perm () const
 Inverse of equ_perm() More...
 
void var_from_full (DVectorSlice::const_iterator vec_full, DVectorSlice::iterator vec) const
 
void var_to_full (DVectorSlice::const_iterator vec, DVectorSlice::iterator vec_full) const
 
void equ_from_full (const DVectorSlice &c_orig, const DVectorSlice &h_orig, const DVectorSlice &s_orig, DVectorSlice *c_full) const
 
- Protected Member Functions inherited from NLPInterfacePack::NLPObjGrad
const ObjGradInfo obj_grad_info () const
 Return objective gradient and zero order information. More...
 
- Protected Member Functions inherited from NLPInterfacePack::NLP
template<class T >
void assert_ref_set (T *p, std::string info) const
 Assert referece has been set for a quanity. More...
 
- Protected Member Functions inherited from NLPInterfacePack::NLPFirstOrder
const FirstOrderInfo first_order_info () const
 Return objective gradient and zero order information. More...
 

Detailed Description

NLP node subclass complementing NLPSerialPreprocess for explicit Jacobians.

This subclass does a lot of work. It has to consider several different types of variability. The matrices Gc and Gh that are computed must take into consideration whether or not inequalities are converted to equalities (convert_inequ_to_equ) and the permutation of the entries according to the current basis selection.

   Gc = P_var * [  Gc_orig    Gh_orig   ] * P_equ'
                [     0          -I     ]

This class also comes with a default implementation for the BasisSystemPerm object which is created by a BasisSystemPermFactory object that the client (or the subclass) can specify. The default implementation for this factory object is from BasisSystemPermFactoryStd which uses the AbstractLinAlgPack::BasisSystemPermDirectSparse subclass and supports several different linear solvers by default. The client (or subclass) can augment the list of supported linear solvers easily.

ToDo: Finish documentation!

Subclass developers

Subclass developer's don't have to worry about slack variables or basis permutations. A concreate subclass just has to override the functions that defined the original NLP (see the tutorial example NLP ???).

In addition to the methods that must be overridden in NLPSerialPreprocess (see) the following methods must be overridden as well: imp_Gc_nz_orig(), imp_Gh_nz_orig(), imp_calc_Gc_orig(), imp_calc_Gh_orig().

Definition at line 93 of file NLPInterfacePack_NLPSerialPreprocessExplJac.hpp.

Member Typedef Documentation

Constructor & Destructor Documentation

NLPInterfacePack::NLPSerialPreprocessExplJac::NLPSerialPreprocessExplJac ( const basis_sys_fcty_ptr_t &  basis_sys_fcty = Teuchos::rcp(new BasisSystemFactoryStd()),
const factory_mat_ptr_t factory_Gc_full = Teuchos::null 
)

Calls this->set_basis_sys_fcty() and this->set_mat_factories() methods.

Definition at line 68 of file NLPInterfacePack_NLPSerialPreprocessExplJac.cpp.

Member Function Documentation

NLPInterfacePack::NLPSerialPreprocessExplJac::STANDARD_COMPOSITION_MEMBERS ( BasisSystemFactory  ,
basis_sys_fcty   
)

Set the BasisSystemFactory object used to create the basis system.

void NLPInterfacePack::NLPSerialPreprocessExplJac::set_factory_Gc_full ( const factory_mat_ptr_t factory_Gc_full)

Initialize with matrix factory for original matrices Gc.

This matrix type will be used for AbstractLinAlgPack::MatrixPermAggr::mat_orig() returned by the initialized Gc.

Parameters
factory_Gc_full[in] Smart pointer to matrix factory for Gc_full. If factory_Gc_full.get() == NULL then the concrete matrix type ??? will be used as the default.

Definition at line 78 of file NLPInterfacePack_NLPSerialPreprocessExplJac.cpp.

void NLPInterfacePack::NLPSerialPreprocessExplJac::set_options ( const options_ptr_t options)

Passes these options on to this->basis_sys_fcty().set_options(options).

Definition at line 92 of file NLPInterfacePack_NLPSerialPreprocessExplJac.cpp.

const NLP::options_ptr_t & NLPInterfacePack::NLPSerialPreprocessExplJac::get_options ( ) const
virtual

Reimplemented from NLPInterfacePack::NLP.

Definition at line 98 of file NLPInterfacePack_NLPSerialPreprocessExplJac.cpp.

void NLPInterfacePack::NLPSerialPreprocessExplJac::initialize ( bool  test_setup)
virtual
bool NLPInterfacePack::NLPSerialPreprocessExplJac::is_initialized ( ) const
virtual
const NLPFirstOrder::mat_fcty_ptr_t NLPInterfacePack::NLPSerialPreprocessExplJac::factory_Gc ( ) const
virtual
const NLPFirstOrder::basis_sys_ptr_t NLPInterfacePack::NLPSerialPreprocessExplJac::basis_sys ( ) const
virtual

Calls basis_sys_fcty()->create()

Reimplemented from NLPInterfacePack::NLPFirstOrder.

Definition at line 150 of file NLPInterfacePack_NLPSerialPreprocessExplJac.cpp.

void NLPInterfacePack::NLPSerialPreprocessExplJac::set_Gc ( MatrixOp *  Gc)
virtual

Validates the type of Gc is correct.

Reimplemented from NLPInterfacePack::NLPFirstOrder.

Definition at line 157 of file NLPInterfacePack_NLPSerialPreprocessExplJac.cpp.

bool NLPInterfacePack::NLPSerialPreprocessExplJac::get_next_basis ( Permutation *  P_var,
Range1D *  var_dep,
Permutation *  P_equ,
Range1D *  equ_decomp 
)
virtual
void NLPInterfacePack::NLPSerialPreprocessExplJac::set_basis ( const Permutation &  P_var,
const Range1D &  var_dep,
const Permutation *  P_equ,
const Range1D *  equ_decomp 
)
virtual
void NLPInterfacePack::NLPSerialPreprocessExplJac::imp_calc_Gc ( const Vector x,
bool  newx,
const FirstOrderInfo first_order_info 
) const
protectedvirtual
virtual size_type NLPInterfacePack::NLPSerialPreprocessExplJac::imp_Gc_nz_orig ( ) const
protectedpure virtual

Return the number of nonzero elements in Gc before elements are removed for fixed variables.

The value returned from this method before the first time imp_calc_Gc() is called is an upper estimate of the number of nonzeros. To get the actual number of nonzeros, call this function again after imp_calc_Gc() has been called.

virtual size_type NLPInterfacePack::NLPSerialPreprocessExplJac::imp_Gh_nz_orig ( ) const
protectedpure virtual

Return the number of nonzero elements in Gh before elements are removed for fixed variables.

The value returned from this method before the first time imp_calc_Gh() is called is an upper estimate of the number of nonzeros. To get the actual number of nonzeros, call this function again after imp_calc_Gh() has been called.

virtual void NLPInterfacePack::NLPSerialPreprocessExplJac::imp_calc_Gc_orig ( const DVectorSlice &  x_full,
bool  newx,
const FirstOrderExplInfo first_order_expl_info 
) const
protectedpure virtual

Calculate the COOR matrix for the gradient for all of the c(x) constaints in the original NLP.

Parameters
x_full[in] Unknown vector (size n_full).
newx[in] True if is a new point.
first_order_expl_info[out] Pointers to zero and first order quantities . On output, *first_order_expl_info.Gc_nz must be set to the actual number of nonzero elements in Gc and the array of nonzero entry values *first_order_expl_info.Gc_val must also be set. The nonzero structure must also be set in the arrays *first_order_expl_info.Gc_ivect and *first_order_expl_info.Gc_jvect if first_order_expl_info.Gc_ivect != NULL. In addition, any of the other quantities pointed to in first_order_expl_info may be set on output, but are not guaranteed to be.

Preconditions:

  • first_order_expl_info.Gc_nz != NULL
  • first_order_expl_info.Gc_val != NULL
  • (first_order_expl_info.Gc_ivect != NULL) == (first_order_expl_info.Gc_jvect != NULL)

Postconditions:

  • *first_order_expl_info.Gc_nz is updated to number of nonzero elements set in *first_order_expl_info.Gc_val.
  • (*first_order_expl_info.Gc_val)[k], for k = 1...*first_order_expl_info.Gc_nz is set to the nonzero entry values in Gc.
  • [first_order_expl_info.Gc_ivect != NULL] (*first_order_expl_info.Gc_ivect)[k], for k = 1...*first_order_expl_info.Gc_nz is set to the row indexes for the nonzero entires in Gc.
  • [first_order_expl_info.Gc_jvect != NULL] (*first_order_expl_info.Gc_jvect)[k], for k = 1...*first_order_expl_info.Gc_nz is set to the column indexes for the nonzero entires in Gc.

Note that duplicate entires with the same row and column indexes are allowed. In this case, the matrix entries are considered to be summed.

virtual void NLPInterfacePack::NLPSerialPreprocessExplJac::imp_calc_Gh_orig ( const DVectorSlice &  x_full,
bool  newx,
const FirstOrderExplInfo first_order_expl_info 
) const
protectedpure virtual

Calculate the COOR matrix for the gradient for all of the h(x) constaints in the original NLP.

Parameters
x_full[in] Unknown vector (size n_full).
newx[in] True if is a new point.
first_order_expl_info[out] Pointers to zero and first order quantities . On output, *first_order_expl_info.Gh_nz must be set to the actual number of nonzero elements in Gh and the array of nonzero entry values *first_order_expl_info.Gh_val must also be set. The nonzero structure must also be set in the arrays *first_order_expl_info.Gh_ivect and *first_order_expl_info.Gh_jvect if first_order_expl_info.Gh_ivect != NULL. In addition, any of the other quantities pointed to in first_order_expl_info may be set on output, but are not guaranteed to be.

Preconditions:

  • first_order_expl_info.Gh_nz != NULL
  • first_order_expl_info.Gh_val != NULL
  • (first_order_expl_info.Gh_ivect != NULL) == (first_order_expl_info.Gh_jvect != NULL)

Postconditions:

  • *first_order_expl_info.Gh_nz is updated to number of nonzero elements set in *first_order_expl_info.Gh_val.
  • (*first_order_expl_info.Gh_val)[k], for k = 1...*first_order_expl_info.Gh_nz is set to the nonzero entry values in Gh.
  • [first_order_expl_info.Gh_ivect != NULL] (*first_order_expl_info.Gh_ivect)[k], for k = 1...*first_order_expl_info.Gh_nz is set to the row indexes for the nonzero entires in Gh.
  • [first_order_expl_info.Gh_jvect != NULL] (*first_order_expl_info.Gh_jvect)[k], for k = 1...*first_order_expl_info.Gh_nz is set to the column indexes for the nonzero entires in Gh.

Note that duplicate entires with the same row and column indexes are allowed. In this case, the matrix entries are considered to be summed.

void NLPInterfacePack::NLPSerialPreprocessExplJac::assert_initialized ( ) const
protected

Assert if we have been initizlized (throws UnInitialized)

Definition at line 448 of file NLPInterfacePack_NLPSerialPreprocessExplJac.cpp.

const NLPSerialPreprocessExplJac::FirstOrderExplInfo NLPInterfacePack::NLPSerialPreprocessExplJac::first_order_expl_info ( ) const
inlineprotected

The documentation for this class was generated from the following files: