ConstrainedOptPack_QPInitFixedFreeStd.hpp

00001 // @HEADER
00002 // ***********************************************************************
00003 // 
00004 // Moocho: Multi-functional Object-Oriented arCHitecture for Optimization
00005 //                  Copyright (2003) Sandia Corporation
00006 // 
00007 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
00008 // license for use of this work by or on behalf of the U.S. Government.
00009 // 
00010 // This library is free software; you can redistribute it and/or modify
00011 // it under the terms of the GNU Lesser General Public License as
00012 // published by the Free Software Foundation; either version 2.1 of the
00013 // License, or (at your option) any later version.
00014 //  
00015 // This library is distributed in the hope that it will be useful, but
00016 // WITHOUT ANY WARRANTY; without even the implied warranty of
00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018 // Lesser General Public License for more details.
00019 //  
00020 // You should have received a copy of the GNU Lesser General Public
00021 // License along with this library; if not, write to the Free Software
00022 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00023 // USA
00024 // Questions? Contact Roscoe A. Bartlett (rabartl@sandia.gov) 
00025 // 
00026 // ***********************************************************************
00027 // @HEADER
00028 
00029 #ifndef QP_INIT_FIXED_FREE_STD_H
00030 #define QP_INIT_FIXED_FREE_STD_H
00031 
00032 #include "ConstrainedOptPack_QPSchur.hpp"
00033 
00034 namespace ConstrainedOptPack {
00035 namespace QPSchurPack {
00036 
00045 class QPInitFixedFreeStd : public QP {
00046 public:
00047 
00049   QPInitFixedFreeStd();
00050 
00117   void initialize(
00118     const DVectorSlice            &g
00119     ,const MatrixSymOp          &G
00120     ,const MatrixOp           *A
00121     ,size_type                n_R
00122     ,const size_type            i_x_free[]
00123     ,const size_type            i_x_fixed[]
00124     ,const EBounds              bnd_fixed[]
00125     ,const DVectorSlice           &b_X
00126     ,const MatrixSymOpNonsing   &Ko
00127     ,const DVectorSlice           &fo
00128     ,Constraints              *constraints
00129     ,std::ostream             *out        = NULL
00130     ,bool                 test_setup      = false
00131     ,value_type               warning_tol     = 1e-10
00132     ,value_type               error_tol     = 1e-5
00133     ,bool                 print_all_warnings  = false
00134     );
00135 
00138 
00140   size_type n() const;
00142   size_type m() const;
00144   const DVectorSlice g() const;
00146   const MatrixSymOp& G() const;
00148   const MatrixOp& A() const;
00150   size_type n_R() const;
00152   const x_init_t& x_init() const;
00154   const l_x_X_map_t& l_x_X_map() const;
00156   const i_x_X_map_t& i_x_X_map() const;
00158   const DVectorSlice b_X() const;
00160   const GenPermMatrixSlice& Q_R() const;
00162   const GenPermMatrixSlice& Q_X() const;
00164   const MatrixSymOpNonsing& Ko() const;
00166   const DVectorSlice fo() const;
00168   Constraints& constraints();
00170   const Constraints& constraints() const;
00171 
00173 
00174 private:
00175 
00176   // ///////////////////////////////////
00177   // Private types
00178 
00179   typedef std::vector<size_type>    row_i_t;
00180   typedef std::vector<size_type>    col_j_t;
00181   
00182   // ///////////////////////////////////
00183   // Private data members
00184 
00185 
00186   size_type       n_;
00187   size_type       n_R_;
00188   size_type       m_;
00189   DVectorSlice        g_; // will not be modified!
00190   const MatrixSymOp *G_;
00191   const MatrixOp    *A_;  // If NULL not no equalities in Ko
00192   x_init_t        x_init_;
00193   l_x_X_map_t       l_x_X_map_;
00194   i_x_X_map_t       i_x_X_map_;
00195   DVectorSlice        b_X_; // will not be modified!
00196   GenPermMatrixSlice    Q_R_;
00197   row_i_t         Q_R_row_i_;
00198   col_j_t         Q_R_col_j_;
00199   GenPermMatrixSlice    Q_X_;
00200   row_i_t         Q_X_row_i_;
00201   col_j_t         Q_X_col_j_;
00202   const MatrixSymOpNonsing
00203               *Ko_;
00204   DVectorSlice        fo_;  // will not be modified
00205   Constraints       *constraints_;
00206 
00207   // Private member function
00208   void assert_initialized() const;
00209 
00210 };  // end class QPInitFixedFreeStd
00211 
00212 } // end namespace QPSchurPack
00213 } // end namespace ConstrainedOptPack 
00214 
00215 #endif  // QP_INIT_FIXED_FREE_STD_H

Generated on Thu Sep 18 12:34:15 2008 for ConstrainedOptPack: C++ Tools for Constrained (and Unconstrained) Optimization by doxygen 1.3.9.1