|
AbstractLinAlgPack: C++ Interfaces For Vectors, Matrices And Related Linear Algebra Objects Version of the Day
|
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 ABSTRACT_LINALG_PACK_VECTOR_AUXILIARY_OPS_H 00030 #define ABSTRACT_LINALG_PACK_VECTOR_AUXILIARY_OPS_H 00031 00032 #include <utility> 00033 00034 #include "AbstractLinAlgPack_VectorMutable.hpp" 00035 00036 namespace AbstractLinAlgPack { 00037 00041 00044 00053 value_type max_element( const Vector& v ); 00054 00070 std::pair<value_type,value_type> 00071 max_near_feas_step( 00072 const Vector& x, const Vector& d 00073 ,const Vector& xl, const Vector& xu 00074 ,value_type max_bnd_viol 00075 ); 00076 00084 value_type max_rel_step( 00085 const Vector& x, const Vector& d 00086 ); 00087 00089 00093 value_type fraction_to_boundary( 00094 const value_type tau, 00095 const Vector &x, 00096 const Vector &d, 00097 const Vector &xl, 00098 const Vector &xu 00099 ); 00100 00102 00107 value_type fraction_to_zero_boundary( 00108 const value_type tau, 00109 const Vector &x, 00110 const Vector &d 00111 ); 00112 00117 size_type num_bounded( 00118 const Vector& xl, const Vector& xu 00119 ,value_type inf_bound ); 00120 00128 value_type log_bound_barrier( 00129 const Vector &x 00130 ,const Vector &xl 00131 ,const Vector &xu 00132 ); 00133 00142 value_type combined_nu_comp_err( 00143 const Vector &v 00144 ,const Vector &x 00145 ,const Vector &xl 00146 ,const Vector &xu 00147 ); 00148 00149 00163 value_type combined_nu_comp_err_lower( 00164 const Vector &v 00165 ,const Vector &x 00166 ,const Vector &xl 00167 ); 00168 00178 value_type combined_nu_comp_err_upper( 00179 const Vector &v 00180 ,const Vector &x 00181 ,const Vector &xu 00182 ); 00183 00184 00197 value_type IP_comp_err_with_mu( 00198 const value_type mu 00199 ,const value_type inf_bound 00200 ,const Vector &x 00201 ,const Vector &xl 00202 ,const Vector &xu 00203 ,const Vector &vl 00204 ,const Vector &vu 00205 ); 00206 00252 bool max_inequ_viol( 00253 const AbstractLinAlgPack::Vector &v 00254 ,const AbstractLinAlgPack::Vector &vL 00255 ,const AbstractLinAlgPack::Vector &vU 00256 ,AbstractLinAlgPack::size_type *max_viol_i 00257 ,AbstractLinAlgPack::value_type *max_viol 00258 ,AbstractLinAlgPack::value_type *v_i 00259 ,int *bnd_type 00260 ,AbstractLinAlgPack::value_type *vLU_i 00261 ); 00262 00264 00267 00279 void force_in_bounds( const Vector& xl, const Vector& xu, VectorMutable* x ); 00280 00285 void force_in_bounds_buffer( 00286 const value_type rel_push, 00287 const value_type abs_push, 00288 const Vector &xl, 00289 const Vector &xu, 00290 VectorMutable *x 00291 ); 00292 00300 void inv_of_difference( 00301 const value_type alpha 00302 ,const Vector &v0 00303 ,const Vector &v1 00304 ,VectorMutable *z 00305 ); 00306 00314 void correct_lower_bound_multipliers( 00315 const Vector &xl 00316 ,const value_type inf_bound_limit 00317 ,VectorMutable *vl 00318 ); 00319 00327 void correct_upper_bound_multipliers( 00328 const Vector &xu 00329 ,const value_type inf_bound_limit 00330 ,VectorMutable *vu 00331 ); 00332 00339 void lowerbound_multipliers_step( 00340 const value_type mu, 00341 const Vector &invXl, 00342 const Vector &vl, 00343 const Vector &d_k, 00344 VectorMutable *dvl 00345 ); 00346 00354 void upperbound_multipliers_step( 00355 const value_type mu, 00356 const Vector &invXu, 00357 const Vector &vu, 00358 const Vector &d_k, 00359 VectorMutable *dvu 00360 ); 00361 00362 00371 void ele_wise_sqrt( 00372 VectorMutable* z 00373 ); 00374 00382 void max_vec_scalar( 00383 value_type min_ele 00384 ,VectorMutable *y 00385 ); 00386 00394 void max_abs_vec_scalar( 00395 value_type min_ele 00396 ,VectorMutable *y 00397 ); 00398 00400 00402 00403 } // end namespace AbstractLinAlgPack 00404 00405 #endif // ABSTRACT_LINALG_PACK_VECTOR_AUXILIARY_OPS_H
1.7.4